-
Notifications
You must be signed in to change notification settings - Fork 110
76 lines (73 loc) · 2.86 KB
/
publish-perf-test.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
name: Publish PerfTest
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '21'
cache: 'maven'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish snapshot
run: ./mvnw clean deploy -Psnapshots -DskipITs -DskipTests --no-transfer-progress
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Package Perf Test
run: ci/package-perf-test.sh
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Delete old releases
uses: docker://rabbitmqdevenv/delete-release-action:latest
with:
repository: rabbitmq/rabbitmq-java-tools-binaries-dev
token: ${{ secrets.CI_GITHUB_TOKEN }}
tag-filter: '^v-rabbitmq-perf-test-.*-[0-9]{8}-[0-9]{6}$'
keep-last-n: 2
- name: Push to GitHub Release
uses: softprops/[email protected]
with:
files: packages/*
name: ${{ env.release_name }}
tag_name: ${{ env.tag_name }}
target_commitish: main
prerelease: true
token: ${{ secrets.CI_GITHUB_TOKEN }}
repository: rabbitmq/rabbitmq-java-tools-binaries-dev
- name: Delete latest release
uses: docker://rabbitmqdevenv/delete-release-action:latest
with:
repository: rabbitmq/rabbitmq-java-tools-binaries-dev
token: ${{ secrets.CI_GITHUB_TOKEN }}
tag-filter: '^v-rabbitmq-perf-test-latest$'
keep-last-n: 0
- name: Make sure latest release is deleted
run: |
sleep 5s
- name: Push to GitHub Release
uses: softprops/[email protected]
with:
files: packages-latest/*
name: rabbitmq-perf-test-latest
tag_name: v-rabbitmq-perf-test-latest
target_commitish: main
prerelease: true
token: ${{ secrets.CI_GITHUB_TOKEN }}
repository: rabbitmq/rabbitmq-java-tools-binaries-dev
- name: Trigger Perf Test Docker image build
uses: peter-evans/repository-dispatch@v3
with:
event-type: new_snapshot
client-payload: >-
{"archive_url" : "https://github.com/rabbitmq/rabbitmq-java-tools-binaries-dev/releases/download/${{ env.tag_name }}/perf-test-${{ env.release_version}}.jar",
"tags": "pivotalrabbitmq/perf-test:dev,pivotalrabbitmq/perf-test:dev-${{ env.release_version }}"}