Skip to content

Commit

Permalink
[CI] Update snapshot worker to use new build images process
Browse files Browse the repository at this point in the history
  • Loading branch information
onobc committed Sep 19, 2023
1 parent 5a2d25e commit 10cc4cf
Showing 1 changed file with 37 additions and 33 deletions.
70 changes: 37 additions & 33 deletions .github/workflows/build-snapshot-worker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,37 +70,41 @@ jobs:
echo BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber=$GITHUB_RUN_NUMBER >> $GITHUB_ENV
echo BUILD_ZOO_HANDLER_spring_cloud_skipper_version=$(mvn help:evaluate -Dexpression=spring-cloud-skipper.version -pl spring-cloud-dataflow-parent -q -DforceStdout) >> $GITHUB_ENV
# build and publish images via composite action
- name: Build and Publish Images
uses: ./.github/actions/build-images
with:
version: ${{ env.BUILD_ZOO_HANDLER_spring_cloud_dataflow_version }}
dockerhub-username: ${{ secrets.DOCKERHUB_USERNAME }}
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
GCR_JSON_KEY: ${{ secrets.GCR_JSON_KEY }}

# zoo success
- name: Notify Build Success Zoo Handler Controller
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "build-succeed"
}
images:
name: Build and Publish Images
needs: [ build ]
uses: ./.github/workflows/build-images.yml
with:
version: ${{ env.BUILD_ZOO_HANDLER_spring_cloud_dataflow_version }}
secrets:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_TOKEN: ${{ secrets.DOCKERHUB_TOKEN }}
GCR_JSON_KEY: ${{ secrets.GCR_JSON_KEY }}

# zoo failure
- name: Notify Build Failure Zoo Handler Controller
if: ${{ failure() }}
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "build-failed",
"message": "spring-cloud-dataflow failed"
}
# clean m2 cache
- name: Clean cache
run: |
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr
wrap:
needs: [ build, images ]
steps:
# zoo success
- name: Notify Build Success Zoo Handler Controller
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "build-succeed"
}
# zoo failure
- name: Notify Build Failure Zoo Handler Controller
if: ${{ failure() }}
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.SCDF_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "build-failed",
"message": "spring-cloud-dataflow failed"
}
# clean m2 cache
- name: Clean cache
run: |
find ~/.m2/repository -type d -name '*SNAPSHOT' | xargs rm -fr

0 comments on commit 10cc4cf

Please sign in to comment.