Skip to content

Commit fcf6367

Browse files
committed
Add verification step for deployments
Closes gh-1473
1 parent 1d086fa commit fcf6367

File tree

3 files changed

+101
-0
lines changed

3 files changed

+101
-0
lines changed

.github/workflows/build-and-deploy-snapshot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,14 @@ jobs:
4343
webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
4444
outputs:
4545
version: ${{ steps.build-and-publish.outputs.version }}
46+
verify:
47+
name: Verify
48+
needs: build-and-deploy-snapshot
49+
uses: ./.github/workflows/verify.yml
50+
secrets:
51+
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
52+
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
53+
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
54+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
55+
with:
56+
version: ${{ needs.build-and-deploy-snapshot.outputs.version }}

.github/workflows/release.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,23 @@ jobs:
3434
username: ${{ secrets.ARTIFACTORY_USERNAME }}
3535
outputs:
3636
version: ${{ steps.build-and-publish.outputs.version }}
37+
verify:
38+
name: Verify
39+
needs: build-and-stage-release
40+
uses: ./.github/workflows/verify.yml
41+
secrets:
42+
google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }}
43+
repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }}
44+
repository-username: ${{ secrets.ARTIFACTORY_USERNAME }}
45+
token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }}
46+
with:
47+
staging: true
48+
version: ${{ needs.build-and-stage-release.outputs.version }}
3749
sync-to-maven-central:
3850
name: Sync to Maven Central
3951
needs:
4052
- build-and-stage-release
53+
- verify
4154
runs-on: ubuntu-latest
4255
steps:
4356
- name: Check Out Code

.github/workflows/verify.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Verify
2+
on:
3+
workflow_call:
4+
inputs:
5+
staging:
6+
description: 'Whether the release to verify is in the staging repository'
7+
required: false
8+
default: false
9+
type: boolean
10+
version:
11+
description: 'Version to verify'
12+
required: true
13+
type: string
14+
secrets:
15+
google-chat-webhook-url:
16+
description: 'Google Chat Webhook URL'
17+
required: true
18+
repository-password:
19+
description: 'Password for authentication with the repository'
20+
required: false
21+
repository-username:
22+
description: 'Username for authentication with the repository'
23+
required: false
24+
token:
25+
description: 'Token to use for authentication with GitHub'
26+
required: true
27+
jobs:
28+
verify:
29+
name: Verify
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Check Out Release Verification Tests
33+
uses: actions/checkout@v4
34+
with:
35+
ref: 'cbe06d1b44f4bb5a094d516e59680e61a89e30aa'
36+
repository: spring-projects/spring-ws-release-verification
37+
token: ${{ secrets.token }}
38+
- name: Check Out Send Notification Action
39+
uses: actions/checkout@v4
40+
with:
41+
path: send-notification
42+
sparse-checkout: .github/actions/send-notification
43+
- name: Set Up Java
44+
uses: actions/setup-java@v4
45+
with:
46+
distribution: 'liberica'
47+
java-version: 17
48+
- name: Set Up Gradle
49+
uses: gradle/actions/setup-gradle@0bdd871935719febd78681f197cd39af5b6e16a6 # v4.2.2
50+
with:
51+
cache-read-only: false
52+
- name: Configure Gradle Properties
53+
shell: bash
54+
run: |
55+
mkdir -p $HOME/.gradle
56+
echo 'org.gradle.daemon=false' >> $HOME/.gradle/gradle.properties
57+
- name: Run Release Verification Tests
58+
env:
59+
RVT_OSS_REPOSITORY_PASSWORD: ${{ secrets.repository-password }}
60+
RVT_OSS_REPOSITORY_USERNAME: ${{ secrets.repository-username }}
61+
RVT_RELEASE_TYPE: oss
62+
RVT_STAGING: ${{ inputs.staging }}
63+
RVT_VERSION: ${{ inputs.version }}
64+
run: ./gradlew spring-ws-release-verification-tests:test
65+
- name: Upload Build Reports on Failure
66+
if: failure()
67+
uses: actions/upload-artifact@v4
68+
with:
69+
name: build-reports
70+
path: '**/build/reports/'
71+
- name: Send Notification
72+
if: failure()
73+
uses: ./send-notification/.github/actions/send-notification
74+
with:
75+
run-name: ${{ format('{0} | Verification | {1}', github.ref_name, inputs.version) }}
76+
status: ${{ job.status }}
77+
webhook-url: ${{ secrets.google-chat-webhook-url }}

0 commit comments

Comments
 (0)