orb 球、天体
.circleディレクトリにconfig.ymlを作成する。
config.yml ファイルで使用される CircleCI 2.x 構成キーのリファレンス ガイドです。
上記は実際のファイルのインデントに沿って記載されている。
https://circleci.com/docs/ja/executor-intro/
上記がとてもわかり易い。
各ジョブでdockerやmachineプロパティで定義できる。
また共通して使用するものをexecutorsプロパティで定義することで、使い回すこともできる。
例えばcircleci/aws-ecr@8.2.1の実行環境のデフォルトExecutorはここに記載されている。
各ジョブにdocker、machineなどでExecutorを設定していない場合はデフォルトのExecutorが使用される。
https://circleci.com/docs/2.0/pipeline-variables/#pipeline-parameters-in-configuration
https://circleci.com/docs/ja/2.0/configuration-reference/?section=configuration#steps
# 基本形式
# ...
steps:
- run:
name: テストの実行
command: echo "Hellow World"
# 省略形式
steps:
- run: command: echo "Hellow World"
checkoutなどビルトインのstep例。
steps:
- checkout
CircleCI のワークフロー モデルは、先行ジョブのオーケストレーションに基づいています。
https://circleci.com/docs/ja/2.0/config-intro/?section=configuration
/home/circleci/projectstepsを実行するディレクトリでありconfig.ymlでの./は↑checkoutは↑に配置run: pwdで確認できるworking_directoryで変更可能ref.
マップとは
キー: 値
Mergeの例
ommon: &common
common_steps:
- a
- b
sample1:
<<: *common
own_steps:
- c
- d
sample2:
<<: *common
own_steps:
- e
- f
{
"sample1": {
"own_steps": [
"c",
"d"
],
"common_steps": [
"a",
"b"
]
},
"common": {
"common_steps": [
"a",
"b"
]
},
"sample2": {
"own_steps": [
"e",
"f"
],
"common_steps": [
"a",
"b"
]
}
}
ref. https://circleci.com/ja/blog/what-is-yaml-a-beginner-s-guide/