Skip to content

Commit

Permalink
Use env configuration to set Gradle Enterprise access key in CI builds
Browse files Browse the repository at this point in the history
  • Loading branch information
clayburn committed May 3, 2023
1 parent a22700d commit eec8562
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 106 deletions.
35 changes: 0 additions & 35 deletions .github/actions/gradle-enterprise/action.yml

This file was deleted.

6 changes: 1 addition & 5 deletions .github/workflows/ci-maven-cache-update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
name: Update Maven dependency cache for ${{ matrix.name }}
env:
JOB_NAME: Update Maven dependency cache for ${{ matrix.name }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
runs-on: ${{ matrix.runs-on }}
timeout-minutes: 45

Expand Down Expand Up @@ -77,11 +78,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Detect changed files
if: ${{ github.event_name != 'schedule' }}
id: changes
Expand Down
7 changes: 1 addition & 6 deletions .github/workflows/ci-owasp-dependency-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ jobs:
name: Check ${{ matrix.branch }}
env:
JOB_NAME: Check ${{ matrix.branch }}
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
runs-on: ubuntu-20.04
timeout-minutes: 45
strategy:
Expand All @@ -57,12 +58,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
if: ${{ matrix.branch == 'master' }}
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Cache local Maven repository
uses: actions/cache@v3
timeout-minutes: 5
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pulsar-ci-flaky.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
env:
JOB_NAME: Flaky tests suite
COLLECT_COVERAGE: "${{ needs.preconditions.outputs.collect_coverage }}"
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
runs-on: ubuntu-20.04
timeout-minutes: 100
if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
Expand All @@ -104,11 +105,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down
68 changes: 13 additions & 55 deletions .github/workflows/pulsar-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
name: Build and License check
env:
JOB_NAME: Build and License check
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
runs-on: ubuntu-20.04
timeout-minutes: 60
if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
Expand All @@ -105,11 +106,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -175,6 +171,7 @@ jobs:
env:
JOB_NAME: CI - Unit - ${{ matrix.name }}
COLLECT_COVERAGE: "${{ needs.preconditions.outputs.collect_coverage }}"
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
runs-on: ubuntu-20.04
timeout-minutes: ${{ matrix.timeout || 60 }}
needs: ['preconditions', 'build-and-license-check']
Expand Down Expand Up @@ -211,11 +208,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -391,18 +383,15 @@ jobs:
timeout-minutes: 60
needs: ['preconditions', 'build-and-license-check']
if: ${{ needs.preconditions.outputs.docs_only != 'true'}}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -469,6 +458,7 @@ jobs:
env:
JOB_NAME: CI - Integration - ${{ matrix.name }}
PULSAR_TEST_IMAGE_NAME: apachepulsar/java-test-image:latest
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -513,11 +503,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -721,11 +706,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Install gh-actions-artifact-client.js
uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master

Expand All @@ -739,18 +719,15 @@ jobs:
timeout-minutes: 60
needs: ['preconditions', 'build-and-license-check']
if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -851,6 +828,7 @@ jobs:
env:
JOB_NAME: CI - System - ${{ matrix.name }}
PULSAR_TEST_IMAGE_NAME: apachepulsar/pulsar-test-latest-version:latest
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -886,11 +864,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -1081,6 +1054,7 @@ jobs:
env:
JOB_NAME: CI Flaky - System - ${{ matrix.name }}
PULSAR_TEST_IMAGE_NAME: apachepulsar/pulsar-test-latest-version:latest
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
strategy:
fail-fast: false
matrix:
Expand All @@ -1098,11 +1072,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -1208,11 +1177,6 @@ jobs:
- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Install gh-actions-artifact-client.js
uses: apache/pulsar-test-infra/gh-actions-artifact-client/dist@master

Expand All @@ -1226,18 +1190,15 @@ jobs:
timeout-minutes: 120
needs: ['preconditions', 'integration-tests']
if: ${{ needs.preconditions.outputs.docs_only != 'true' }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Cache Maven dependencies
uses: actions/cache@v3
timeout-minutes: 5
Expand All @@ -1264,18 +1225,15 @@ jobs:
timeout-minutes: 120
needs: [ 'preconditions', 'integration-tests' ]
if: ${{ needs.preconditions.outputs.need_owasp == 'true' }}
env:
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
steps:
- name: checkout
uses: actions/checkout@v3

- name: Tune Runner VM
uses: ./.github/actions/tune-runner-vm

- name: Configure Gradle Enterprise
uses: ./.github/actions/gradle-enterprise
with:
token: ${{ secrets.GE_ACCESS_TOKEN }}

- name: Setup ssh access to build runner VM
# ssh access is enabled for builds in own forks
if: ${{ github.repository != 'apache/pulsar' && github.event_name == 'pull_request' }}
Expand Down

0 comments on commit eec8562

Please sign in to comment.