1111 default : ' us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, af-south-1, ap-east-1, ap-south-2, ap-southeast-3, ap-southeast-4, eu-central-2, eu-south-1, eu-south-2, il-central-1, me-central-1, me-south-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1'
1212
1313env :
14+ VERSION : ${{ env.VERSION }}
15+ AWS_REGION : ${{ env.AWS_REGION }}
1416 AWS_PUBLIC_ECR_REGION : us-east-1
1517 AWS_PRIVATE_ECR_REGION : us-west-2
1618 TEST_TAG : public.ecr.aws/aws-observability/adot-autoinstrumentation-java:test-v2
@@ -76,13 +78,13 @@ jobs:
7678 - name : Build release with Gradle
7779 uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
7880 with :
79- arguments : build integrationTests -PlocalDocker=true -Prelease.version=${{ github.event.inputs.version }} --stacktrace
81+ arguments : build integrationTests -PlocalDocker=true -Prelease.version=${{ env.VERSION }} --stacktrace
8082
8183 - name : Upload SDK artifact
8284 uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
8385 with :
8486 name : ${{ env.ARTIFACT_NAME }}
85- path : otelagent/build/libs/aws-opentelemetry-agent-${{ github.event.inputs.version }}.jar
87+ path : otelagent/build/libs/aws-opentelemetry-agent-${{ env.VERSION }}.jar
8688
8789 build-layer :
8890 needs : build-sdk
9395 - name : Set up regions matrix
9496 id : set-matrix
9597 env :
96- AWS_REGIONS : ${{ github.event.inputs.aws_region }}
98+ AWS_REGIONS : ${{ env.AWS_REGION }}
9799 run : |
98100 IFS=',' read -ra REGIONS <<< "$AWS_REGIONS"
99101 MATRIX="["
@@ -157,7 +159,7 @@ jobs:
157159 - name : Build release with Gradle
158160 uses : gradle/gradle-build-action@a8f75513eafdebd8141bd1cd4e30fcd194af8dfa # v2
159161 with :
160- arguments : build integrationTests -PlocalDocker=true -Prelease.version=${{ github.event.inputs.version }} --stacktrace
162+ arguments : build integrationTests -PlocalDocker=true -Prelease.version=${{ env.VERSION }} --stacktrace
161163
162164 - name : Configure AWS Credentials for public ECR
163165 uses : aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 # v5.0.0
@@ -193,33 +195,33 @@ jobs:
193195 uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
194196 with :
195197 push : false
196- build-args : " ADOT_JAVA_VERSION=${{ github.event.inputs.version }}"
198+ build-args : " ADOT_JAVA_VERSION=${{ env.VERSION }}"
197199 context : .
198200 platforms : linux/amd64
199201 tags : ${{ env.TEST_TAG }}
200202 load : true
201203
202204 - name : Test docker image
203205 env :
204- VERSION : ${{ github.event.inputs.version }}
206+ VERSION : ${{ env.VERSION }}
205207 shell : bash
206208 run : .github/scripts/test-adot-javaagent-image.sh "${{ env.TEST_TAG }}" "$VERSION"
207209
208210 - name : Build and push image
209211 uses : docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6.18.0
210212 with :
211213 push : true
212- build-args : " ADOT_JAVA_VERSION=${{ github.event.inputs.version }}"
214+ build-args : " ADOT_JAVA_VERSION=${{ env.VERSION }}"
213215 context : .
214216 platforms : linux/amd64,linux/arm64
215217 tags : |
216- ${{ env.PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
217- ${{ env.PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
218+ ${{ env.PUBLIC_REPOSITORY }}:v${{ env.VERSION }}
219+ ${{ env.PRIVATE_REPOSITORY }}:v${{ env.VERSION }}
218220
219221 - name : Build and Publish release with Gradle
220222 uses : gradle/actions/setup-gradle@d9c87d481d55275bb5441eef3fe0e46805f9ef70 # v3.5.0
221223 with :
222- arguments : build final closeAndReleaseSonatypeStagingRepository -Prelease.version=${{ github.event.inputs.version }} --stacktrace
224+ arguments : build final closeAndReleaseSonatypeStagingRepository -Prelease.version=${{ env.VERSION }} --stacktrace
223225 env :
224226 PUBLISH_TOKEN_USERNAME : ${{ secrets.PUBLISH_TOKEN_USERNAME }}
225227 PUBLISH_TOKEN_PASSWORD : ${{ secrets.PUBLISH_TOKEN_PASSWORD }}
@@ -403,7 +405,7 @@ jobs:
403405
404406 - name : Rename artifacts
405407 env :
406- VERSION : ${{ github.event.inputs.version }}
408+ VERSION : ${{ env.VERSION }}
407409 run : |
408410 cp "aws-opentelemetry-agent-$VERSION.jar" ${{ env.ARTIFACT_NAME }}
409411 cp aws-opentelemetry-java-layer.zip layer.zip
@@ -413,7 +415,7 @@ jobs:
413415 id : create_release
414416 env :
415417 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
416- VERSION : ${{ github.event.inputs.version }}
418+ VERSION : ${{ env.VERSION }}
417419 run : |
418420 # Extract versions from dependency files
419421 OTEL_INSTRUMENTATION_VERSION=$(grep "val otelVersion" dependencyManagement/build.gradle.kts | sed 's/.*= "\([^"]*\)".*/\1/')
0 commit comments