added realm variable for LR to KC workflows and task for removal of workflows befroe uploading
This commit is contained in:
parent
476fd503d2
commit
6ec65c46b5
|
@ -11,6 +11,7 @@ workflows:
|
||||||
- delete-user-account
|
- delete-user-account
|
||||||
keycloak_host: "https://accounts.dev.d4science.org/auth"
|
keycloak_host: "https://accounts.dev.d4science.org/auth"
|
||||||
keycloak: "{{ keycloak_host }}/realms"
|
keycloak: "{{ keycloak_host }}/realms"
|
||||||
|
keycloak_realm: "d4science"
|
||||||
keycloak_admin: "{{ keycloak_host }}/admin/realms"
|
keycloak_admin: "{{ keycloak_host }}/admin/realms"
|
||||||
keycloak_auth: "c93501bd-abeb-4228-bc28-afac38877338"
|
keycloak_auth: "c93501bd-abeb-4228-bc28-afac38877338"
|
||||||
liferay: "https://next.d4science.org/api/jsonws"
|
liferay: "https://next.d4science.org/api/jsonws"
|
||||||
|
|
|
@ -11,6 +11,15 @@
|
||||||
dest: "{{ target.path }}/{{ item }}.json"
|
dest: "{{ target.path }}/{{ item }}.json"
|
||||||
loop: "{{ workflows }}"
|
loop: "{{ workflows }}"
|
||||||
|
|
||||||
|
- name: Undeploy previous versions of workflows
|
||||||
|
uri:
|
||||||
|
url: "{{ conductor_workflowdef_endpoint }}/{{ item }}/1"
|
||||||
|
method: DELETE
|
||||||
|
follow_redirects: yes
|
||||||
|
status_code: [200, 204, 404, 500]
|
||||||
|
loop:
|
||||||
|
"{{ workflows }}"
|
||||||
|
|
||||||
- name: Upload workflows
|
- name: Upload workflows
|
||||||
uri:
|
uri:
|
||||||
url: "{{ conductor_workflowdef_endpoint }}"
|
url: "{{ conductor_workflowdef_endpoint }}"
|
||||||
|
@ -18,7 +27,7 @@
|
||||||
src: "{{ target.path }}/{{ item }}.json"
|
src: "{{ target.path }}/{{ item }}.json"
|
||||||
body_format: json
|
body_format: json
|
||||||
follow_redirects: yes
|
follow_redirects: yes
|
||||||
status_code: [200, 204, 409, 500]
|
status_code: [200, 204]
|
||||||
loop:
|
loop:
|
||||||
"{{ workflows }}"
|
"{{ workflows }}"
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"group" : "${workflow.input.group}",
|
"group" : "${workflow.input.group}",
|
||||||
"scriptExpression": "var path = $.group.split('%2F').slice(1); return { 'tree' : Java.to(path, 'java.lang.Object[]'), 'name' : path.slice(path.length-1)[0]}"
|
"scriptExpression": "var path = $.group.split('%2F').slice(1); return { 'tree' : Java.to(path, 'java.lang.Object[]'), 'name' : path.slice(path.length-1)[0]}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"clientId" : "${workflow.input.group}",
|
"clientId" : "${workflow.input.group}",
|
||||||
"scriptExpression": "var tree = $.clientId.split('%2F'); return { 'tree' : tree, 'child': tree[tree.length-1], 'append' : tree.slice(0,-1).join('/'), 'name' : tree.join('/')}"
|
"scriptExpression": "var tree = $.clientId.split('%2F'); return { 'tree' : tree, 'child': tree[tree.length-1], 'append' : tree.slice(0,-1).join('/'), 'name' : tree.join('/')}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"group" : "${workflow.input.group}",
|
"group" : "${workflow.input.group}",
|
||||||
"scriptExpression" : "return $.group.split('%2F').join('/')"
|
"scriptExpression" : "return $.group.split('%2F').join('/')"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"scriptExpression": "1"
|
"scriptExpression": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"scriptExpression": "1"
|
"scriptExpression": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"scriptExpression": "1"
|
"scriptExpression": "1"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"group" : "${workflow.input.group}",
|
"group" : "${workflow.input.group}",
|
||||||
"scriptExpression": "var path = $.group.split('%2F').slice(1); return { 'tree' : Java.to(path, 'java.lang.Object[]'), 'name' : path.slice(path.length-1)[0]}"
|
"scriptExpression": "var path = $.group.split('%2F').slice(1); return { 'tree' : Java.to(path, 'java.lang.Object[]'), 'name' : path.slice(path.length-1)[0]}"
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
"taskReferenceName": "init",
|
"taskReferenceName": "init",
|
||||||
"type": "LAMBDA",
|
"type": "LAMBDA",
|
||||||
"inputParameters": {
|
"inputParameters": {
|
||||||
"keycloak": "{{ keycloak }}",
|
"keycloak": "{{ keycloak }}/{{ keycloak_realm }}",
|
||||||
"keycloak_admin" : "{{ keycloak_admin }}",
|
"keycloak_admin" : "{{ keycloak_admin }}/{{ keycloak_realm }}",
|
||||||
"group" : "${workflow.input.group}",
|
"group" : "${workflow.input.group}",
|
||||||
"scriptExpression": "var path = $.group.split('%2F').slice(1); return { 'tree' : Java.to(path, 'java.lang.Object[]'), 'name' : path.slice(path.length-1)[0]}"
|
"scriptExpression": "var path = $.group.split('%2F').slice(1); return { 'tree' : Java.to(path, 'java.lang.Object[]'), 'name' : path.slice(path.length-1)[0]}"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue