From 47e2e1099be1b48ed9380e23824fbcf88f456e2f Mon Sep 17 00:00:00 2001 From: gabriel-farache Date: Thu, 18 Jan 2024 09:37:33 +0100 Subject: [PATCH] Use standard event producer --- move2kube/m2k.sw.yml | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/move2kube/m2k.sw.yml b/move2kube/m2k.sw.yml index 0992bf3c..b3a00619 100644 --- a/move2kube/m2k.sw.yml +++ b/move2kube/m2k.sw.yml @@ -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 @@ -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