[OpAMP] Snapshot profiling preparation for remote config #4274
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PR build | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| on: | |
| pull_request: | |
| jobs: | |
| check-links: | |
| # release branches are excluded | |
| if: "!startsWith(github.ref_name, 'release/')" | |
| uses: ./.github/workflows/reusable-link-check.yml | |
| build: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| - name: Build and test | |
| run: ./gradlew build | |
| - name: Build scan | |
| if: ${{ !cancelled() && hashFiles('build-scan.txt') != '' }} | |
| run: cat build-scan.txt | |
| - name: Upload agent jar | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: opentelemetry-javaagent.jar | |
| path: agent/build/libs/splunk-otel-javaagent-*-SNAPSHOT.jar | |
| if-no-files-found: ignore | |
| test-latest-deps: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| - name: Build and test | |
| run: ./gradlew check -x spotlessCheck -PtestLatestDeps=true | |
| - name: Build scan | |
| if: ${{ !cancelled() && hashFiles('build-scan.txt') != '' }} | |
| run: cat build-scan.txt | |
| setup-muzzle-matrix: | |
| runs-on: ubuntu-24.04 | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| - id: set-matrix | |
| run: echo "matrix={\"module\":[\"$(./gradlew -q instrumentation:listMuzzleInstrumentations | xargs echo | sed 's/ /","/g')\"]}" >> $GITHUB_OUTPUT | |
| muzzle: | |
| needs: setup-muzzle-matrix | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: ${{fromJson(needs.setup-muzzle-matrix.outputs.matrix)}} | |
| fail-fast: false | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| - name: Run muzzle | |
| # using retry because of sporadic gradle download failures | |
| uses: nick-invision/retry@ad984534de44a9489a53aefd81eb77f87c70dc60 # v4.0.0 | |
| with: | |
| # timing out has not been a problem, these jobs typically finish in 2-3 minutes | |
| timeout_minutes: 15 | |
| max_attempts: 3 | |
| command: ./gradlew ${{ matrix.module }}:muzzle --stacktrace | |
| smoke-test: | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| packages: read | |
| strategy: | |
| matrix: | |
| os: [ windows-2025, ubuntu-24.04 ] | |
| suite: [ "glassfish", "jboss", "jetty", "liberty", "profiler", "tomcat", "tomee", "weblogic", "websphere", "wildfly", "other" ] | |
| exclude: | |
| - os: ${{ !contains(github.event.pull_request.labels.*.name, 'test windows') && 'windows-2025' || '' }} | |
| - os: windows-2025 | |
| suite: websphere | |
| - os: windows-2025 | |
| suite: profiler | |
| fail-fast: false | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Free disk space | |
| run: .github/scripts/gha-free-disk-space.sh | |
| - name: Docker issue workaround | |
| if: startsWith(matrix.os, 'windows') | |
| run: | | |
| $dockerState = Get-Service -Name "docker" | |
| if ($dockerState.Status -ne "Running") { | |
| Start-Service -Name "docker" | |
| } | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| - name: Login to GitHub Container Registry | |
| uses: docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| # only run this step if 'test proprietary app servers' is present on the PR | |
| if: ${{ startsWith(matrix.os, 'ubuntu') && contains(github.event.pull_request.labels.*.name, 'test proprietary app servers') }} | |
| - name: Pull proprietary images | |
| run: ./gradlew pullProprietaryTestImages | |
| # only run this step if 'test proprietary app servers' is present on the PR | |
| if: ${{ startsWith(matrix.os, 'ubuntu') && contains(github.event.pull_request.labels.*.name, 'test proprietary app servers') }} | |
| - name: Test | |
| run: ./gradlew :smoke-tests:test -PsmokeTestSuite=${{ matrix.suite }} | |
| - name: Build scan | |
| if: ${{ !cancelled() && hashFiles('build-scan.txt') != '' }} | |
| run: cat build-scan.txt | |
| shellcheck: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Install shell check | |
| run: wget -qO- "https://github.com/koalaman/shellcheck/releases/download/v0.8.0/shellcheck-v0.8.0.linux.x86_64.tar.xz" | tar -xJv | |
| - name: Run shellcheck | |
| run: shellcheck-v0.8.0/shellcheck --format=gcc $(find scripts -name '*.sh') | |
| license-check: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| - name: Generate license report | |
| run: ./gradlew generateLicenseReport | |
| - name: Check licenses | |
| run: | | |
| # add any untracked folders that may have been added by generateLicenseReport | |
| git add licenses | |
| # there's always going to one line difference due to the timestamp included in the report | |
| if [[ $(git diff --cached --shortstat licenses) == " 1 file changed, 1 insertion(+), 1 deletion(-)" ]] | |
| then | |
| echo "Licenses are up-to-date." | |
| else | |
| echo "Licenses are not up-to-date, please run './gradlew generateLicenseReport' locally and commit." | |
| echo | |
| echo "$(git diff --cached --stat licenses)" | |
| echo | |
| echo "$(git diff --cached licenses)" | |
| exit 1 | |
| fi | |
| generate-metadata: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Set up JDK 17 for running Gradle | |
| uses: actions/setup-java@03ad4de0992f5dab5e18fcb136590ce7c4a0ac95 # v5.6.0 | |
| with: | |
| distribution: temurin | |
| java-version: 17 | |
| - name: Set up Gradle | |
| uses: gradle/actions/setup-gradle@3f131e8634966bd73d06cc69884922b02e6faf92 # v6.2.0 | |
| with: | |
| cache-read-only: true | |
| # verify that metadata generation succeeds | |
| - name: Generate metadata | |
| run: ./gradlew :metadata-generator:generateMetadata | |
| - name: Upload metadata yaml | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: splunk-otel-java-metadata.yaml | |
| path: metadata-generator/build/splunk-otel-java-metadata.yaml |