Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java: fix CI job for testing Maven Deployment #2319

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 14 additions & 11 deletions .github/workflows/java-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -221,16 +221,10 @@ jobs:
fail-fast: false
matrix:
host: ${{ fromJson(needs.load-platform-matrix.outputs.PLATFORM_MATRIX) }}

runs-on: ${{ matrix.host.RUNNER }}
steps:
- name: Start Valkey server
uses: ./.github/actions/install-valkey
with:
engine-version: "7.2.5"
target: ${{ matrix.host.TARGET }}

- uses: actions/checkout@v4
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -244,6 +238,7 @@ jobs:
uses: ./.github/workflows/install-shared-dependencies
with:
os: ${{ matrix.host.OS }}
engine-version: "7.2.5"
target: ${{ matrix.host.TARGET }}
github-token: ${{ secrets.GITHUB_TOKEN }}

Expand All @@ -253,17 +248,26 @@ jobs:
version: "26.1"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Start standalone Valkey server
working-directory: utils
id: port
run: |
PORT=$(python3 ./cluster_manager.py start -r 0 2>&1 | grep CLUSTER_NODES | cut -d = -f 2 | cut -d , -f 1 | cut -d : -f 2)
echo "PORT=$PORT" >> $GITHUB_OUTPUT

- name: Test deployment
working-directory: java
env:
PORT: ${{ steps.port.outputs.PORT }}
run: |
export ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderName="Authorization"
export ORG_GRADLE_PROJECT_centralManualTestingAuthHeaderValue="Bearer $(echo "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" | base64)"
export GLIDE_RELEASE_VERSION=${{ env.RELEASE_VERSION }}
./gradlew :benchmarks:run --args="--minimal --clients glide"
./gradlew :benchmarks:run --args="--minimal --clients glide --port ${{ env.PORT }}"

publish-release-to-maven:
if: ${{ inputs.maven_publish == true || github.event_name == 'push' }}
needs: [test-deployment-on-all-architectures]
needs: [publish-to-maven-central-deployment, test-deployment-on-all-architectures]
runs-on: ubuntu-latest
environment: AWS_ACTIONS
env:
Expand All @@ -287,4 +291,3 @@ jobs:
curl --request DELETE \
-u "${{ secrets.CENTRAL_TOKEN_USERNAME }}:${{ secrets.CENTRAL_TOKEN_PASSWORD }}" \
"https://central.sonatype.com/api/v1/publisher/deployment/${{ env.DEPLOYMENT_ID }}"

Loading