-
Notifications
You must be signed in to change notification settings - Fork 110
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84ba420
commit ee4e437
Showing
7 changed files
with
161 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Release PerfTest | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Evaluate release type | ||
run: ci/evaluate-release.sh | ||
- name: Set up JDK | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: 'temurin' | ||
java-version: '11' | ||
cache: 'maven' | ||
server-id: ${{ env.maven_server_id }} | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
- name: Release PerfTest (GA) | ||
if: ${{ env.ga_release == 'true' }} | ||
run: | | ||
git config user.name "rabbitmq-ci" | ||
git config user.email "rabbitmq-ci@users.noreply.github.com" | ||
ci/release-perf-test.sh | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} | ||
- name: Release PerfTest (Milestone/RC) | ||
if: ${{ env.ga_release != 'true' }} | ||
run: | | ||
git config user.name "rabbitmq-ci" | ||
git config user.email "rabbitmq-ci@users.noreply.github.com" | ||
ci/release-perf-test.sh | ||
env: | ||
MAVEN_USERNAME: '' | ||
MAVEN_PASSWORD: ${{ secrets.PACKAGECLOUD_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: Push to GitHub Release (GA) | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: packages/* | ||
name: ${{ env.release_name }} | ||
tag_name: ${{ env.tag_name }} | ||
target_commitish: ${{ env.release_branch }} | ||
prerelease: ${{ env.prerelease }} | ||
token: ${{ secrets.CI_GITHUB_TOKEN }} | ||
repository: rabbitmq/rabbitmq-perf-test | ||
- name: Trigger Perf Test Docker image build (GA) | ||
uses: peter-evans/repository-dispatch@v2 | ||
if: ${{ env.ga_release == 'true' }} | ||
with: | ||
event-type: new_snapshot | ||
client-payload: >- | ||
{"archive_url" : "https://github.com/rabbitmq/rabbitmq-perf-test/releases/download/${{ env.tag_name }}/perf-test-${{ env.release_version}}.jar", | ||
"tags": "pivotalrabbitmq/perf-test:latest,pivotalrabbitmq/perf-test:${{ env.release_version }}"} | ||
- name: Trigger Perf Test Docker image build (Milestone/RC) | ||
uses: peter-evans/repository-dispatch@v2 | ||
if: ${{ env.ga_release != 'true' }} | ||
with: | ||
event-type: new_snapshot | ||
client-payload: >- | ||
{"archive_url" : "https://github.com/rabbitmq/rabbitmq-perf-test/releases/download/${{ env.tag_name }}/perf-test-${{ env.release_version}}.jar", | ||
"tags": "pivotalrabbitmq/perf-test:${{ env.release_version }}"} | ||
- name: Generate documentation | ||
run: | | ||
rm -rf target/generated-docs | ||
make doc | ||
- name: Publish documentation to GitHub Pages | ||
run: | | ||
git config user.name "rabbitmq-ci" | ||
git config user.email "rabbitmq-ci@users.noreply.github.com" | ||
ci/publish-documentation-to-github-pages.sh | ||
- name: Prepare worker | ||
if: ${{ env.ga_release == 'true' }} | ||
run: | | ||
mkdir ci/worker/public | ||
cp target/generated-docs/index.html ci/worker/public | ||
- name: Publish documentation to Cloudflare (GA) | ||
uses: cloudflare/wrangler-action@v3.1.1 | ||
if: ${{ env.ga_release == 'true' }} | ||
with: | ||
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||
preCommands: npm i -D @cloudflare/kv-asset-handler | ||
command: deploy --name perftest --route https://perftest.rabbitmq.com/* | ||
workingDirectory: 'ci/worker' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
source ./release-versions.txt | ||
|
||
if [[ $RELEASE_VERSION == *[RCM]* ]] | ||
then | ||
echo "prerelease=true" >> $GITHUB_ENV | ||
echo "ga_release=false" >> $GITHUB_ENV | ||
echo "maven_server_id=packagecloud-rabbitmq-maven-milestones" >> $GITHUB_ENV | ||
else | ||
echo "prerelease=false" >> $GITHUB_ENV | ||
echo "ga_release=true" >> $GITHUB_ENV | ||
echo "maven_server_id=ossrh" >> $GITHUB_ENV | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
source ./release-versions.txt | ||
git checkout $RELEASE_BRANCH | ||
|
||
./mvnw release:clean release:prepare -DdryRun=true -Darguments="-DskipTests" --no-transfer-progress \ | ||
--batch-mode -Dtag="v$RELEASE_VERSION" \ | ||
-DreleaseVersion=$RELEASE_VERSION \ | ||
-DdevelopmentVersion=$DEVELOPMENT_VERSION \ | ||
|
||
./mvnw release:clean release:prepare -Darguments="-DskipTests" --no-transfer-progress \ | ||
--batch-mode -Dtag="v$RELEASE_VERSION" \ | ||
-DreleaseVersion=$RELEASE_VERSION \ | ||
-DdevelopmentVersion=$DEVELOPMENT_VERSION | ||
|
||
git checkout "v$RELEASE_VERSION" | ||
|
||
if [[ $RELEASE_VERSION == *[RCM]* ]] | ||
then | ||
MAVEN_PROFILE="milestone" | ||
else | ||
MAVEN_PROFILE="release" | ||
fi | ||
|
||
./mvnw clean deploy -P $MAVEN_PROFILE -DskipTests --no-transfer-progress |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters