forked from spring-cloud/spring-cloud-dataflow
-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (76 loc) · 3 KB
/
central-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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Central Release
on:
workflow_dispatch:
inputs:
build-zoo-handler:
description: 'Build Zoo Handler Payload'
required: true
jobs:
central:
runs-on: ubuntu22-8-32-OSS
environment: central
steps:
# to get spec file in .github
- uses: actions/checkout@v4
- uses: jfrog/setup-jfrog-cli@v3
env:
JF_URL: 'https://repo.spring.io'
JF_ENV_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
# Download released files
- name: Download Release Files
run: |
jfrog rt download \
--spec .github/release-files-spec.json \
--spec-vars "buildname=$BUILD_ZOO_HANDLER_spring_cloud_deployer_buildname;buildnumber=$BUILD_ZOO_HANDLER_spring_cloud_deployer_buildnumber"
jfrog rt download \
--spec .github/release-files-spec.json \
--spec-vars "buildname=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildname;buildnumber=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_ui_buildnumber"
jfrog rt download \
--spec .github/release-files-spec.json \
--spec-vars "buildname=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildname;buildnumber=$BUILD_ZOO_HANDLER_spring_cloud_dataflow_buildnumber"
# Create checksums, signatures and create staging repo on central and upload
- uses: jvalkeal/nexus-sync@v0
with:
url: ${{ secrets.OSSRH_URL }}
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
create: true
upload: true
close: true
release: true
generate-checksums: true
pgp-sign: true
pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_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": "central-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": "central-failed"
}