Skip to content

Commit

Permalink
Use standard event producer
Browse files Browse the repository at this point in the history
  • Loading branch information
gabriel-farache committed Jan 18, 2024
1 parent 16f189f commit 47e2e10
Showing 1 changed file with 16 additions and 17 deletions.
33 changes: 16 additions & 17 deletions move2kube/m2k.sw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ events:
- name: transformationSavedEvent
source: ''
type: transformation_saved
- name: saveTransformation
source: m2k_swf
type: save-transformation
kind: produced
functions:
- name: systemOut
type: custom
Expand Down Expand Up @@ -98,23 +102,18 @@ states:
topic: "Move2Kube Workflow"
transition: SaveTransformationOutput
- name: SaveTransformationOutput
type: operation
actions:
- functionRef:
refName: sendCloudEvent
arguments:
HEADER_Ce-Id: $WORKFLOW.instanceId
HEADER_Ce-Specversion: "1.0"
HEADER_Ce-Type: "save-transformation"
HEADER_Ce-Source: "m2k_swf"
HEADER_Content-Type: "application/json"
gitRepo: '"ssh://" + .repositoryURL'
branch: .targetBranch
token: .token
workspaceId: .workspaceId
projectId: .projectId
transformId: .transformId
workflowCallerId: $WORKFLOW.instanceId
type: inject
data:
gitRepo: '"ssh://" + .repositoryURL'
branch: .targetBranch
token: .token
workspaceId: .workspaceId
projectId: .projectId
transformId: .transformId
workflowCallerId: $WORKFLOW.instanceId
end:
produceEvents:
- eventRef: saveTransformation
transition: WaitForSaveTransformationCompletion
- name: WaitForSaveTransformationCompletion
type: switch
Expand Down

0 comments on commit 47e2e10

Please sign in to comment.