Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the ability to use --cli-input-json to CodeDeploy deployment #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions deployment/scripts/codeship_aws_codedeploy_deploy
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
set -e
set -o pipefail

# This script also uses an environment variable called CODEDEPLOY_CLI_INPUT_JSON which when supplied, it
# will be passed into the --cli-input-json argument for 'aws deploy create-deployment'
APPLICATION_FOLDER=${1:?'You need to provide the directory with your code as the second parameter'}
APPLICATION_NAME=${2:?'You need to provide the CodeDeploy application name'}
DEPLOYMENT_GROUP_NAME=${3:?'You need to provide the Deployment Group name'}
Expand Down Expand Up @@ -38,6 +40,10 @@ if [ ! -z "$DEPLOYMENT_CONFIG_NAME" ]; then
deployment+=("--deployment-config-name" "$DEPLOYMENT_CONFIG_NAME")
fi

if [ ! -z "$CODEDEPLOY_CLI_INPUT_JSON" ]; then
deployment+=("--cli-input-json" "$CODEDEPLOY_CLI_INPUT_JSON")
fi

echo "Deployment Command: ${deployment[@]}"

deployment_id=$(aws deploy create-deployment "${deployment[@]}" | jq -r .deploymentId)
Expand Down