Closed bennettp123 closed 1 year ago
Okay I lied - just linter remaining, then good to go.
Okay I lied - just linter remaining, then good to go.
Haha no worries!
For the linter, I'm thinking of updating it to use shell parameter expansion ("$@"
) to pass the extra args—it should keep the linter happy, but more importantly, it won't allow globbing or word splitting of $INPUT_CODEDEPLOY_CONFIG_NAME
.
eg
function deployRevision() {
aws deploy create-deployment "$@" \
--application-name "$INPUT_CODEDEPLOY_NAME" \
--deployment-group-name "$INPUT_CODEDEPLOY_GROUP" \
--description "$GITHUB_REF - $GITHUB_SHA" \
--s3-location bucket="$INPUT_S3_BUCKET",bundleType=zip,eTag="$ZIP_ETAG",key="$INPUT_S3_FOLDER"/"$ZIP_FILENAME" | jq -r '.deploymentId'
}
# ...
if [ -n "$INPUT_CODEDEPLOY_CONFIG_NAME" ]; then
deployRevision --deployment-config-name "$INPUT_CODEDEPLOY_CONFIG_NAME"
else
deployRevision
fi
By default, CodeDeploy uses the deployment config attached to the deployment group, and if that's not set, it uses
CodeDeployDefault.OneAtATime
.However, there may be some cases where you need to temporarily override the deployment config—for example, during the initial deployment of an application, it's probably best to use
CodeDeployDefault.AllAtOnce
. This PR allows the deployment config to be overriddencodedeploy_config_name: <config-name>
codedeploy_config_name: CodeDeployDefault.OneAtATime
Split from #73