3
3

More than 5 years have passed since last update.

Terraformで管理している環境にCodeDeployでアプリをデプロイするときに使ってるコマンド

Last updated at Posted at 2015-09-30

※terraformとaws-cliが必要です

#!/bin/bash

APP=myapp
BRANCH=master
DEPLOYMENT_GROUP=$(terraform output 'asg_name')
COMMIT_ID=$(git ls-remote git@github.com:$GITHUB_REPO refs/heads/$BRANCH | awk '{ print $1 }’)

aws deploy create-deployment --application-name $APP \
  --deployment-group $DEPLOYMENT_GROUP \
  --github-location commitId=$COMMIT_ID,repository=$GITHUB_REPO
3
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3