diff --git a/user-skel/ansible_collections/ace_box/ace_box/roles/demo-release-validation-srg-gitlab/files/monaco/srg/wf.json b/user-skel/ansible_collections/ace_box/ace_box/roles/demo-release-validation-srg-gitlab/files/monaco/srg/wf.json index 8a91cbf42..c03d0caf6 100644 --- a/user-skel/ansible_collections/ace_box/ace_box/roles/demo-release-validation-srg-gitlab/files/monaco/srg/wf.json +++ b/user-skel/ansible_collections/ace_box/ace_box/roles/demo-release-validation-srg-gitlab/files/monaco/srg/wf.json @@ -79,43 +79,19 @@ "description": "Retrieves entity and extracts ownership data from it.", "predecessors": ["query_service_entities"] }, - "refresh_gitlab_token": { - "action": "dynatrace.automations:http-function", - "conditions": { - "custom": "{{`{{`}} (result('identify_ownership').owners | length > 0) {{`}}`}}", - "states": { - "identify_ownership": "OK" - } - }, - "description": "refresh gitlab token", - "input": { - "headers": { - "Content-Type": "application/json" - }, - "method": "POST", - "url": "{{ .gitlab_url }}/oauth/token", - "payload": "{\"grant_type\": \"password\",\"username\": \"{{ .gitlab_username }}\",\"password\": \"{{ .gitlab_passwd }}\"}" - }, - "name": "refresh_gitlab_token", - "position": { - "x": 0, - "y": 4 - }, - "predecessors": ["identify_ownership"] - }, "create_gitlab_issue": { "action": "dynatrace.automations:http-function", "conditions": { "custom": "{{`{{`}} (result('identify_ownership').owners | length > 0) {{`}}`}}", "states": { - "refresh_gitlab_token": "OK" + "identify_ownership": "OK" } }, "description": "{{ .gitlab_task_description }}", "input": { "headers": { "Content-Type": "application/json", - "PRIVATE-TOKEN": "{{`{{`}} result(\"refresh_gitlab_token\").json.access_token {{`}}`}}" + "PRIVATE-TOKEN": "{{ .gitlab_private_token }}" }, "method": "POST", "url": "{{ .gitlab_url }}/api/v4/projects/{{`{{`}} result(\"identify_ownership\").owners[0].contactDetails | selectattr('integrationType', 'equalto', 'JIRA') | map(attribute='jira.project') | first() {{`}}`}}/issues", @@ -124,9 +100,9 @@ "name": "create_gitlab_issue", "position": { "x": 0, - "y": 5 + "y": 4 }, - "predecessors": ["refresh_gitlab_token"] + "predecessors": ["identify_ownership"] } } }