Help us understand the problem. What is going on with this article?

[JAWS-UG CLI] CodeCommit #2 サンプルコードの追加

More than 3 years have passed since last update.

CodeCommitのリポジトリにコードを追加してみます。

前提条件

CodeCommitリポジトリへのSSHアクセス権限

CodeCommit上のリポジトリにSSHでアクセスする権限があること。

unixコマンド

  • curlコマンドが利用できること。
  • unzipコマンドが利用できること。

0. 準備

ローカルリポジトリへの移動

コマンド
cd ~/tmp/${CODEC_REPOSITORY_NAME} \
  && pwd

1. 事前作業

サンプルコードの取得

変数の設定
FILE_SAMPLE='SampleApp_Linux.zip'
URL_SAMPLE="https://s3.amazonaws.com/aws-codedeploy-us-east-1/samples/latest/${FILE_SAMPLE}"
コマンド
curl ${URL_SAMPLE} > ${FILE_SAMPLE} \
        && unzip ${FILE_SAMPLE} \
        && rm ${FILE_SAMPLE}

2. リポジトリへの登録

コマンド
git add -A

結果:

  (戻り値なし)
```bash:コマンド:
git commit -m "Added sample application files"
結果(例)
      [master (root-commit) fce7ec3] Added sample application files
       7 files changed, 266 insertions(+)
       create mode 100644 LICENSE.txt
       create mode 100644 SampleApp_Linux.zip
       create mode 100644 appspec.yml
       create mode 100644 index.html
       create mode 100644 scripts/install_dependencies
       create mode 100644 scripts/start_server
       create mode 100644 scripts/stop_server
コマンド
git push
結果(例)
      ounting objects: 10, done.
      Delta compression using up to 4 threads.
      Compressing objects: 100% (8/8), done.
      Writing objects: 100% (10/10), 9.95 KiB | 0 bytes/s, done.
      Total 10 (delta 0), reused 0 (delta 0)
      remote:
      To ssh://git-codecommit.us-east-1.amazonaws.com/v1/repos/handson-20161010 * [new branch]      master -> master

3. 事後作業

コマンド
git log
結果(例)
      commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
      Author: taro <taro@example.com>
      Date:   Sun Oct 10 13:40:00 2016 +0900

          Added sample application files

完了

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした