Skip to content

Commit

Permalink
Merge pull request #21 from parodos-dev/feat/demo_changes
Browse files Browse the repository at this point in the history
Change how event is sent and replace protocol prefix in workflow for MTA compliance
  • Loading branch information
gabriel-farache authored Jan 18, 2024
2 parents 16f189f + e955520 commit b9ed5f0
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 19 deletions.
35 changes: 17 additions & 18 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 @@ -39,7 +43,7 @@ states:
arguments:
workspace-id: ".workspaceId"
project-id: ".projectId"
remote-source: "\"git+ssh://\" + .repositoryURL + \"@\" + .sourceBranch"
remote-source: "\"git+\" + (.repositoryURL|sub(\"http(s)://?\";\"ssh://\")) + \"@\" + .sourceBranch"
transition: GetPlanning
- name: GetPlanning
type: operation
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: (.repositoryURL|sub(\"http(s)?://\";\"ssh://\"))
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
2 changes: 1 addition & 1 deletion move2kube/schemas/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"description": "the git repository URL to be used",
"type": "string",
"examples": [
"bitbucket.org/gfarache31/m2k-test"
"https://bitbucket.org/gfarache31/m2k-test"
]
},
"sourceBranch": {
Expand Down

0 comments on commit b9ed5f0

Please sign in to comment.