From 3301e371083b99a774b59e140b2465c3c10e9067 Mon Sep 17 00:00:00 2001 From: Inaki Villar Date: Wed, 12 Jun 2024 08:56:20 -0700 Subject: [PATCH] remove empty line --- .../workflows/integ-test-caching-confiw.yml | 98 +++++++++++++++++++ .../integ-test-inject-develocity.yml | 1 - 2 files changed, 98 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/integ-test-caching-confiw.yml diff --git a/.github/workflows/integ-test-caching-confiw.yml b/.github/workflows/integ-test-caching-confiw.yml new file mode 100644 index 0000000..6b7f02c --- /dev/null +++ b/.github/workflows/integ-test-caching-confiw.yml @@ -0,0 +1,98 @@ +name: Test detect java toolchains + +on: + workflow_call: + inputs: + cache-key-prefix: + type: string + runner-os: + type: string + default: '["ubuntu-latest", "windows-latest", "macos-latest"]' + skip-dist: + type: boolean + default: false + +env: + SKIP_DIST: ${{ inputs.skip-dist }} + GRADLE_BUILD_ACTION_CACHE_KEY_PREFIX: injection--${{ inputs.cache-key-prefix }} + +env: + SKIP_DIST: ${{ inputs.skip-dist }} + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + +jobs: + seed-build: + strategy: + fail-fast: false + matrix: + os: ${{fromJSON(inputs.runner-os)}} + runs-on: ${{ matrix.os }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Initialize integ-test + uses: ./.github/actions/init-integ-test + + - name: Setup Gradle + uses: ./setup-gradle + with: + develocity-url: "https://ge.solutions-team.gradle.com/" + develocity-plugin-version: "3.17.1" + develocity-injection-enabled: true + + + - name: Build using Gradle wrapper + id: gradle + working-directory: .github/workflow-samples/java-toolchain + run: | + echo "${{ env.DEVELOCITY_PLUGIN_VERSION }}" + ./gradlew help + + - name: Check Build Scan url is captured + if: ${{ !steps.gradle.outputs.build-scan-url }} + uses: actions/github-script@v7 + with: + script: | + core.setFailed('No Build Scan detected') + + + inject-develocity-with-access-key-with-input-actions-and-wrapper: + env: + DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }} + strategy: + fail-fast: false + matrix: + gradle: [current] + os: ${{fromJSON(inputs.runner-os)}} + plugin-version: [3.16.2, 3.17.4] + runs-on: ${{ matrix.os }} + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Initialize integ-test + uses: ./.github/actions/init-integ-test + - name: Setup Java + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: 8 + - name: Setup Gradle + id: setup-gradle + uses: ./setup-gradle + with: + cache-read-only: false # For testing, allow writing cache entries on non-default branches + gradle-version: ${{ matrix.gradle }} + develocity-injection-enabled: true + develocity-url: 'https://ge.solutions-team.gradle.com' + develocity-plugin-version: ${{ matrix.plugin-version }} + - name: Build using Gradle wrapper + id: gradle + working-directory: .github/workflow-samples/java-toolchain + run: | + ./gradlew help + - name: Check Build Scan url is captured + if: ${{ !steps.gradle.outputs.build-scan-url }} + uses: actions/github-script@v7 + with: + script: | + core.setFailed('No Build Scan detected') diff --git a/.github/workflows/integ-test-inject-develocity.yml b/.github/workflows/integ-test-inject-develocity.yml index 0933882..d6505d5 100644 --- a/.github/workflows/integ-test-inject-develocity.yml +++ b/.github/workflows/integ-test-inject-develocity.yml @@ -160,7 +160,6 @@ jobs: - name: Check access key is not blank (GRADLE_ENTERPRISE_ACCESS_KEY) run: "[ \"${GRADLE_ENTERPRISE_ACCESS_KEY}\" != \"\" ] || (echo 'GRADLE_ENTERPRISE_ACCESS_KEY is still supported in v3!'; exit 1)" - inject-develocity-with-access-key-from-input-actions: env: DEVELOCITY_ACCESS_KEY: ${{ secrets.DEVELOCITY_ACCESS_KEY }}