From 81cc81014f32f1b5087ce4de86a0ddd7e555c54c Mon Sep 17 00:00:00 2001 From: DenMat <694767+denmat@users.noreply.github.com> Date: Fri, 30 Nov 2018 15:54:24 +1100 Subject: [PATCH] Publish code --- hooks/command | 2 +- tests/command.bats | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hooks/command b/hooks/command index 7a6eea5..7063481 100755 --- a/hooks/command +++ b/hooks/command @@ -2,7 +2,7 @@ set -euo pipefail -deploy_command=("aws" "lambda" "update-function-code") +deploy_command=("aws" "lambda" "update-function-code" "--publish") aws_s3_copy_command=("aws" "s3" "cp" "--acl" "private") BUILDKITE_PLUGIN_LAMBDA_DEPLOY_FUNCTION_NAME=${BUILDKITE_PLUGIN_LAMBDA_DEPLOY_FUNCTION_NAME:-''} diff --git a/tests/command.bats b/tests/command.bats index c7d2435..021f708 100644 --- a/tests/command.bats +++ b/tests/command.bats @@ -40,7 +40,7 @@ teardown() { ": echo 'TWpJeU1qSXlNakl5TWpJSwo='" stub aws \ "s3 cp --acl private --region ap-southeast-2 /plugin/fake/path/myfunc-2323.zip s3://myfuncbucket/deploy_code/production/myfunc-2323.zip : echo 'upload: test.txt to s3://myfuncbucket/deploy_code/production/myfunc-2323.zip'" \ - "lambda update-function-code --function-name myfunc --region ap-southeast-2 --s3-bucket myfuncbucket --s3-key deploy_code/production/myfunc-2323.zip : cat tests/lambda_output.json" + "lambda update-function-code --publish --function-name myfunc --region ap-southeast-2 --s3-bucket myfuncbucket --s3-key deploy_code/production/myfunc-2323.zip : cat tests/lambda_output.json" stub jq \ "'.CodeSha256' : echo 'TWpJeU1qSXlNakl5TWpJSwo='" @@ -65,7 +65,7 @@ teardown() { stub base64 \ ": echo 'TWpJeU1qSXlNakl5TWpJSwo='" stub aws \ - "lambda update-function-code --function-name myfunc --region ap-southeast-2 --zip-file fileb:///plugin/fake/path/myfunc-2323.zip : cat tests/lambda_output.json" + "lambda update-function-code --publish --function-name myfunc --region ap-southeast-2 --zip-file fileb:///plugin/fake/path/myfunc-2323.zip : cat tests/lambda_output.json" stub jq \ "'.CodeSha256' : echo 'TWpJeU1qSXlNakl5TWpJSwo='" @@ -90,7 +90,7 @@ teardown() { stub base64 \ ": echo 'TWpJeU1qSXlNakl5TWpJSwo='" stub aws \ - "lambda update-function-code --function-name myfunc --region ap-southeast-2 --zip-file fileb:///plugin/myfunc-2323.zip : cat tests/lambda_output.json" + "lambda update-function-code --publish --function-name myfunc --region ap-southeast-2 --zip-file fileb:///plugin/myfunc-2323.zip : cat tests/lambda_output.json" stub jq \ "'.CodeSha256' : echo 'TWpJeU1qSXlNakl5TWpJSwo='" @@ -115,7 +115,7 @@ teardown() { ": echo 'TWpJeU1qSXlNakl5TWpJSwo='" stub aws \ "s3 cp --acl private --region ap-southeast-2 /plugin/fake/path/myfunc-2323.zip s3://myfuncbucket/deploy_code/production/myfunc-2323.zip : echo 'upload: test.txt to s3://myfuncbucket/deploy_code/production/myfunc-2323.zip'" \ - "lambda update-function-code --function-name myfunc --region ap-southeast-2 --s3-bucket myfuncbucket --s3-key deploy_code/production/myfunc-2323.zip : cat tests/lambda_output.json" + "lambda update-function-code --publish --function-name myfunc --region ap-southeast-2 --s3-bucket myfuncbucket --s3-key deploy_code/production/myfunc-2323.zip : cat tests/lambda_output.json" stub jq \ "'.CodeSha256' : echo 'NOTAGOODSHA'"