Build Snapshot Controller #13972
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# control workflow which orchestrates manual snapshot builds in | |
# all dataflow repos, aka one click train build. | |
name: Build Snapshot Controller | |
on: | |
workflow_dispatch: | |
inputs: | |
build-zoo-handler: | |
description: 'Build Zoo Handler Payload' | |
required: false | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# initial is when user starts workflow from UI(context is empty) | |
# then train build goes through via repos using defined hander rules | |
- name: Handle Zoo Control | |
uses: jvalkeal/build-zoo-handler@v0.0.4 | |
with: | |
dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }} | |
dispatch-handler-max: 15 | |
dispatch-handler-config: > | |
[ | |
{ | |
"if": "initial == true", | |
"action": "workflow_dispatch", | |
"workflow_dispatch": { | |
"owner": "spring-cloud", | |
"repo": "spring-cloud-deployer", | |
"ref": "2.9.x", | |
"workflow": "build-snapshot-worker.yml" | |
} | |
}, | |
{ | |
"if": "data.event == 'build-succeed' && data.repo == 'spring-cloud-deployer' && data.owner == 'spring-cloud'", | |
"action": "workflow_dispatch", | |
"workflow_dispatch": { | |
"owner": "spring-cloud", | |
"repo": "spring-cloud-dataflow-ui", | |
"ref": "3.4.x", | |
"workflow": "build-snapshot-worker.yml" | |
} | |
}, | |
{ | |
"if": "data.event == 'build-succeed' && data.repo == 'spring-cloud-dataflow-ui' && data.owner == 'spring-cloud'", | |
"action": "workflow_dispatch", | |
"workflow_dispatch": { | |
"owner": "spring-cloud", | |
"repo": "spring-cloud-dataflow", | |
"ref": "2.11.x", | |
"workflow": "build-snapshot-worker.yml" | |
} | |
}, | |
{ | |
"if": "data.event == 'build-succeed' && data.repo == 'spring-cloud-dataflow' && data.owner == 'spring-cloud'", | |
"action": "workflow_dispatch", | |
"workflow_dispatch": { | |
"owner": "spring-cloud", | |
"repo": "spring-cloud-dataflow", | |
"ref": "2.11.x", | |
"workflow": "carvel-worker.yml" | |
} | |
}, | |
{ | |
"if": "data.event == 'build-failed'", | |
"action": "fail", | |
"fail": { | |
"message": "hi, something went wrong" | |
} | |
}, | |
{ | |
"if": "data.event == 'carvel-failed'", | |
"action": "fail", | |
"fail": { | |
"message": "hi, something went wrong with carvel" | |
} | |
} | |
] |