From efc7894f8b581825211c20ae80b62d4b089885dd Mon Sep 17 00:00:00 2001 From: Trask Stalnaker Date: Wed, 26 Jan 2022 16:02:46 -0800 Subject: [PATCH] [v1.10.x branch] Cherry pick github action workflow updates into v1.10.x branch (#5249) * More gradle build action cleanup (#5140) * Remove unnecessary gradle wrapper caching * Convert more to gradle-build-action * Remove fetch-depth (#5145) * Simplify release workflow (#5144) * Bump release date --- .github/workflows/ci.yml | 24 +-- .../workflows/gradle-wrapper-validation.yml | 2 - .../workflows/nightly-benchmark-overhead.yml | 8 +- .github/workflows/nightly-codeql-analysis.yml | 4 - .github/workflows/nightly-no-cache.yml | 88 +++----- .github/workflows/nightly.yml | 24 +-- .github/workflows/patch-release-build.yml | 204 ------------------ .../pr-smoke-test-fake-backend-images.yml | 4 - .../workflows/pr-smoke-test-grpc-images.yml | 2 - .../workflows/pr-smoke-test-play-images.yml | 2 - .../pr-smoke-test-quarkus-images.yml | 2 - .../pr-smoke-test-servlet-images.yml | 2 - .../pr-smoke-test-spring-boot-images.yml | 2 - .github/workflows/pr.yml | 12 -- ...publish-smoke-test-fake-backend-images.yml | 6 - .../publish-smoke-test-grpc-images.yml | 4 - .../publish-smoke-test-play-images.yml | 4 - .../publish-smoke-test-quarkus-images.yml | 4 - .../publish-smoke-test-servlet-images.yml | 4 - .../publish-smoke-test-spring-boot-images.yml | 2 - .github/workflows/release-gradle-plugins.yml | 4 - .../{release-build.yml => release.yml} | 49 ++--- CHANGELOG.md | 2 +- RELEASING.md | 22 +- 24 files changed, 65 insertions(+), 416 deletions(-) delete mode 100644 .github/workflows/patch-release-build.yml rename .github/workflows/{release-build.yml => release.yml} (81%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 087151c1c4f4..024c286490cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,8 +12,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -34,8 +32,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -44,8 +40,10 @@ jobs: java-version: 11 - name: Build - run: ../gradlew build - working-directory: gradle-plugins + uses: gradle/gradle-build-action@v2 + with: + arguments: build + build-root-directory: gradle-plugins test: runs-on: ubuntu-latest @@ -61,8 +59,6 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - id: setup-test-java name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests @@ -94,8 +90,6 @@ jobs: if: ${{ !startsWith(github.ref_name, 'v') }} steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -138,8 +132,6 @@ jobs: if: matrix.os == 'windows-latest' - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -167,8 +159,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -194,8 +184,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -222,8 +210,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -274,8 +260,6 @@ jobs: if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/gradle-wrapper-validation.yml b/.github/workflows/gradle-wrapper-validation.yml index e341f364f09f..283c68883fa6 100644 --- a/.github/workflows/gradle-wrapper-validation.yml +++ b/.github/workflows/gradle-wrapper-validation.yml @@ -13,7 +13,5 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: gradle/wrapper-validation-action@v1.0.4 diff --git a/.github/workflows/nightly-benchmark-overhead.yml b/.github/workflows/nightly-benchmark-overhead.yml index a5439f14eabf..9e61c75d2d67 100644 --- a/.github/workflows/nightly-benchmark-overhead.yml +++ b/.github/workflows/nightly-benchmark-overhead.yml @@ -20,8 +20,10 @@ jobs: run: | rsync -avv gh-pages/benchmark-overhead/results/ benchmark-overhead/results/ - name: run tests - working-directory: benchmark-overhead - run: ./gradlew test + uses: gradle/gradle-build-action@v2 + with: + arguments: test + build-root-directory: benchmark-overhead - name: inspect the results dir working-directory: benchmark-overhead run: ls -lR results @@ -46,8 +48,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/nightly-codeql-analysis.yml b/.github/workflows/nightly-codeql-analysis.yml index cc2ba4e364ef..4676fbd6e00a 100644 --- a/.github/workflows/nightly-codeql-analysis.yml +++ b/.github/workflows/nightly-codeql-analysis.yml @@ -12,8 +12,6 @@ jobs: steps: - name: Checkout repository uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Initialize CodeQL uses: github/codeql-action/init@v1 @@ -43,8 +41,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/nightly-no-cache.yml b/.github/workflows/nightly-no-cache.yml index 59a7a2f10253..fa6bf503ef23 100644 --- a/.github/workflows/nightly-no-cache.yml +++ b/.github/workflows/nightly-no-cache.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -20,12 +18,6 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Build env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -37,8 +29,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -46,15 +36,11 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Build - run: ../gradlew build --no-build-cache - working-directory: gradle-plugins + uses: gradle/gradle-build-action@v2 + with: + arguments: build --no-build-cache + build-root-directory: gradle-plugins test: runs-on: ubuntu-latest @@ -70,8 +56,6 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - id: setup-test-java name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests @@ -86,12 +70,6 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Test env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -103,8 +81,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -112,12 +88,6 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Test env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -151,8 +121,6 @@ jobs: if: matrix.os == 'windows-latest' - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -160,12 +128,6 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }} - - name: Test env: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} @@ -180,8 +142,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -189,32 +149,36 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('examples/distro/gradle/wrapper/gradle-wrapper.properties') }} - - name: Local publish of artifacts - # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/ - run: ./gradlew publishToMavenLocal -x javadoc + uses: gradle/gradle-build-action@v2 + with: + # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/ + arguments: publishToMavenLocal -x javadoc - name: Local publish of gradle plugins - # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/ - run: ../gradlew publishToMavenLocal -x javadoc - working-directory: gradle-plugins + uses: gradle/gradle-build-action@v2 + with: + # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/ + arguments: publishToMavenLocal -x javadoc + build-root-directory: gradle-plugins - name: Build distro - run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache - working-directory: examples/distro + uses: gradle/gradle-build-action@v2 + with: + arguments: build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache + build-root-directory: examples/distro - name: Build extension - run: ./gradlew build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache - working-directory: examples/extension + uses: gradle/gradle-build-action@v2 + with: + arguments: build --init-script ../../.github/scripts/local.init.gradle.kts --no-build-cache + build-root-directory: examples/extension - name: Run muzzle check against extension - run: ./gradlew muzzle --init-script ../../.github/scripts/local.init.gradle.kts - working-directory: examples/extension + uses: gradle/gradle-build-action@v2 + with: + arguments: muzzle --init-script ../../.github/scripts/local.init.gradle.kts + build-root-directory: examples/extension issue: name: Open issue on failure @@ -227,8 +191,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 5cad7ca745ed..9a63161e099e 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -33,8 +31,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -43,8 +39,10 @@ jobs: java-version: 11 - name: Build - run: ../gradlew build - working-directory: gradle-plugins + uses: gradle/gradle-build-action@v2 + with: + arguments: build + root-build-directory: gradle-plugins test: runs-on: ubuntu-latest @@ -60,8 +58,6 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - id: setup-test-java name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests @@ -89,8 +85,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -133,8 +127,6 @@ jobs: if: matrix.os == 'windows-latest' - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -158,8 +150,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -185,8 +175,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -213,8 +201,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -266,8 +252,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/patch-release-build.yml b/.github/workflows/patch-release-build.yml deleted file mode 100644 index a99cdb7a605b..000000000000 --- a/.github/workflows/patch-release-build.yml +++ /dev/null @@ -1,204 +0,0 @@ -# Releases a new patch version from a release branch -name: Patch Release Build -on: - workflow_dispatch: - inputs: - release-branch-name: - description: The release branch to use, e.g. v1.9.x - required: true - version: - # TODO (trask) this is redundant - description: The version of the release, e.g. 1.9.1 (without the "v" prefix) - required: true - -jobs: - test: - runs-on: ubuntu-latest - strategy: - matrix: - test-java-version: - - 8 - - 11 - - 15 - steps: - - uses: actions/checkout@v2.3.4 - with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - - - id: setup-test-java - name: Set up JDK ${{ matrix.test-java-version }} for running tests - uses: actions/setup-java@v2 - with: - distribution: adopt - java-version: ${{ matrix.test-java-version }} - - - name: Set up JDK 11 for running Gradle - uses: actions/setup-java@v2 - with: - distribution: adopt - java-version: 11 - - - name: Test - uses: gradle/gradle-build-action@v2 - with: - arguments: test -PtestJavaVersion=${{ matrix.test-java-version }} -Porg.gradle.java.installations.paths=${{ steps.setup-test-java.outputs.path }} -Porg.gradle.java.installations.auto-download=false - - # testLatestDeps is intentionally not included in the release workflows - # because any time a new library version is released to maven central - # it can fail due to test code incompatibility with the new library version, - # or due to slight changes in emitted telemetry - - smoke-test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: - - windows-latest - - ubuntu-latest - smoke-test-suite: - - jetty - - liberty - - payara - - tomcat - - tomee - - websphere - - wildfly - - other - exclude: - - os: windows-latest - smoke-test-suite: websphere - steps: - - name: Support longpaths - run: git config --system core.longpaths true - if: matrix.os == 'windows-latest' - - - uses: actions/checkout@v2.3.4 - with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - - - name: Set up JDK 11 for running Gradle - uses: actions/setup-java@v2 - with: - distribution: adopt - java-version: 11 - - - name: Test - uses: gradle/gradle-build-action@v2 - with: - arguments: ":smoke-tests:test -PsmokeTestSuite=${{ matrix.smoke-test-suite }}" - - # muzzle is intentionally not included in the release workflows - # because any time a new library version is released to maven central it can fail, - # and this is not a reason to hold up the release - - examples: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - - - name: Set up JDK 11 for running Gradle - uses: actions/setup-java@v2 - with: - distribution: adopt - java-version: 11 - - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('examples/distro/gradle/wrapper/gradle-wrapper.properties') }} - - - name: Local publish of artifacts - uses: gradle/gradle-build-action@v2 - with: - # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/ - arguments: publishToMavenLocal -x javadoc - - - name: Local publish of gradle plugins - uses: gradle/gradle-build-action@v2 - with: - # javadoc task fails sporadically fetching https://docs.oracle.com/javase/8/docs/api/ - arguments: publishToMavenLocal -x javadoc - build-root-directory: gradle-plugins - - - name: Build distro - uses: gradle/gradle-build-action@v2 - with: - arguments: build --init-script ../../.github/scripts/local.init.gradle.kts - build-root-directory: examples/distro - - - name: Build extension - uses: gradle/gradle-build-action@v2 - with: - arguments: build --init-script ../../.github/scripts/local.init.gradle.kts - build-root-directory: examples/extension - - - name: Run muzzle check against extension - uses: gradle/gradle-build-action@v2 - with: - arguments: muzzle --init-script ../../.github/scripts/local.init.gradle.kts - build-root-directory: examples/extension - cache-read-only: true - - release: - needs: [ test, smoke-test, examples ] - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2.3.4 - with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - - - name: Set up JDK 11 for running Gradle - uses: actions/setup-java@v2 - with: - distribution: adopt - java-version: 11 - - - name: Build and publish artifacts - uses: gradle/gradle-build-action@v2 - with: - arguments: assemble publishToSonatype closeAndReleaseSonatypeStagingRepository - env: - SONATYPE_USER: ${{ secrets.SONATYPE_USER }} - SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }} - GRGIT_USER: ${{ github.actor }} - GRGIT_PASS: ${{ secrets.GITHUB_TOKEN }} - GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} - GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} - - # TODO (trask) cache gradle wrapper? - - name: Build and publish gradle plugins - env: - GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} - GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} - run: ../gradlew build publishPlugins - working-directory: gradle-plugins - - - name: Create Release - id: create_release - uses: actions/create-release@v1.1.4 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - tag_name: v${{ github.event.inputs.version }} - commitish: ${{ github.event.inputs.release-branch-name }} - release_name: Release v${{ github.event.inputs.version }} - draft: true - prerelease: false - - - name: Upload Release Asset - id: upload-release-asset - uses: actions/upload-release-asset@v1.0.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: javaagent/build/libs/opentelemetry-javaagent-${{ github.event.inputs.version }}.jar - asset_name: opentelemetry-javaagent.jar - asset_content_type: application/java-archive diff --git a/.github/workflows/pr-smoke-test-fake-backend-images.yml b/.github/workflows/pr-smoke-test-fake-backend-images.yml index ff7cb89986d5..0c71ccac5ecb 100644 --- a/.github/workflows/pr-smoke-test-fake-backend-images.yml +++ b/.github/workflows/pr-smoke-test-fake-backend-images.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -37,8 +35,6 @@ jobs: run: git config --system core.longpaths true - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/pr-smoke-test-grpc-images.yml b/.github/workflows/pr-smoke-test-grpc-images.yml index e93c3dd974aa..55b4e4a1ea2b 100644 --- a/.github/workflows/pr-smoke-test-grpc-images.yml +++ b/.github/workflows/pr-smoke-test-grpc-images.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/pr-smoke-test-play-images.yml b/.github/workflows/pr-smoke-test-play-images.yml index 98c904b27385..9018cddc3aab 100644 --- a/.github/workflows/pr-smoke-test-play-images.yml +++ b/.github/workflows/pr-smoke-test-play-images.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/pr-smoke-test-quarkus-images.yml b/.github/workflows/pr-smoke-test-quarkus-images.yml index d6b9dcdd66e5..16550ec79a0d 100644 --- a/.github/workflows/pr-smoke-test-quarkus-images.yml +++ b/.github/workflows/pr-smoke-test-quarkus-images.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/pr-smoke-test-servlet-images.yml b/.github/workflows/pr-smoke-test-servlet-images.yml index bf5647f09943..eaf9e6f0dea4 100644 --- a/.github/workflows/pr-smoke-test-servlet-images.yml +++ b/.github/workflows/pr-smoke-test-servlet-images.yml @@ -32,8 +32,6 @@ jobs: if: matrix.os == 'windows-latest' - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/pr-smoke-test-spring-boot-images.yml b/.github/workflows/pr-smoke-test-spring-boot-images.yml index 13129f27c214..fa282f881449 100644 --- a/.github/workflows/pr-smoke-test-spring-boot-images.yml +++ b/.github/workflows/pr-smoke-test-spring-boot-images.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 4eaf8105fa50..8026f766ebbc 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,8 +11,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -49,8 +47,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -80,8 +76,6 @@ jobs: fail-fast: false steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - id: setup-test-java name: Set up JDK ${{ matrix.test-java-version }}-${{ matrix.vm }} for running tests @@ -154,8 +148,6 @@ jobs: if: matrix.os == 'windows-latest' - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -207,8 +199,6 @@ jobs: steps: - name: Check out repository uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -229,8 +219,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/publish-smoke-test-fake-backend-images.yml b/.github/workflows/publish-smoke-test-fake-backend-images.yml index 0c05e1646dc1..be116dc26749 100644 --- a/.github/workflows/publish-smoke-test-fake-backend-images.yml +++ b/.github/workflows/publish-smoke-test-fake-backend-images.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -49,8 +47,6 @@ jobs: run: git config --system core.longpaths true - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -85,8 +81,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/publish-smoke-test-grpc-images.yml b/.github/workflows/publish-smoke-test-grpc-images.yml index 37bf7d35236a..e7d06f849d3c 100644 --- a/.github/workflows/publish-smoke-test-grpc-images.yml +++ b/.github/workflows/publish-smoke-test-grpc-images.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -68,8 +66,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/publish-smoke-test-play-images.yml b/.github/workflows/publish-smoke-test-play-images.yml index 8c011a11687b..0eef719ca491 100644 --- a/.github/workflows/publish-smoke-test-play-images.yml +++ b/.github/workflows/publish-smoke-test-play-images.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -64,8 +62,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/publish-smoke-test-quarkus-images.yml b/.github/workflows/publish-smoke-test-quarkus-images.yml index a0660fd17765..7afb68f4b978 100644 --- a/.github/workflows/publish-smoke-test-quarkus-images.yml +++ b/.github/workflows/publish-smoke-test-quarkus-images.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -63,8 +61,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/publish-smoke-test-servlet-images.yml b/.github/workflows/publish-smoke-test-servlet-images.yml index d7af211c8b40..bfc764b0ddd1 100644 --- a/.github/workflows/publish-smoke-test-servlet-images.yml +++ b/.github/workflows/publish-smoke-test-servlet-images.yml @@ -38,8 +38,6 @@ jobs: if: matrix.os == 'windows-latest' - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -82,8 +80,6 @@ jobs: - uses: technote-space/workflow-conclusion-action@v2.2 - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - uses: JasonEtco/create-an-issue@v2.6 if: env.WORKFLOW_CONCLUSION == 'failure' # notify only if failure diff --git a/.github/workflows/publish-smoke-test-spring-boot-images.yml b/.github/workflows/publish-smoke-test-spring-boot-images.yml index 4140e7afcebf..7b99966ffa97 100644 --- a/.github/workflows/publish-smoke-test-spring-boot-images.yml +++ b/.github/workflows/publish-smoke-test-spring-boot-images.yml @@ -14,8 +14,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2.3.4 - with: - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/release-gradle-plugins.yml b/.github/workflows/release-gradle-plugins.yml index 5c2402fb6af4..0a2b157c75fd 100644 --- a/.github/workflows/release-gradle-plugins.yml +++ b/.github/workflows/release-gradle-plugins.yml @@ -24,7 +24,6 @@ jobs: - uses: actions/checkout@v2.3.4 with: ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - id: setup-test-java name: Set up JDK ${{ matrix.test-java-version }} for running tests @@ -76,7 +75,6 @@ jobs: - uses: actions/checkout@v2.3.4 with: ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -99,7 +97,6 @@ jobs: - uses: actions/checkout@v2.3.4 with: ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -152,7 +149,6 @@ jobs: - uses: actions/checkout@v2.3.4 with: ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 diff --git a/.github/workflows/release-build.yml b/.github/workflows/release.yml similarity index 81% rename from .github/workflows/release-build.yml rename to .github/workflows/release.yml index dc0d7644a2ad..ebfb4559eb47 100644 --- a/.github/workflows/release-build.yml +++ b/.github/workflows/release.yml @@ -1,15 +1,7 @@ -# Releases a new minor / major version from a release branch +# Releases a new major / minor / patch version from a release branch name: Release Build on: workflow_dispatch: - inputs: - release-branch-name: - description: The release branch to use, e.g. v1.9.x - required: true - version: - # TODO (trask) this is redundant - description: The version of the release, e.g. 1.9.0 (without the "v" prefix) - required: true jobs: test: @@ -23,8 +15,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 + ref: ${{ github.ref_name }} - id: setup-test-java name: Set up JDK ${{ matrix.test-java-version }} for running tests @@ -75,8 +66,7 @@ jobs: - uses: actions/checkout@v2.3.4 with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 + ref: ${{ github.ref_name }} - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -98,8 +88,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 + ref: ${{ github.ref_name }} - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -107,12 +96,6 @@ jobs: distribution: adopt java-version: 11 - - name: Cache Gradle Wrapper - uses: actions/cache@v2 - with: - path: ~/.gradle/wrapper - key: ${{ runner.os }}-gradle-wrapper-cache-${{ hashFiles('examples/distro/gradle/wrapper/gradle-wrapper.properties') }} - - name: Local publish of artifacts uses: gradle/gradle-build-action@v2 with: @@ -151,8 +134,7 @@ jobs: steps: - uses: actions/checkout@v2.3.4 with: - ref: ${{ github.event.inputs.release-branch-name }} - fetch-depth: 0 + ref: ${{ github.ref_name }} - name: Set up JDK 11 for running Gradle uses: actions/setup-java@v2 @@ -172,13 +154,20 @@ jobs: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }} - # TODO (trask) cache gradle wrapper? - name: Build and publish gradle plugins + uses: gradle/gradle-build-action@v2 env: GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} - run: ../gradlew build publishPlugins - working-directory: gradle-plugins + with: + arguments: build publishPlugins + build-root-directory: gradle-plugins + + - name: Set release version + id: set-release-version + run: | + v=$(grep -Eo "[0-9]+.[0-9]+.[0-9]+" version.gradle.kts | head -1) + echo "::set-output name=release-version::$v" - name: Create Release id: create_release @@ -186,9 +175,9 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - tag_name: v${{ github.event.inputs.version }} - commitish: ${{ github.event.inputs.release-branch-name }} - release_name: Release v${{ github.event.inputs.version }} + tag_name: v${{ steps.set-release-version.outputs.release-version }} + commitish: ${{ github.ref_name }} + release_name: Release v${{ steps.set-release-version.outputs.release-version }} draft: true prerelease: false @@ -199,6 +188,6 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: javaagent/build/libs/opentelemetry-javaagent-${{ github.event.inputs.version }}.jar + asset_path: javaagent/build/libs/opentelemetry-javaagent-${{ steps.set-release-version.outputs.release-version }}.jar asset_name: opentelemetry-javaagent.jar asset_content_type: application/java-archive diff --git a/CHANGELOG.md b/CHANGELOG.md index a37238d2c026..1447f01ab7f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,6 @@ # Changelog -## Version 1.10.1 - 2022-01-26 +## Version 1.10.1 - 2022-01-27 - Move reactor context propagation operator instrumentation to separate instrumentation module ([#5188](https://github.com/open-telemetry/opentelemetry-java-instrumentation/pull/5188)) diff --git a/RELEASING.md b/RELEASING.md index b05b38b0222c..db1ec63e1c18 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -26,14 +26,10 @@ Before making the release: * examples/extension/build.gradle * Bump the version in the download link in the root `README.md` file -Open the release build workflow in your browser [here](https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/workflows/release-build.yml). +Open the [Release workflow](https://github.com/open-telemetry/opentelemetry-java-instrumentation/actions/workflows/release.yml). -You will see a button that says "Run workflow". Press the button, then enter the following: -* Use workflow from: -* The release branch to use: -* The version of the release: +Press the "Run workflow" button, then select the release branch from the dropdown list, +e.g. `v1.9.x`, and click the "Run workflow" button below that. -(Yes there is redundancy between the above inputs that we plan to address.) +This triggers the release process, which builds the artifacts, publishes the artifacts, and creates +and pushes a git tag with the version number.