1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CodeDeployで指定したGitHubリポジトリのコードをデプロイする(CLI編)

Last updated at Posted at 2016-09-01

デプロイ自動化にむけてCLIからデプロイしてみる

$ aws deploy create-deployment \
  --application-name <name> \
  --deployment-group-name <group-name> \
  --github-location repository=<account>/<repos>,commitId=<SHA1>

リファレンス: create-deployment — AWS CLI 1.10.60 Command Reference

commitId に指定する SHA1 は以下のワンライナーで取得できる

$ git show -s --format=%H

参考: Git で現在チェックアウトしているコミットのID | そんなこと覚えてない

--description でブランチ名を入れておくと良いかもしれない
現在のブランチ名は以下で取得

$ git rev-parse --abbrev-ref HEAD

参考: git current-branchで現在のブランチ名を返す - There's an echo in my head

1
1
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
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?