Skip to content

Commit 8c25eaa

Browse files
vasireddy99majanjua-amznbjraradependabot[bot]rapphil
authored
[release/v1.32.x] Add commits from main branch (#761)
* E2E Testing: Add failure in waiting for pods to retry mechanism (#659) * Revert "E2E Testing: Add failure in waiting for pods to retry mechanism (#659)" (#661) This reverts commit a5f5565. * Bump github/codeql-action from 2 to 3 Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v2...v3) --- updated-dependencies: - dependency-name: github/codeql-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Feat: add support to releasing to private ECR (#633) * Removing patch dependencies scope restriction to release branch only (#670) Removing patches scope restriction to release branch * Updating patch file path and Excluding windows-built for patch build * Add patch dependencies and publish to maven local (#677) Add patch dependencies and publish to maven local for appsignals tests for canaries * nightly-build workfow update (#627) nightly-build-update seprarte out contract tests and timestamp * Adding missing symbols (#679) * Fixing main build failure (#680) * Updating workflows * Do not sign patched artifacts at PR time (#691) * Do not sign patched artifacts at PR time * Fix dir structure * Just don't provide keys to the workflow * Set env vars conditionally * Double quote * Use truthy statement instead * Use env vars to avoid inject attacks * Delete unncessary workflow * Use doublequote for substitution * Bump rust from 1.74 to 1.75 Bumps rust from 1.74 to 1.75. --- updated-dependencies: - dependency-name: rust dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump tempfile from 3.8.1 to 3.9.0 in /tools/cp-utility Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.8.1 to 3.9.0. - [Changelog](https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md) - [Commits](Stebalien/tempfile@v3.8.1...v3.9.0) --- updated-dependencies: - dependency-name: tempfile dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump org.apache.logging.log4j:log4j-core from 2.20.0 to 2.22.1 Bumps org.apache.logging.log4j:log4j-core from 2.20.0 to 2.22.1. --- updated-dependencies: - dependency-name: org.apache.logging.log4j:log4j-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Bump com.linecorp.armeria:armeria-bom from 1.26.3 to 1.26.4 Bumps [com.linecorp.armeria:armeria-bom](https://github.com/line/armeria) from 1.26.3 to 1.26.4. - [Release notes](https://github.com/line/armeria/releases) - [Changelog](https://github.com/line/armeria/blob/main/.post-release-msg) - [Commits](line/armeria@armeria-1.26.3...armeria-1.26.4) --- updated-dependencies: - dependency-name: com.linecorp.armeria:armeria-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Bump org.mockito:mockito-junit-jupiter from 5.3.1 to 5.8.0 Bumps [org.mockito:mockito-junit-jupiter](https://github.com/mockito/mockito) from 5.3.1 to 5.8.0. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](mockito/mockito@v5.3.1...v5.8.0) --- updated-dependencies: - dependency-name: org.mockito:mockito-junit-jupiter dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> * Changing from workflow to action (#694) Change from workflow to action * Dry run validator before pull request (#690) * Create test_validator * Rename test_validator to test_validator.yml * Update appsignals-e2e-ec2-test.yml * Update appsignals-e2e-ec2-canary-test.yml * Update appsignals-e2e-eks-canary-test.yml * add option to allow validator dry run compile * allow test validator dry run * allow test validator dry run * allow test validator dry run * allow test validator dry run * allow test validator dry run * allow test validator dry run * Allow PR-build test to test validator success to build * Revert change in E2E Test * Revert unneeded change * Revert unneeded change * Use Gradle-Build-Action instead of run command * delete unneeded indent * delete unneeded indent * delete unneeded indent * Handle multi-line strings (#700) * Use input rather than secret (#702) * Fix usage of input variable in workflows (#703) * remove unncessary build output * Fix region in app signal e2e workflow * Fix incorrect usage of env var * fix nightly build wf also * Build patched artifacts in codeql workflow (#701) * Build patched artifacts in codeql workflow * Add cache check * Set default region as build output (#704) * Set output for default region * Update the rest of the workflows * reorder init (#705) * add outputs context (#706) * Reinsert aws default region env var (#708) * Reinsert aws default region env var * Use explicit job for setting env var output * Fix tab spacing * revert region changes to app signal wfs * revert 703 changes fully * Build before publishing in e2e operator tests (#710) * Build before publishing * Add sample app build as dependency * Bump org.junit.jupiter:junit-jupiter-engine from 5.9.2 to 5.10.1 (#695) Bumps [org.junit.jupiter:junit-jupiter-engine](https://github.com/junit-team/junit5) from 5.9.2 to 5.10.1. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](junit-team/junit-framework@r5.9.2...r5.10.1) --- updated-dependencies: - dependency-name: org.junit.jupiter:junit-jupiter-engine dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/stale from 8 to 9 (#638) Bumps [actions/stale](https://github.com/actions/stale) from 8 to 9. - [Release notes](https://github.com/actions/stale/releases) - [Changelog](https://github.com/actions/stale/blob/main/CHANGELOG.md) - [Commits](actions/stale@v8...v9) --- updated-dependencies: - dependency-name: actions/stale dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump com.google.guava:guava-bom from 32.1.3-jre to 33.0.0-jre (#696) Bumps [com.google.guava:guava-bom](https://github.com/google/guava) from 32.1.3-jre to 33.0.0-jre. - [Release notes](https://github.com/google/guava/releases) - [Commits](https://github.com/google/guava/commits) --- updated-dependencies: - dependency-name: com.google.guava:guava-bom dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump org.apache.kafka:kafka-clients from 3.6.0 to 3.6.1 (#698) Bumps org.apache.kafka:kafka-clients from 3.6.0 to 3.6.1. --- updated-dependencies: - dependency-name: org.apache.kafka:kafka-clients dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions/setup-java from 3 to 4 (#681) Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](actions/setup-java@v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Change terraform to use minimal ami (#712) * Change terraform to use minimal ami * Combine wget and java11 installation --------- Co-authored-by: ADOT Patch workflow <[email protected]> * Add Documentation for Testing E2E Resource Changes (#709) * Add documentation for testing E2E resource changes, download enablement script from public repo * Additional changes to the README.md * Change back whitespace * Remove secret and run test on the canary * Add extra note to EKS cluster setup * Remove Internal Reference --------- Co-authored-by: ADOT Patch workflow <[email protected]> * Add E2E EC2 Release Testing for Main Build (#713) * Add E2E EC2 Release Testing for Main Build * Fix changes based on PR * Change Terraform variable * Update variable name * Edit if statement for main build --------- Co-authored-by: ADOT Patch workflow <[email protected]> * Bump actions/setup-go from 4 to 5 (#639) Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5. - [Release notes](https://github.com/actions/setup-go/releases) - [Commits](actions/setup-go@v4...v5) --- updated-dependencies: - dependency-name: actions/setup-go dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Fix typos (#730) A few small fixes, no functional changes. * Update README.md (#743) * Remote target (#745) * Setting SQS remote target to ARN * Adding remote target for the other services * Ran spotless * Adding more tests * Adding more tests * Addressing PR * Fixing contract tests * Fixing PR * Rename AppSignals configs with backward compatibility (#744) * Rename AppSignals configs with backwards compatibility * update config name in contract tests * fixing related javadoc * Updated generateRemoteService to parse HTTP_URL as last resort (#750) * Updated generateRemoteService to parse HTTP_URL as last resort * fixed violations * updated comments * applied comments * Support AppSignals metrics transport protocol configuration (#752) * Support AppSignals metrics transport protocol configuration * rename SMP to AppSignals * rename Span Metrics to AppSignals * run gradlew :awsagentprovider:spotlessApply * Parse db.statement attribute for database instrumentation (#755) * Parse db.statement attribute for database instrumentation * reverted file change * fixed tests * fixed formating * applied comments * fixed ordering * Bump gradle/gradle-build-action from 2 to 3 (#732) Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2 to 3. - [Release notes](https://github.com/gradle/gradle-build-action/releases) - [Commits](gradle/gradle-build-action@v2...v3) --- updated-dependencies: - dependency-name: gradle/gradle-build-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * prefix AWS.SDK to the RemoteService from v1 (#756) * Update RemoteTarget Value to ::s3:::e2e-test-bucket-name for aws-sdk-call on E2E EC2 Tests (#757) Co-authored-by: Harry Ryu <[email protected]> * update the remote target for eks e2e validations (#758) * Add `RPC_SYSTEM` testing to AWS SDK contract tests (#760) Followup contract test improvement following from #756 --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Mahad Janjua <[email protected]> Co-authored-by: Mengyi Zhou (bjrara) <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Raphael Philipe Mendes da Silva <[email protected]> Co-authored-by: Paurush Garg <[email protected]> Co-authored-by: Paurush Garg <[email protected]> Co-authored-by: bryan-aguilar <[email protected]> Co-authored-by: XinRan Zhang <[email protected]> Co-authored-by: Harry <[email protected]> Co-authored-by: ADOT Patch workflow <[email protected]> Co-authored-by: Thomas Pierce <[email protected]> Co-authored-by: atshaw43 <[email protected]> Co-authored-by: Prashant Srivastava <[email protected]> Co-authored-by: Mohamed Asaker <[email protected]> Co-authored-by: Lei Wang <[email protected]> Co-authored-by: Harry Ryu <[email protected]>
1 parent 0752034 commit 8c25eaa

File tree

47 files changed

+2487
-624
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+2487
-624
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build and Push Java-Agent Image after CPUtility Test
2+
description: |
3+
cpUtility Testing
4+
This action assumes that Repo was checked out and Java was set correctly
5+
6+
inputs:
7+
aws-region:
8+
required: true
9+
description: "AWS Region"
10+
image_uri_with_tag:
11+
required: true
12+
description: "Image URI with Tag"
13+
image_registry:
14+
required: true
15+
description: "Image Registry"
16+
adot-java-version:
17+
required: true
18+
description: "ADOT Java Version"
19+
snapshot-ecr-role:
20+
require: true
21+
description: "IAM Role used for pushing to snapshot ecr"
22+
23+
24+
runs:
25+
using: "composite"
26+
steps:
27+
- name: Set up QEMU
28+
uses: docker/setup-qemu-action@v3
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v3
32+
33+
- name: Configure AWS Credentials
34+
uses: aws-actions/configure-aws-credentials@v4
35+
with:
36+
role-to-assume: ${{ inputs.snapshot-ecr-role }}
37+
aws-region: ${{ inputs.aws-region }}
38+
39+
- name: Login to private staging ecr
40+
uses: docker/login-action@v3
41+
with:
42+
registry: ${{ inputs.image_registry }}
43+
env:
44+
AWS_REGION: ${{ inputs.aws-region }}
45+
46+
- name: Build image for testing
47+
uses: docker/build-push-action@v5
48+
with:
49+
push: false
50+
build-args: "ADOT_JAVA_VERSION=${{ inputs.adot-java-version }}"
51+
context: .
52+
platforms: linux/amd64
53+
tags: ${{ inputs.image_uri_with_tag }}
54+
load: true
55+
56+
- name: Test docker image
57+
shell: bash
58+
run: .github/scripts/test-adot-javaagent-image.sh "${{ inputs.image_uri_with_tag }}" "${{ inputs.adot-java-version }}"
59+
60+
- name: Build and push image
61+
uses: docker/build-push-action@v5
62+
with:
63+
push: true
64+
build-args: "ADOT_JAVA_VERSION=${{ inputs.adot-java-version }}"
65+
context: .
66+
platforms: linux/amd64,linux/arm64
67+
tags: ${{ inputs.image_uri_with_tag }}

.github/actions/patch-dependencies/action.yml

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -13,33 +13,52 @@ inputs:
1313
default: "false"
1414
required: false
1515
description: "If the workflow should run tests of the dependencies. Anything different than false will evaluate to true"
16-
branch:
17-
required: true
18-
description: "The branch where this patches are being applied e.g.: release/v1.21.x"
1916
gpg_private_key:
2017
description: "The gpg key used to sign the artifacts"
21-
required: true
18+
required: false
2219
gpg_password:
2320
description: "The gpg key password"
24-
required: true
21+
required: false
2522
runs:
2623
using: "composite"
2724
steps:
25+
- name: set environment variables
26+
env:
27+
INPUT_KEY: ${{ inputs.gpg_private_key }}
28+
INPUT_PASSWORD: ${{ inputs.gpg_password }}
29+
shell: bash
30+
run: |
31+
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
32+
if [[ ! -z "$INPUT_KEY" ]]; then
33+
{
34+
echo "GPG_PRIVATE_KEY<<$EOF"
35+
echo "$INPUT_KEY"
36+
echo "$EOF"
37+
} >> "$GITHUB_ENV"
38+
fi
39+
if [[ ! -z "$INPUT_PASSWORD" ]]; then
40+
{
41+
echo "GPG_PASSWORD<<$EOF"
42+
echo "$INPUT_PASSWORD"
43+
echo "$EOF"
44+
} >> "$GITHUB_ENV"
45+
fi
46+
2847
- name: check patches
2948
run: |
30-
if [[ -f .github/patches/${{ inputs.branch }}/opentelemetry-java.patch ]]; then
49+
if [[ -f .github/patches/opentelemetry-java.patch ]]; then
3150
echo 'patch_otel_java=true' >> $GITHUB_ENV
3251
fi
33-
if [[ -f .github/patches/${{ inputs.branch }}/opentelemetry-java-instrumentation.patch ]]; then
52+
if [[ -f .github/patches/opentelemetry-java-instrumentation.patch ]]; then
3453
echo 'patch_otel_java_instrumentation=true' >> $GITHUB_ENV
3554
fi
36-
if [[ -f .github/patches/${{ inputs.branch }}/opentelemetry-java-contrib.patch ]]; then
55+
if [[ -f .github/patches/opentelemetry-java-contrib.patch ]]; then
3756
echo 'patch_otel_java_contrib=true' >> $GITHUB_ENV
3857
fi
3958
shell: bash
4059

4160
- name: Clone and patch repositories
42-
run: .github/scripts/patch.sh "${{ inputs.branch }}"
61+
run: .github/scripts/patch.sh
4362
if: ${{ env.patch_otel_java == 'true' ||
4463
env.patch_otel_java_instrumentation == 'true' ||
4564
env.patch_otel_java_contrib == 'true' }}
@@ -51,19 +70,13 @@ runs:
5170
with:
5271
arguments: build publishToMavenLocal
5372
build-root-directory: opentelemetry-java
54-
env:
55-
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
56-
GPG_PASSWORD: ${{ inputs.gpg_password }}
5773

5874
- name: Build opentelemetry-java
5975
uses: gradle/gradle-build-action@v2
6076
if: ${{ env.patch_otel_java == 'true' && inputs.run_tests == 'false' }}
6177
with:
6278
arguments: publishToMavenLocal
6379
build-root-directory: opentelemetry-java
64-
env:
65-
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
66-
GPG_PASSWORD: ${{ inputs.gpg_password }}
6780

6881
- name: cleanup opentelemetry-java
6982
run: rm -rf opentelemetry-java
@@ -76,19 +89,13 @@ runs:
7689
with:
7790
arguments: build publishToMavenLocal
7891
build-root-directory: opentelemetry-java-contrib
79-
env:
80-
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
81-
GPG_PASSWORD: ${{ inputs.gpg_password }}
8292

8393
- name: Build opentelemetry-java-contrib
8494
uses: gradle/gradle-build-action@v2
8595
if: ${{ env.patch_otel_java_contrib == 'true' && inputs.run_tests == 'false' }}
8696
with:
8797
arguments: publishToMavenLocal
8898
build-root-directory: opentelemetry-java-contrib
89-
env:
90-
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
91-
GPG_PASSWORD: ${{ inputs.gpg_password }}
9299

93100
- name: cleanup opentelemetry-java-contrib
94101
run: rm -rf opentelemetry-java-contrib
@@ -101,19 +108,13 @@ runs:
101108
with:
102109
arguments: check -x spotlessCheck publishToMavenLocal
103110
build-root-directory: opentelemetry-java-instrumentation
104-
env:
105-
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
106-
GPG_PASSWORD: ${{ inputs.gpg_password }}
107111

108112
- name: Build opentelemetry java instrumentation
109113
uses: gradle/gradle-build-action@v2
110114
if: ${{ env.patch_otel_java_instrumentation == 'true' && inputs.run_tests == 'false' }}
111115
with:
112116
arguments: publishToMavenLocal
113117
build-root-directory: opentelemetry-java-instrumentation
114-
env:
115-
GPG_PRIVATE_KEY: ${{ inputs.gpg_private_key }}
116-
GPG_PASSWORD: ${{ inputs.gpg_password }}
117118

118119
- name: cleanup opentelmetry-java-instrumentation
119120
run: rm -rf opentelemetry-java-instrumentation

.github/scripts/patch.sh

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,26 @@
22
# Enable debug mode, fail on any command that fail in this script and fail on unset variables
33
set -x -e -u
44

5-
# This parameter will help find the patches to be applied
6-
BRANCH=$1
7-
8-
# .github/patches/$BRANCH/versions.sh should define all the versions of the dependencies that we are going to patch
5+
# .github/patches/versions.sh should define all the versions of the dependencies that we are going to patch
96
# This is used so that we can properly clone the upstream repositories.
107
# This file should define the following variables:
118
# OTEL_JAVA_VERSION. Tag of the opentelemetry-java repository to use. E.g.: JAVA_OTEL_JAVA_VERSION=v1.21.0
129
# OTEL_JAVA_INSTRUMENTATION_VERSION. Tag of the opentelemetry-java-instrumentation repository to use, e.g.: OTEL_JAVA_INSTRUMENTATION_VERSION=v1.21.0
1310
# OTEL_JAVA_CONTRIB_VERSION. Tag of the opentelemetry-java-contrib repository. E.g.: OTEL_JAVA_CONTRIB_VERSION=v1.21.0
1411
# This script will fail if a variable that is supposed to exist is referenced.
1512

16-
if [[ ! -f .github/patches/${BRANCH}/versions ]]; then
13+
if [[ ! -f .github/patches/versions ]]; then
1714
echo "No versions file found. Skipping patching"
1815
exit 0
1916
fi
2017

21-
source .github/patches/${BRANCH}/versions
18+
source .github/patches/versions
2219

2320
git config --global user.email "[email protected]"
2421
git config --global user.name "ADOT Patch workflow"
2522

2623

27-
OTEL_JAVA_PATCH=".github/patches/${BRANCH}/opentelemetry-java.patch"
24+
OTEL_JAVA_PATCH=".github/patches/opentelemetry-java.patch"
2825
if [[ -f "$OTEL_JAVA_PATCH" ]]; then
2926
git clone https://github.com/open-telemetry/opentelemetry-java.git
3027
cd opentelemetry-java
@@ -37,7 +34,7 @@ else
3734
fi
3835

3936

40-
OTEL_JAVA_CONTRIB_PATCH=".github/patches/${BRANCH}/opentelemetry-java-contrib.patch"
37+
OTEL_JAVA_CONTRIB_PATCH=".github/patches/opentelemetry-java-contrib.patch"
4138
if [[ -f "$OTEL_JAVA_CONTRIB_PATCH" ]]; then
4239
git clone https://github.com/open-telemetry/opentelemetry-java-contrib.git
4340
cd opentelemetry-java-contrib
@@ -50,7 +47,7 @@ else
5047
fi
5148

5249

53-
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/${BRANCH}/opentelemetry-java-instrumentation.patch"
50+
OTEL_JAVA_INSTRUMENTATION_PATCH=".github/patches/opentelemetry-java-instrumentation.patch"
5451
if [[ -f "$OTEL_JAVA_INSTRUMENTATION_PATCH" ]]; then
5552
git clone https://github.com/open-telemetry/opentelemetry-java-instrumentation.git
5653
cd opentelemetry-java-instrumentation

.github/workflows/appsignals-e2e-ec2-test.yml

Lines changed: 48 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ permissions:
1717
contents: read
1818

1919
env:
20-
AWS_DEFAULT_REGION: ${{ inputs.aws-region }} # Used by terraform and AWS CLI commands
20+
# The precense of this env var is required for use by terraform and AWS CLI commands
21+
# It is not redundant
22+
AWS_DEFAULT_REGION: ${{ inputs.aws-region }}
2123
TEST_ACCOUNT: ${{ secrets.APP_SIGNALS_E2E_TEST_ACC }}
22-
SAMPLE_APP_FRONTEND_SERVICE_JAR: "s3://aws-appsignals-sample-app/main-service.jar"
23-
SAMPLE_APP_REMOTE_SERVICE_JAR: "s3://aws-appsignals-sample-app/remote-service.jar"
24+
SAMPLE_APP_FRONTEND_SERVICE_JAR: ${{ secrets.APP_SIGNALS_E2E_FE_SA_JAR }}
25+
SAMPLE_APP_REMOTE_SERVICE_JAR: ${{ secrets.APP_SIGNALS_E2E_RE_SA_JAR }}
2426
APP_SIGNALS_ADOT_JAR: "https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar"
2527
METRIC_NAMESPACE: AppSignals
2628
LOG_GROUP_NAME: /aws/appsignals/generic
@@ -33,14 +35,18 @@ jobs:
3335
with:
3436
fetch-depth: 0
3537

38+
- uses: actions/setup-java@v4
39+
with:
40+
java-version: 17
41+
distribution: temurin
42+
3643
- name: Set CW Agent RPM environment variable
3744
run: |
3845
if [ ${{ env.AWS_DEFAULT_REGION }} == "us-east-1" ]; then
39-
echo APP_SIGNALS_CW_AGENT_RPM="https://amazoncloudwatch-agent-us-east-1.s3.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
46+
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-us-east-1.s3.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
4047
else
41-
echo APP_SIGNALS_CW_AGENT_RPM="https://amazoncloudwatch-agent-${{ env.AWS_DEFAULT_REGION }}.s3.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
48+
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ env.AWS_DEFAULT_REGION }}.s3.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
4249
fi
43-
4450
4551
- name: Generate testing id
4652
run: echo TESTING_ID="${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
@@ -51,6 +57,24 @@ jobs:
5157
role-to-assume: ${{ secrets.E2E_TEST_ROLE_ARN }}
5258
aws-region: ${{ env.AWS_DEFAULT_REGION }}
5359

