Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-farache committed Oct 30, 2024
1 parent 489246f commit 27f74bd
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 2 deletions.
2 changes: 1 addition & 1 deletion charts/create-ocp-project/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.3.0-rc3
version: 1.3.0-rc4

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,19 @@ data:
"recipients"
]
}
workflow-output-schema.json: |-
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "WorkflowResult",
"description": "Schema of workflow output",
"type": "object",
"properties": {
"result": {
"$ref": "../shared/schemas/workflow-result-schema.json",
"type": "object"
}
}
}
kind: ConfigMap
metadata:
creationTimestamp: null
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,15 @@ spec:
- name: print
operation: sysout
type: custom
- name: successResult
operation: '{ "completedWith":"success", "message": "Project " + .projectName + " active", "outputs":[] }'
type: expression
- name: errorProjectNotActiveResult
operation: '{ "completedWith":"error", "message": "Project " + .projectName + " not active" }'
type: expression
- name: errorAuthorizationDeniedResult
operation: '{ "completedWith":"error", "message": "Creation of project " + .projectName + " denied", "outputs":[ { "key":"Jira issue", "value": $SECRET.jira_url + "/jira/servicedesk/projects/" + .operationsProjectKey + "/issues/" + .operationsJiraCreateIssueResult.key, "format":"link" }] }'
type: expression
start:
stateName: '[Audit]: workflow started'
states:
Expand Down Expand Up @@ -210,6 +219,12 @@ spec:
invoke: sync
refName: createNotification
name: 'Create notification: project active'
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: successResult
name: setOutput
name: Notify project active
transition:
nextState: '[Audit]: Close issue on Jira'
Expand All @@ -231,6 +246,12 @@ spec:
invoke: sync
refName: createNotification
name: 'Create notification: project not active'
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: errorProjectNotActiveResult
name: setOutput
name: Notify project not active
transition:
nextState: '[Audit]: Close issue on Jira'
Expand Down Expand Up @@ -267,6 +288,12 @@ spec:
type: operation
- actionMode: sequential
actions:
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: errorAuthorizationDeniedResult
name: setOutput
- actionDataFilter:
toStateData: .jiraGetTransitionResult
useResults: true
Expand Down Expand Up @@ -298,7 +325,7 @@ spec:
podTemplate:
container:
resources: {}
image: quay.io/orchestrator/serverless-workflow-create-ocp-project:579ccba10961697faa471493e9038d7e6682fc0d
image: quay.io/orchestrator/serverless-workflow-create-ocp-project:be3e8e3c8099f475b29a7c67b61c6cb604f8b66c
envFrom:
- secretRef:
name: create-ocp-project-creds
Expand Down

0 comments on commit 27f74bd

Please sign in to comment.