Skip to content

Commit

Permalink
Develocity Build Validation Scripts repository is updated on release (#…
Browse files Browse the repository at this point in the history
…11)

This PR adds the Develocity Build Validation Scripts repository to the
release workflow.

The BVS build resolves the init script as a dependency and does not
contain an actual copy of it. This is why I needed to make the
`script-location` parameter optional.
  • Loading branch information
erichaagdev authored Nov 6, 2024
2 parents b441b75 + bef37c2 commit f892f05
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@ jobs:

- run: ./gradlew build
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}
12 changes: 11 additions & 1 deletion .github/workflows/gradle-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Generate reference script with version
run: ./gradlew promote -Pversion=${{ inputs.version }}
env:
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_SOLUTIONS_ACCESS_TOKEN }}
DEVELOCITY_ACCESS_KEY: ${{ secrets.DV_SOLUTIONS_ACCESS_KEY }}

- name: Commit & push changes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down Expand Up @@ -103,3 +103,13 @@ jobs:
GH_BOT_GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} # bot-githubaction does not have write access
GH_BOT_PGP_PRIVATE_KEY: ${{ secrets.GH_BOT_PGP_PRIVATE_KEY }}
GH_BOT_PGP_PASSPHRASE: ${{ secrets.GH_BOT_PGP_PASSPHRASE }}

update-develocity-build-validation-scripts:
needs: [update-reference]
uses: ./.github/workflows/gradle-send-update-pr.yml
with:
version: ${{ inputs.version }}
repository: 'gradle/gradle-enterprise-build-validation-scripts'
post-process: |
sed -i 's/com\.gradle:develocity-injection:[^"]*/com.gradle:develocity-injection:${{ inputs.version }}/' build.gradle.kts
secrets: inherit
3 changes: 2 additions & 1 deletion .github/workflows/gradle-send-update-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
required: true
script-location:
type: string
required: true
required: false
post-process:
type: string
required: false
Expand Down Expand Up @@ -48,6 +48,7 @@ jobs:
token: ${{ secrets.GH_BOT_GITHUB_TOKEN }}

- name: Copy reference script
if: ${{ inputs.script-location }}
run: cp reference/develocity-injection.init.gradle ${{ inputs.repository }}/${{ inputs.script-location }}

- name: Post-process target repository
Expand Down

0 comments on commit f892f05

Please sign in to comment.