Skip to content

Commit

Permalink
Update workflows with Gradle Enterprise credentials
Browse files Browse the repository at this point in the history
Only workflows that do not build PRs have been configured with
credentials.
  • Loading branch information
erichaagdev committed Aug 16, 2023
1 parent 928bcb2 commit eed8fec
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .github/workflows/ci-boot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ jobs:
java-version: ${{ matrix.java }}
- name: Build boot ${{ matrix.boot }} java ${{ matrix.java }}
run: ./gradlew clean build -PspringBootVersion=${{ matrix.boot }}
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
- name: Tar Build Logs
if: ${{ failure() }}
run: |
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
java-version: ${{ matrix.java }}
- name: Build with Gradle
run: ./gradlew clean build
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
- name: Tar Build Logs
if: ${{ failure() }}
run: |
Expand Down Expand Up @@ -79,7 +83,10 @@ jobs:
- name: Build and Publish Snapshot
run: |
jf gradle clean build -x test artifactoryPublish
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
# publish build info so that we can see it in artifactory "builds"
- name: Publish Build Info
run: |
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/release-ga.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,21 @@ jobs:
run: |
jf gradle releaseVersion
echo PROJECT_VERSION=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}') >> $GITHUB_ENV
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
# build and publish to staging repo.
# we've allready tested with snapshots so no need to test
# with a release build as we are not a release train.
- name: Build and Publish
run: |
jf gradle clean build artifactoryPublish
jf rt build-publish
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
# we've now done a release build, branch and tag it in github
- name: Tag Release
uses: jvalkeal/[email protected]
Expand Down Expand Up @@ -100,6 +108,10 @@ jobs:
- name: Switch to Next Dev Version
run: |
jf gradle nextVersion
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
- uses: jvalkeal/[email protected]
with:
commit-changes-branch: main
Expand Down
8 changes: 8 additions & 0 deletions .github/workflows/release-milestone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,21 @@ jobs:
run: |
jf gradle milestoneVersion -PstatemachineMilestone=${{ github.event.inputs.milestone }}
echo PROJECT_VERSION=$(cat gradle.properties | grep "version=" | awk -F'=' '{print $2}') >> $GITHUB_ENV
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
# build and publish to staging repo.
# we've allready tested with snapshots so no need to test
# with a release build as we are not a release train.
- name: Build and Publish
run: |
jf gradle clean build artifactoryPublish
jf rt build-publish
env:
GRADLE_ENTERPRISE_CACHE_USERNAME: ${{ secrets.GRADLE_ENTERPRISE_CACHE_USER }}
GRADLE_ENTERPRISE_CACHE_PASSWORD: ${{ secrets.GRADLE_ENTERPRISE_CACHE_PASSWORD }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_SECRET_ACCESS_KEY }}
# we've now done a release build, branch and tag it in github
- name: Tag Release
uses: jvalkeal/[email protected]
Expand Down

0 comments on commit eed8fec

Please sign in to comment.