CodeCommit上のリポジトリを更新してみます。
前提条件
CodeCommitリポジトリへのSSHアクセス権限
CodeCommit上のリポジトリにSSHでアクセスする権限があること。
unixコマンド
- curlコマンドが利用できること。
- unzipコマンドが利用できること。
- 準備
=======
ローカルリポジトリへの移動
コマンド
cd ~/tmp/${CODEC_REPOSITORY_NAME} \
&& pwd
-
事前作業
=========== -
リポジトリへの登録
=====================
コマンド
cat << EOF > index.html
<!DOCTYPE html>
<html>
<head>
<title>Updated Sample Deployment</title>
<style>
body {
color: #000000;
background-color: #CCFFCC;
font-family: Arial, sans-serif;
font-size:14px;
}
h1 {
font-size: 250%;
font-weight: normal;
margin-bottom: 0;
}
h2 {
font-size: 175%;
font-weight: normal;
margin-bottom: 0;
}
</style>
</head>
<body>
<div align="center"><h1>Updated Sample Deployment</h1></div>
<div align="center"><h2>This application was updated using AWS CodePipeline, AWS CodeCommit, and AWS CodeDeploy.</h2></div>
<div align="center">
<p>Learn more:</p>
<p><a href="http://docs.aws.amazon.com/codepipeline/latest/userguide/">AWS CodePipeline User Guide</a></p>
<p><a href="http://docs.aws.amazon.com/codecommit/latest/userguide/">AWS CodeCommit User Guide</a></p>
<p><a href="http://docs.aws.amazon.com/codedeploy/latest/userguide/">AWS CodeDeploy User Guide</a></p>
</div>
</body>
</html>
EOF
cat index.html
コマンド
git commit -am "Updated sample application files" \
&& git push
- 事後作業
===========
コマンド
git log
結果(例)
commit xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Author: taro <taro@example.com>
Date: Sun Oct 10 13:40:00 2016 +0900
Added sample application files