fixed workflow
This commit is contained in:
parent
0846edfb75
commit
00782d90e1
|
@ -10,11 +10,11 @@
|
|||
"taskReferenceName": "init",
|
||||
"inputParameters": {
|
||||
"base_url": "https://url.gcube.d4science.org/",
|
||||
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||
"storagehub" : "{{ storagehub }}",
|
||||
"ctx": "${workflow.input.context}",
|
||||
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))} if(e($.ctx)) throw('Context must not be empty'); return { decoded_context : $.ctx.replaceAll('%2F', '/') }"
|
||||
"scriptExpression": "function e(v){ return (v == null || (v.trim && v.trim() === ''))} if(e($.ctx)) throw('Context must not be empty'); return { shubified_context_name : ($.ctx[0] === '%' ? $.ctx.replace('%2F', '') : $.ctx).split('%2F').join('-') }"
|
||||
},
|
||||
"type": "LAMBDA",
|
||||
"decisionCases": {},
|
||||
|
@ -28,46 +28,38 @@
|
|||
"loopOver": []
|
||||
},
|
||||
{
|
||||
"name": "pyrest",
|
||||
"taskReferenceName": "authorize",
|
||||
"inputParameters": {
|
||||
"url": "{{ keycloak }}/{{ keycloak_realm }}/protocol/openid-connect/token",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Accept": "application/json"
|
||||
},
|
||||
"body": {
|
||||
"client_id": "orchestrator",
|
||||
"client_secret": "{{ keycloak_auth }}",
|
||||
"grant_type": "client_credentials"
|
||||
"name" : "pyrest",
|
||||
"taskReferenceName" : "authorize_with_uma_rpt",
|
||||
"type" : "SIMPLE",
|
||||
"inputParameters" : {
|
||||
"url" : "${init.input.keycloak}/protocol/openid-connect/token",
|
||||
"method" : "POST",
|
||||
"headers" : {
|
||||
"Accept" : "application/json"
|
||||
},
|
||||
"body" : {
|
||||
"audience" : "${init.input.root_vo}",
|
||||
"grant_type" : "urn:ietf:params:oauth:grant-type:uma-ticket",
|
||||
"client_id" : "orchestrator",
|
||||
"client_secret" : "{{ keycloak_auth }}"
|
||||
}
|
||||
}
|
||||
},
|
||||
"type": "SIMPLE",
|
||||
"decisionCases": {},
|
||||
"defaultCase": [],
|
||||
"forkTasks": [],
|
||||
"startDelay": 0,
|
||||
"joinOn": [],
|
||||
"optional": false,
|
||||
"defaultExclusiveJoinTask": [],
|
||||
"asyncComplete": false,
|
||||
"loopOver": []
|
||||
},
|
||||
{
|
||||
"name": "pyrest",
|
||||
"taskReferenceName": "create_vre_folder",
|
||||
"inputParameters": {
|
||||
"url": "https://en5ql62qrka7q.x.pipedream.net/${init.output.result.child}",
|
||||
"url": "${init.input.storagehub}/groups",
|
||||
"method": "POST",
|
||||
"headers": {
|
||||
"Authorization": "Bearer bearer_here",
|
||||
"Accept": "application/json",
|
||||
"Authorization": "Bearer ${authorize_with_uma_rpt.output.body.access_token}",
|
||||
"Accept": "text/plain",
|
||||
"Content-Type": "multipart/form-data"
|
||||
},
|
||||
"body": {
|
||||
"accessType": "WRITE_ALL",
|
||||
"folderOwner": "",
|
||||
"group": "${init.output.result.decoded_context}"
|
||||
"accessType": "WRITE_OWN",
|
||||
"folderOwner": "orchestrator",
|
||||
"group": "${init.output.result.shubified_context_name}"
|
||||
}
|
||||
},
|
||||
"type": "SIMPLE",
|
||||
|
|
Loading…
Reference in New Issue