11/17 docker images
■docker container -> image にする
Dockerコンテナのコンソール上で、Ctrl-p+Ctrl-qを押してコンテナをデタッチします。
sudo docker commit -m "環境の説明とかを書きます" コンテナID イメージ名
保存されていることを確認します。
sudo docker images(実際)
docker commit f3705f4ee071 test_image2
■docker-composeで作成したdbを使う。
docker-compose.ymlを書き換える
で、docker-compose up -dする
- ビルド
- テスト
- デプロイ
pipeline {
agent any
stages {
stage('Build') {
steps {
echo 'Building..'
}
}
stage('Test') {
steps {
echo 'Testing..'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
}
}
}
}For more advanced usage with Scripted Pipeline, the example above node is a crucial first step as it allocates an executor and workspace for the Pipeline. In essence, without node, a Pipeline cannot do any work! From within node, the first order of business will be to checkout the source code for this project. Since the Jenkinsfile is being pulled directly from source control, Pipeline provides a quick and easy way to access the right revision of the source code
node {
checkout scm
/* .. snip .. */
}The checkout step will checkout code from source control; scm is a special variable which instructs the checkout step to clone the specific revision which triggered this Pipeline run. |
build/ test /deploy
-レジストリに登録されているコンテナを起動させる
-テストに際して鍵情報をコピーして渡す
-キャッシュなしのビルドを実行する
-特定のansibleホストを起動して、実行する
-playbookのbuildはrolesのbuildで、group_varsのcommon/stageも使用する
-commonにtest対象が記述されている /version /tag
-stageには各種のipadlessが記述
-uims-testはapiテストっぽいかな
-使用したらimageを削除
-migrateの部分のdb:migrateへの影響とかあるんかな...暗号化とテーブルとカラムの追加って関係ないっちゃないかな?
-uims.ymlではサービス基盤作成?でdbに関して作る?