diff --git a/defaults/main.yaml b/defaults/main.yaml index 3e14084..404921b 100644 --- a/defaults/main.yaml +++ b/defaults/main.yaml @@ -20,16 +20,16 @@ workflows: # - add_workspace_client_to_context # - enable_workspace_clients_for_context # - add_workspace_client_to_contexts - - ghn_client_add_to_context - - ghn_client_add_to_contexts - - ghn_client_create - - ghn_client_delete - - ghn_client_remove_from_contexts - - ghn_client_remove_from_context + # - ghn_client_add_to_context + # - ghn_client_add_to_contexts + # - ghn_client_create + # - ghn_client_delete + # - ghn_client_remove_from_contexts + # - ghn_client_remove_from_context # - jupyterhub_add_serveroptions_to_context - # - record_context_to_is - # - create_vre_folder_for_context - # - create_vre + - record_context_to_is + - create_vre_folder_for_context + - create_vre keycloak_host: "https://accounts.dev.d4science.org/auth" keycloak: "{{ keycloak_host }}/realms" diff --git a/templates/create_vre.json.j2 b/templates/create_vre.json.j2 index 2d77557..fc3846a 100644 --- a/templates/create_vre.json.j2 +++ b/templates/create_vre.json.j2 @@ -8,15 +8,16 @@ "inputParameters" : ["context", "folder_owner", "folder_admins"], "tasks" : [ { - "name": "LAMBDA_TASK", + "name": "INLINE_TASK", "taskReferenceName": "init", - "type": "LAMBDA", + "type": "INLINE", "inputParameters": { "root_vo": "{{ root_vo }}", "keycloak": "{{ keycloak }}/{{ keycloak_realm }}", "keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}", "group" : "${workflow.input.context}", - "scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; if(e($.group)) throw('Group must not be empty'); var tree = $.group.startsWith('%2F') ? $.group.split('%2F') : [$.group]; return { 'tree' : tree, 'child': tree[tree.length-1], 'append' : tree.slice(0,-1).join('/'), 'name' : tree.join('/'), encoded_root_vo : encodeURI($.root_vo)}" + "evaluatorType" : "javascript", + "expression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))}; function f(){if(e($.group)) throw('Group must not be empty'); var tree = $.group.startsWith('%2F') ? $.group.split('%2F') : [$.group]; return { 'tree' : tree, 'child': tree[tree.length-1], 'append' : tree.slice(0,-1).join('/'), 'name' : tree.join('/'), encoded_root_vo : encodeURI($.root_vo)}} f()" } }, { @@ -69,12 +70,13 @@ } }, { - "name": "LAMBDA_TASK", + "name": "INLINE_TASK", "taskReferenceName": "extract_client_id", - "type": "LAMBDA", + "type": "INLINE", "inputParameters": { - "client_location" : "${create_client.output.headers.location}", - "scriptExpression": "var client_id = $.client_location.split('/').pop(); return {'client_id' : client_id}" + "client_location" : "${create_client.output.headers.location}", + "evaluatorType" : "javascript", + "expression": "var client_id = $.client_location.split('/').pop(); function f(){return {'client_id' : client_id}} f()" } }, { @@ -91,13 +93,14 @@ } }, { - "name": "LAMBDA_TASK", + "name": "INLINE_TASK", "taskReferenceName": "prepare", - "type": "LAMBDA", + "type": "INLINE", "inputParameters": { "append": "${init.output.result.append}", "groups": "${list_kc_groups.output.body}", - "scriptExpression": "function recurse(inp){for(var i=0;i