-
Notifications
You must be signed in to change notification settings - Fork 583
60 lines (56 loc) · 2.21 KB
/
promote-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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"
}