build(deps): bump the collector-other group across 3 directories with… #20
Workflow file for this run
This file contains 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: "Release Javaagent Lambda Layer" | |
on: | |
# (Using tag push instead of release to allow filtering by tag prefix.) | |
push: | |
tags: | |
- layer-javaagent/** | |
permissions: | |
id-token: write | |
contents: write | |
jobs: | |
create-release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create Release | |
run: gh release create ${{ github.ref_name }} --draft --title ${{ github.ref_name }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build-layer: | |
runs-on: ubuntu-latest | |
needs: create-release | |
outputs: | |
JAVAAGENT_VERSION: ${{ steps.save-javaagent-version.outputs.JAVAAGENT_VERSION }} | |
JAVAWRAPPER_VERSION: ${{ steps.save-javawrapper-version.outputs.JAVAWRAPPER_VERSION }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: corretto | |
java-version: 17 | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v4 | |
- name: Execute Gradle build | |
run: | | |
cd java | |
./gradlew :layer-javaagent:assemble :layer-wrapper:assemble --scan --stacktrace | |
- uses: actions/upload-artifact@v4 | |
name: Save javaagent layer to build | |
with: | |
name: opentelemetry-javaagent-layer.zip | |
path: java/layer-javaagent/build/distributions/opentelemetry-javaagent-layer.zip | |
- uses: actions/upload-artifact@v4 | |
name: Save javawrapper layer to build | |
with: | |
name: opentelemetry-javawrapper-layer.zip | |
path: java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip | |
- name: Add Binary to Release | |
run: | | |
gh release upload ${{github.ref_name}} java/layer-wrapper/build/distributions/opentelemetry-javawrapper-layer.zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Save Javaagent Version | |
id: save-javaagent-version | |
shell: bash | |
run: | | |
unzip java/layer-javaagent/build/distributions/opentelemetry-javaagent-layer.zip | |
JAVAAGENT_VERSION=$(java -jar ./opentelemetry-javaagent.jar) | |
echo "JAVAAGENT_VERSION=$JAVAAGENT_VERSION" >> $GITHUB_OUTPUT | |
- name: Save Java Wrapper Version | |
id: save-javawrapper-version | |
shell: bash | |
run: | | |
cd java | |
JAVAWRAPPER_VERSION=$(./gradlew layer-wrapper:printOtelJavaInstrumentationVersion -q) | |
echo "JAVAWRAPPER_VERSION=$JAVAWRAPPER_VERSION" >> $GITHUB_OUTPUT | |
publish-javaagent-layer: | |
uses: ./.github/workflows/layer-publish.yml | |
needs: build-layer | |
strategy: | |
matrix: | |
aws_region: | |
- ap-northeast-1 | |
- ap-northeast-2 | |
- ap-south-1 | |
- ap-southeast-1 | |
- ap-southeast-2 | |
- ca-central-1 | |
- eu-central-1 | |
- eu-north-1 | |
- eu-west-1 | |
- eu-west-2 | |
- eu-west-3 | |
- sa-east-1 | |
- us-east-1 | |
- us-east-2 | |
- us-west-1 | |
- us-west-2 | |
with: | |
artifact-name: opentelemetry-javaagent-layer.zip | |
layer-name: opentelemetry-javaagent | |
component-version: ${{needs.build-layer.outputs.JAVAAGENT_VERSION}} | |
# architecture: | |
runtimes: java8.al2 java11 java17 | |
release-group: prod | |
aws_region: ${{ matrix.aws_region }} | |
secrets: inherit | |
publish-javawrapper-layer: | |
uses: ./.github/workflows/layer-publish.yml | |
needs: build-layer | |
strategy: | |
matrix: | |
aws_region: | |
- ap-northeast-1 | |
- ap-northeast-2 | |
- ap-south-1 | |
- ap-southeast-1 | |
- ap-southeast-2 | |
- ca-central-1 | |
- eu-central-1 | |
- eu-north-1 | |
- eu-west-1 | |
- eu-west-2 | |
- eu-west-3 | |
- sa-east-1 | |
- us-east-1 | |
- us-east-2 | |
- us-west-1 | |
- us-west-2 | |
with: | |
artifact-name: opentelemetry-javawrapper-layer.zip | |
layer-name: opentelemetry-javawrapper | |
component-version: ${{needs.build-layer.outputs.JAVAWRAPPER_VERSION}} | |
# architecture: | |
runtimes: java8.al2 java11 java17 | |
release-group: prod | |
aws_region: ${{ matrix.aws_region }} | |
secrets: inherit | |