Skip to content

Promote Release

Promote Release #26

name: Promote Release
on:
workflow_dispatch:
inputs:
build-zoo-handler:
description: 'Build Zoo Handler Payload'
required: true
jobs:
promote:
runs-on: ubuntu-latest
environment: promote
steps:
# need repo to push release branch and a tag
- uses: actions/checkout@v2
- uses: jfrog/setup-jfrog-cli@v1
with:
version: 1.46.4
env:
JF_ARTIFACTORY_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
# zoo extract and ensure
- name: Extract Zoo Context Properties
uses: jvalkeal/[email protected]
with:
dispatch-handler-extract-context-properties: true
ensure-env: |
BUILD_ZOO_HANDLER_spring_cloud_deployer_buildname
BUILD_ZOO_HANDLER_spring_cloud_deployer_buildnumber
BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname
BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildnumber
BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname
BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber
# promoting build from staging repo into release
- name: Promote Build
run: |
jfrog rt build-promote $BUILD_ZOO_HANDLER_spring_cloud_deployer_buildname $BUILD_ZOO_HANDLER_spring_cloud_deployer_buildnumber libs-release-local
jfrog rt build-promote $BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname $BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildnumber libs-release-local
jfrog rt build-promote $BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname $BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber libs-release-local
# 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": "promote-succeed"
}
# zoo failure
- name: Notify Build Failure Zoo Handler Controller
if: ${{ failure() }}
uses: jvalkeal/[email protected]
with:
dispatch-handler-token: ${{ secrets.REPO_ACCESS_TOKEN }}
dispatch-handler-client-payload-data: >
{
"event": "promotion-failed"
}