Skip to content

Commit 6556e09

Browse files
authored
Add sample app selection to sample app deployment workflow (#579)
*Description of changes:* Add sample app selection to sample app deployment workflow so users can select certain sample apps to be deployed instead of all sample apps being deployed at once. By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
1 parent 3202ac6 commit 6556e09

1 file changed

Lines changed: 20 additions & 1 deletion

File tree

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

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,18 @@
33

44
name: Sample App Deployment - Python S3
55
on:
6-
workflow_dispatch: # be able to run the workflow on demand
6+
workflow_dispatch:
7+
inputs:
8+
deploy-base-test-apps:
9+
description: 'Deploy main and remote Python sample apps'
10+
required: false
11+
default: true
12+
type: boolean
13+
deploy-genai-test-app:
14+
description: 'Deploy GenAI LangChain sample app'
15+
required: false
16+
default: true
17+
type: boolean
718

819
permissions:
920
id-token: write
@@ -47,35 +58,43 @@ jobs:
4758
aws-region: ${{ matrix.aws-region }}
4859

4960
- name: Build Sample App Zip
61+
if: inputs.deploy-base-test-apps != false
5062
working-directory: sample-apps/python
5163
run: zip -r python-sample-app.zip .
5264

5365
- name: Upload to S3
66+
if: inputs.deploy-base-test-apps != false
5467
working-directory: sample-apps/python
5568
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./python-sample-app.zip --key python-sample-app.zip
5669

5770
- name: Build Gen AI Sample App Zip
71+
if: inputs.deploy-genai-test-app != false
5872
working-directory: sample-apps/python/genai_service
5973
run: zip -r python-gen-ai-sample-app.zip .
6074

6175
- name: Upload Gen AI Sample App to S3
76+
if: inputs.deploy-genai-test-app != false
6277
working-directory: sample-apps/python/genai_service
6378
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./python-gen-ai-sample-app.zip --key python-genai-sample-app.zip
6479

6580
- name: Build Lambda Sample App
81+
if: inputs.deploy-base-test-apps != false
6682
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6783
with:
6884
repository: 'aws-observability/aws-otel-python-instrumentation'
6985
- name: Build sample lambda function
86+
if: inputs.deploy-base-test-apps != false
7087
shell: bash
7188
run: ./package-lambda-function.sh
7289
working-directory: lambda-layer/sample-apps
7390

7491
- name: Upload to Lambda Sample App to S3
92+
if: inputs.deploy-base-test-apps != false
7593
working-directory: lambda-layer/sample-apps
7694
run: aws s3api put-object --bucket ${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ matrix.aws-region }} --body ./build/function.zip --key pyfunction.zip
7795

7896
python-zip-adaptive-sampling:
97+
if: inputs.deploy-base-test-apps != false
7998
runs-on: ubuntu-latest
8099
steps:
81100
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0

0 commit comments

Comments
 (0)