diff --git a/.github/actions/build/action.yml b/.github/actions/build/action.yml index 39adc65be1c7..6f0eb165b5f3 100644 --- a/.github/actions/build/action.yml +++ b/.github/actions/build/action.yml @@ -24,6 +24,18 @@ inputs: develocity-access-key: required: false description: 'The access key for authentication with ge.spring.io' + commercial-repository-username: + required: false + description: 'Username for authentication with the commercial repository' + commercial-repository-password: + required: false + description: 'Password for authentication with the commercial repository' + commercial-release-repository-url: + required: false + description: 'URL of the release repository' + commercial-snapshot-repository-url: + required: false + description: 'URL of the snapshot repository' outputs: build-scan-url: description: 'The URL, if any, of the build scan produced by the build' @@ -46,11 +58,21 @@ runs: id: build if: ${{ inputs.publish == 'false' }} shell: bash + env: + COMMERCIAL_REPO_USERNAME: ${{ inputs.commercial-repository-username }} + COMMERCIAL_REPO_PASSWORD: ${{ inputs.commercial-repository-password }} + COMMERCIAL_RELEASE_REPO_URL: ${{ inputs.commercial-release-repository-url }} + COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }} run: ./gradlew build - name: Publish id: publish if: ${{ inputs.publish == 'true' }} shell: bash + env: + COMMERCIAL_REPO_USERNAME: ${{ inputs.commercial-repository-username }} + COMMERCIAL_REPO_PASSWORD: ${{ inputs.commercial-repository-password }} + COMMERCIAL_RELEASE_REPO_URL: ${{ inputs.commercial-release-repository-url }} + COMMERCIAL_SNAPSHOT_REPO_URL: ${{ inputs.commercial-snapshot-repository-url }} 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 diff --git a/.github/workflows/build-and-deploy-snapshot.yml b/.github/workflows/build-and-deploy-snapshot.yml index b6a512dc5706..d09dd9450dc3 100644 --- a/.github/workflows/build-and-deploy-snapshot.yml +++ b/.github/workflows/build-and-deploy-snapshot.yml @@ -19,6 +19,10 @@ jobs: with: develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} publish: true + commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} + commercial-repository-password: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_PASSWORD }} + commercial-release-repository-url: ${{ vars.COMMERCIAL_RELEASE_REPO_URL }} + commercial-snapshot-repository-url: ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }} - name: Deploy uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 with: @@ -57,8 +61,10 @@ jobs: uses: ./.github/workflows/verify.yml secrets: google-chat-webhook-url: ${{ secrets.GOOGLE_CHAT_WEBHOOK_URL }} - repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }} - repository-username: ${{ secrets.ARTIFACTORY_USERNAME }} + opensource-repository-password: ${{ secrets.ARTIFACTORY_PASSWORD }} + opensource-repository-username: ${{ secrets.ARTIFACTORY_USERNAME }} + commercial-repository-password: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_PASSWORD }} + commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} token: ${{ secrets.GH_ACTIONS_REPO_TOKEN }} with: version: ${{ needs.build-and-deploy-snapshot.outputs.version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61bf9d7c3a71..e0cd925cf1d7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,6 +50,10 @@ jobs: java-toolchain: ${{ matrix.java.toolchain }} java-distribution: ${{ matrix.java.distribution }} develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} + commercial-repository-password: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_PASSWORD }} + commercial-release-repository-url: ${{ vars.COMMERCIAL_RELEASE_REPO_URL }} + commercial-snapshot-repository-url: ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }} - name: Send Notification uses: ./.github/actions/send-notification if: always() diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4fa46630804d..6f4de2faae01 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -19,6 +19,10 @@ jobs: with: develocity-access-key: ${{ secrets.DEVELOCITY_ACCESS_KEY }} publish: true + commercial-repository-username: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_USERNAME }} + commercial-repository-password: ${{ secrets.COMMERCIAL_ARTIFACTORY_RO_PASSWORD }} + commercial-release-repository-url: ${{ vars.COMMERCIAL_RELEASE_REPO_URL }} + commercial-snapshot-repository-url: ${{ vars.COMMERCIAL_SNAPSHOT_REPO_URL }} - name: Stage Release uses: spring-io/artifactory-deploy-action@26bbe925a75f4f863e1e529e85be2d0093cac116 # v0.0.1 with: diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml index ca8b9fb09ef9..668d45ef08e6 100644 --- a/.github/workflows/verify.yml +++ b/.github/workflows/verify.yml @@ -10,9 +10,13 @@ on: default: false type: boolean secrets: - repository-username: + opensource-repository-username: required: false - repository-password: + opensource-repository-password: + required: false + commercial-repository-username: + required: false + commercial-repository-password: required: false google-chat-webhook-url: required: true @@ -55,8 +59,10 @@ jobs: RVT_VERSION: ${{ inputs.version }} RVT_RELEASE_TYPE: oss RVT_STAGING: ${{ inputs.staging }} - RVT_OSS_REPOSITORY_USERNAME: ${{ secrets.repository-username }} - RVT_OSS_REPOSITORY_PASSWORD: ${{ secrets.repository-password }} + RVT_OSS_REPOSITORY_USERNAME: ${{ secrets.opensource-repository-username }} + RVT_OSS_REPOSITORY_PASSWORD: ${{ secrets.opensource-repository-password }} + RVT_COMMERCIAL_REPOSITORY_USERNAME: ${{ secrets.commercial-repository-username }} + RVT_COMMERCIAL_REPOSITORY_PASSWORD: ${{ secrets.commercial-repository-password }} run: ./gradlew spring-boot-release-verification-tests:test - name: Upload Build Reports on Failure uses: actions/upload-artifact@v4 diff --git a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeBom.java b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeBom.java index 9b734cff78a6..1865f97c30a0 100644 --- a/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeBom.java +++ b/buildSrc/src/main/java/org/springframework/boot/build/bom/bomr/UpgradeBom.java @@ -53,7 +53,7 @@ private void addOpenSourceRepositories() { private void addCommercialRepositories() { getRepositoryNames().addAll(ArtifactRepositoryContainer.DEFAULT_MAVEN_CENTRAL_REPO_NAME, - "spring-commerical-release"); + "spring-commercial-release"); } @Override