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 608c687 commit b645c2d
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 6 deletions.
2 changes: 1 addition & 1 deletion charts/mtv-migration/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 @@ -28,6 +28,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
24 changes: 19 additions & 5 deletions charts/mtv-migration/templates/04-sonataflow_mtv-migration.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ spec:
- name: getMigrationError
operation: .getStatusResult.status.conditions | map(select(.category == "Error" or .category == "Critical" or .type == "Failed"))[0].message
type: expression
- name: successResult
operation: '{ "completedWith":"success", "message": "MTV migration " + .migrationName + " succeeded", "outputs":[] }'
type: expression
- name: errorResult
operation: '{ "completedWith":"error", "message": "MTV migration " + .migrationName + " failed.", "outputs":[ { "key":"Error", "value": .migrationErrorMessage } ] }'
type: expression
start:
stateName: CreateMigration
states:
Expand Down Expand Up @@ -112,11 +118,15 @@ spec:
invoke: sync
refName: createNotification
name: createNotification
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: errorResult
name: setOutput
end:
terminate: true
name: MigrationFailure
stateDataFilter:
output: '{migrationError: .migrationErrorMessage}'
type: operation
- actionMode: sequential
actions:
Expand All @@ -135,16 +145,20 @@ spec:
invoke: sync
refName: createNotification
name: createNotification
- actionDataFilter:
useResults: true
functionRef:
invoke: sync
refName: successResult
name: setOutput
end:
terminate: true
name: MigrationSuccessful
stateDataFilter:
output: '{migrationSuccessful: "migration successful"}'
type: operation
podTemplate:
container:
resources: {}
image: quay.io/orchestrator/serverless-workflow-mtv-migration:579ccba10961697faa471493e9038d7e6682fc0d
image: quay.io/orchestrator/serverless-workflow-mtv-migration:be3e8e3c8099f475b29a7c67b61c6cb604f8b66c
envFrom:
- secretRef:
name: mtv-migration-creds
Expand Down

0 comments on commit b645c2d

Please sign in to comment.