Skip to content

Commit

Permalink
Trying ZipFile for smoke test source instead of S3
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcundill committed Sep 5, 2024
1 parent 1bf6b5e commit 362f633
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/deploy-smoke-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,21 @@ jobs:
aws-secret-access-key: ${{ secrets.DEPLOY_AWS_SECRET_ACCESS_KEY }}
aws-region: eu-west-2

- name: Upload smoke test code archive to S3
working-directory: ./tests/smoke
run: |
aws s3 cp smoke-test-package.zip s3://${{ matrix.environment }}-canary-code-bucket/main/smoke-test-package.zip
# - name: Upload smoke test code archive to S3
# working-directory: ./tests/smoke
# run: |
# aws s3 cp smoke-test-package.zip s3://${{ matrix.environment }}-canary-code-bucket/main/smoke-test-package.zip

- name: Get S3 Object version
id: canary-code-s3-version
run: |
S3_OBJECT_VERSION=$(aws s3api list-object-versions --bucket ${{ matrix.environment }}-canary-code-bucket --prefix main/smoke-test-package.zip --query 'Versions[?IsLatest].[VersionId]' --output text)
echo "VERSION=$S3_OBJECT_VERSION" >> "$GITHUB_OUTPUT"
# - name: Get S3 Object version
# id: canary-code-s3-version
# run: |
# S3_OBJECT_VERSION=$(aws s3api list-object-versions --bucket ${{ matrix.environment }}-canary-code-bucket --prefix main/smoke-test-package.zip --query 'Versions[?IsLatest].[VersionId]' --output text)
# echo "VERSION=$S3_OBJECT_VERSION" >> "$GITHUB_OUTPUT"

- name: Update AWS Synthetics Canary function code in development environment
if: ${{ matrix.environment == 'development' }}
run: |
aws synthetics update-canary \
--name www \
--code S3Bucket=${{ matrix.environment }}-canary-code-bucket,S3Key=main/smoke-test-package.zip,S3Version=${{ steps.canary-code-s3-version.outputs.VERSION }},Handler=smoke_canary.handler
--code ZipFile=./tests/smoke/smoke-test-package.zip,Handler=smoke_canary.handler
# --code S3Bucket=${{ matrix.environment }}-canary-code-bucket,S3Key=main/smoke-test-package.zip,S3Version=${{ steps.canary-code-s3-version.outputs.VERSION }},Handler=smoke_canary.handler

0 comments on commit 362f633

Please sign in to comment.