Skip to content

Commit

Permalink
Reorder commands to try to prevent the "An update is in progress..." …
Browse files Browse the repository at this point in the history
…error
  • Loading branch information
UVADave committed Oct 17, 2024
1 parent f7be150 commit 89ce7f5
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions pipeline/cdn-reporter-deployspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,16 @@ phases:

build:
commands:
#
# Update Lambda function code from S3
#
- echo "Updating Lambda Function Code from S3..."
- |
aws lambda update-function-code \
--function-name uvalib-cdn-reporter-production \
--s3-bucket ${deploy_bucket} \
--s3-key ${deploy_payload}
#
# Publish the Lambda layer from S3
#
Expand All @@ -40,6 +50,12 @@ phases:
- LAYER_VERSION_ARN=$(aws lambda list-layer-versions --layer-name goaccess-binary --max-items 1 --query 'LayerVersions[0].LayerVersionArn' --output text | head -1)
- echo "Published Layer ARN ${LAYER_VERSION_ARN}"

#
# dont like this at all...
#
#- echo "Sleeping for 10 seconds to give update command a chance to complete..."
#- sleep 10

#
# Update the Lambda function to use the new layer
#
Expand All @@ -49,16 +65,6 @@ phases:
--function-name uvalib-cdn-reporter-production \
--layers ${LAYER_VERSION_ARN}
#
# Update Lambda function code from S3
#
- echo "Updating Lambda Function Code from S3..."
- |
aws lambda update-function-code \
--function-name uvalib-cdn-reporter-production \
--s3-bucket ${deploy_bucket} \
--s3-key ${deploy_payload}
#
# end of file
#

0 comments on commit 89ce7f5

Please sign in to comment.