Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-farache committed Oct 1, 2024
1 parent 6b7dc18 commit 4de7271
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 13 deletions.
2 changes: 1 addition & 1 deletion charts/mta-v7.x/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,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: 0.2.37
version: 0.2.38

# 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 @@ -43,6 +43,19 @@ data:
]
}
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
57 changes: 45 additions & 12 deletions charts/mta-v7.x/templates/04-sonataflow_mta-analysis-v7.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -527,16 +527,26 @@ spec:
refName: createNotification
name: NotifyCompletion
transition:
nextState: report
nextState: reportCompletion
type: operation
- actionMode: sequential
actions: null
- data:
result:
completedWith: success
message: '"MTA v7.x analysis completed for " + .repositoryURL'
nextWorkflows:
- id: m2k
name: Move2Kube workflow
output:
- format: link
key: mtaAnalysisResultURL
value: ($SECRET.mta.url + "/hub/applications/" + (.application.id|tostring) + "/analysis/report")
- format: link
key: migrationWaveJiraTicketURL
value: (if .migrationWaveJiraTicket != null then .migrationWaveJiraTicket.link else "" end)
end:
terminate: true
name: report
stateDataFilter:
output: '{recipients: .recipients, mtaAnalysisResultURL: ($SECRET.mta.url + "/hub/applications/" + (.application.id|tostring) + "/analysis/report"), migrationWaveJiraTicketURL: .migrationWaveJiraTicket.link, repositoryURL: .repositoryURL, workflowOptions: {migrationOptions: [{id: "m2k", name: "Move2Kube workflow"}]}}'
type: operation
name: reportCompletion
type: inject
- actionMode: sequential
actions:
- actionDataFilter:
Expand All @@ -554,10 +564,25 @@ spec:
type: entity
invoke: sync
refName: createNotification
end:
terminate: true
name: NotifyMandatoriesIncidentsInApplication
transition:
nextState: reportCompletionWithMandatoriesIncidentsInApplication
type: operation
- data:
result:
completedWith: error
message: '"MTA analysis for " + .application.repository.url + " completed with " + (.application.mandatoriesIncidents|tostring) +" incidents in mandatory issues. Check the analysis report." + (if .migrationWaveJiraTicket != null then " Application was exported to issue manager." else "" end)'
output:
- format: link
key: mtaAnalysisResultURL
value: ($SECRET.mta.url + "/hub/applications/" + (.application.id|tostring) + "/analysis/report")
- format: link
key: migrationWaveJiraTicketURL
value: (if .migrationWaveJiraTicket != null then .migrationWaveJiraTicket.link else "" end)
end:
terminate: true
name: reportCompletionWithMandatoriesIncidentsInApplication
type: inject
- actionMode: sequential
actions:
- actionDataFilter:
Expand All @@ -574,17 +599,25 @@ spec:
type: entity
invoke: sync
refName: createNotification
end:
terminate: true
name: NotifyFailureBackstage
transition:
nextState: reportFailure
type: operation
- data:
result:
completedWith: error
message: '"MTA analysis for " + .application.repository.url + " failed: " + .exitMessage + ". Check logs of task pod: " + .taskgroup.tasks[0].pod'
end:
terminate: true
name: reportFailure
type: inject
timeouts:
workflowExecTimeout:
duration: PT1H
podTemplate:
container:
resources: {}
image: quay.io/orchestrator/serverless-workflow-mta-v7.x:1b229014c6a773cf075c1ef0fd346cfb1fd2d86b
image: quay.io/orchestrator/serverless-workflow-mta-v7.x:d02fa3f568d45ef3c60e86c746aa3dd7d6dca84c
envFrom:
- secretRef:
name: mta-analysis-v7-creds
Expand Down

0 comments on commit 4de7271

Please sign in to comment.