60+
- uses: actions/download-artifact@v3
61+
if: inputs.caller-workflow-name == 'main-build'
62+
with:
63+
name: aws-opentelemetry-agent.jar
64+
65+
- name: Upload main-build adot.jar to s3
66+
if: inputs.caller-workflow-name == 'main-build'
67+
run: aws s3 cp ./aws-opentelemetry-agent-*-SNAPSHOT.jar s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar
68+
69+
- name: Set Get ADOT.jar command environment variable
70+
working-directory: testing/terraform/ec2
71+
run: |
72+
if [ ${{ inputs.caller-workflow-name }} == "main-build" ]; then
73+
echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV
74+
else
75+
echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV
76+
fi
77+
5478
- name: Set up terraform
5579
uses: hashicorp/setup-terraform@v3
5680
with:
@@ -76,8 +100,8 @@ jobs:
76100
-var="test_id=${{ env.TESTING_ID }}" \
77101
-var="sample_app_jar=${{ env.SAMPLE_APP_FRONTEND_SERVICE_JAR }}" \
78102
-var="sample_remote_app_jar=${{ env.SAMPLE_APP_REMOTE_SERVICE_JAR }}" \
79-
-var="cw_agent_rpm=${{ env.APP_SIGNALS_CW_AGENT_RPM }}" \
80-
-var="adot_jar=${{ env.APP_SIGNALS_ADOT_JAR }}" \
103+
-var="get_cw_agent_rpm_command=${{ env.GET_CW_AGENT_RPM_COMMAND }}" \
104+
-var="get_adot_jar_command=${{ env.GET_ADOT_JAR_COMMAND }}" \
81105
|| deployment_failed=$?
82106
83107
if [ $deployment_failed -eq 1 ]; then
@@ -123,6 +147,22 @@ jobs:
123147
fi
124148
done
125149
150+
# cache local patch outputs
151+
- name: Cache local Maven repository
152+
id: cache-local-maven-repo
153+
uses: actions/cache@v3
154+
with:
155+
path: |
156+
~/.m2/repository/io/opentelemetry/
157+
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}
158+
159+
- name: Publish patched dependencies to maven local
160+
uses: ./.github/actions/patch-dependencies
161+
if: steps.cache-local-maven-repo.outputs.cache-hit != 'true'
162+
with:
163+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
164+
gpg_password: ${{ secrets.GPG_PASSPHRASE }}
165+
126166
- name: Get the ec2 instance ami id
127167
run: |
128168
echo "EC2_INSTANCE_AMI=$(terraform output ec2_instance_ami)" >> $GITHUB_ENV
@@ -211,9 +251,7 @@ jobs:
211251
--region ${{ env.AWS_DEFAULT_REGION }}
212252
fi
213253
214-
215254
# Clean up Procedures
216-
217255
- name: Terraform destroy
218256
if: always()
219257
continue-on-error: true

0 commit comments

Comments
 (0)