Use short-lived access token to authenticate with Develocity

Closes gh-41120
This commit is contained in:
Andy Wilkinson 2024-06-17 09:34:56 +01:00
parent 2bbeb7e78c
commit 270597e577
3 changed files with 6 additions and 11 deletions

View File

@ -35,15 +35,11 @@ runs:
id: build
if: ${{ inputs.publish == 'false' }}
shell: bash
env:
DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }}
run: ./gradlew build
- name: Publish
id: publish
if: ${{ inputs.publish == 'true' }}
shell: bash
env:
DEVELOCITY_ACCESS_KEY: ${{ inputs.develocity-access-key }}
run: ./gradlew -PdeploymentRepository=$(pwd)/deployment-repository ${{ !startsWith(github.event.head_commit.message, 'Next development version') && 'build' || '' }} publishAllPublicationsToDeploymentRepository
- name: Read Version From gradle.properties
id: read-version

View File

@ -9,6 +9,9 @@ inputs:
required: false
default: false
description: 'Whether a Java toolchain should be used'
develocity-access-key:
required: false
description: 'The access key for authentication with ge.spring.io'
runs:
using: composite
steps:
@ -28,6 +31,7 @@ runs:
uses: gradle/actions/setup-gradle@31ae3562f68c96d481c31bc1a8a55cc1be162f83 # v3.4.1
with:
cache-read-only: false
develocity-access-key: ${{ inputs.develocity-access-key }}
- name: Configure Gradle Properties
shell: bash
run: |

View File

@ -23,18 +23,13 @@ jobs:
- name: Prepare Gradle Build
uses: ./.github/actions/prepare-gradle-build
with:
develocity-access-key: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
java-version: ${{ matrix.java.version }}
java-toolchain: ${{ matrix.java.toolchain }}
- name: Run System Tests
id: run-system-tests
shell: bash
env:
GRADLE_ENTERPRISE_URL: 'https://ge.spring.io'
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
run: |
./gradlew systemTest
run: ./gradlew systemTest
- name: Send Notification
uses: ./.github/actions/send-notification
if: always()