Skip to content

Commit 4a3437d

Browse files
[Java] Deploy sample app to adaptive sampling test account (#439)
1 parent 168216c commit 4a3437d

File tree

1 file changed

+38
-1
lines changed

1 file changed

+38
-1
lines changed

.github/workflows/java-sample-app-s3-deploy.yml

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ jobs:
8686
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }}
8787
aws-region: ${{ matrix.aws-region }}
8888

89-
- name: Build and Upload Main Jar
89+
- name: Build and Upload Remote Jar
9090
working-directory: sample-apps/java/springboot-remote-service
9191
run: |
9292
gradle build -P javaVersion=11
@@ -206,3 +206,40 @@ jobs:
206206
gradle build
207207
gradle createLambdaZip
208208
aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ matrix.aws-region }} --body ./build/distributions/lambda-function.zip --key java-lambda-function.zip
209+
210+
java-v11-adaptive-sampling:
211+
runs-on: ubuntu-latest
212+
steps:
213+
- uses: actions/checkout@v4
214+
with:
215+
fetch-depth: 0
216+
217+
- name: Configure AWS Credentials
218+
uses: aws-actions/configure-aws-credentials@v4
219+
with:
220+
role-to-assume: arn:aws:iam::${{ env.E2E_TEST_ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }}
221+
aws-region: us-east-1
222+
223+
- name: Retrieve account
224+
uses: aws-actions/aws-secretsmanager-get-secrets@v1
225+
with:
226+
secret-ids:
227+
ACCOUNT_ID, adaptive-sampling-region-account/prod-us-west-2
228+
229+
- name: Configure AWS Credentials
230+
uses: aws-actions/configure-aws-credentials@v4
231+
with:
232+
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ env.E2E_TEST_ROLE_NAME }}
233+
aws-region: us-west-2
234+
235+
- name: Build and Upload Main JAR
236+
working-directory: sample-apps/java/springboot-main-service
237+
run: |
238+
gradle build -P javaVersion=11
239+
aws s3api put-object --bucket aws-appsignals-sample-app-prod-us-west-2-adap --body ./build/libs/springboot-*-SNAPSHOT.jar --key java-main-service-v11.jar
240+
241+
- name: Build and Upload Remote JAR
242+
working-directory: sample-apps/java/springboot-remote-service
243+
run: |
244+
gradle build -P javaVersion=11
245+
aws s3api put-object --bucket aws-appsignals-sample-app-prod-us-west-2-adap --body build/libs/springboot-remote-service-*-SNAPSHOT.jar --key java-remote-service-v11.jar

0 commit comments

Comments
 (0)