以下は Copilot Pipeline の Manifest で利用できるすべてのプロパティのリストです。[Pipeline の概念](../concepts/pipelines.ja.md)説明のページも合わせてご覧ください。 ???+ note "継続的デリバリー Pipeline のサンプル Manifest" === "Release workloads" ```yaml # "app-pipeline" は、user/repo にあるすべての Service や Job を # "test" や "prod" Environment にデプロイします。 name: app-pipeline source: provider: GitHub properties: branch: main repository: https://github.com/user/repo # オプション。既存の CodeStar Connection の接続名を指定します。 # connection_name: a-connection build: image: aws/codebuild/amazonlinux2-x86_64-standard:3.0 # additional_policy: # コンテナイメージやテンプレートを構築する際に、権限を追加することができます。 stages: - # デフォルトでは、すべてのワークロードはステージ内で同時にデプロイされます。 name: test test_commands: - make integ-test - echo "woo! Tests passed" - name: prod requires_approval: true ``` === "Control order of deployments" ```yaml # また、ステージ内のスタックデプロイの順番を制御することも可能です。 # https://aws.github.io/copilot-cli/blogs/release-v118/#controlling-order-of-deployments-in-a-pipeline を参照してください。 name: app-pipeline source: provider: Bitbucket properties: branch: main repository: https://bitbucket.org/user/repo stages: - name: test deployments: orders: warehouse: frontend: depends_on: [orders, warehouse] - name: prod require_approval: true deployments: orders: warehouse: frontend: depends_on: [orders, warehouse] ``` === "Release environments" ```yaml # Environment Manifest の変更も、Pipeline でリリースすることができます。 name: env-pipeline source: provider: CodeCommit properties: branch: main repository: https://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo stages: - name: test deployments: deploy-env: template_path: infrastructure/test.env.yml template_config: infrastructure/test.env.params.json stack_name: app-test - name: prod deployments: deploy-prod: template_path: infrastructure/prod.env.yml template_config: infrastructure/prod.env.params.json stack_name: app-prod ``` `name` String Pipeline 名。
`version` String テンプレートのスキーマバージョン。現在サポートされているバージョンは `1` だけです。
`source` Map Pipeline のトリガーに関する設定。 source.`provider` String プロバイダー名。現在 `GitHub` 、 `Bitbucket` そして `CodeCommit` がサポートされています。 source.`properties` Map Pipeline のトリガーに関するプロバイダー固有の設定。 source.properties.`access_token_secret` String Pipeline をトリガーするための GitHub アクセストークンを保持する AWS Secrets Manager シークレットの名前。 (プロバイダーが GitHub で、個人のアクセストークンを利用して Pipeline を作成した場合) !!! info Copilot v1.4.0 から GitHub リポジトリをソースにする場合のアクセストークンは不要になりました。代わりに Copilot は [AWS CodeStar の GitHub への接続](https://docs.aws.amazon.com/ja_jp/codepipeline/latest/userguide/update-github-action-connections.html)を使って Pipeline をトリガーします。 source.properties.`branch` String Pipeline をトリガーするリポジトリのブランチ名。 Copilot は、このフィールドに現在のローカルブランチを自動的に入力します。 source.properties.`repository` String リポジトリの URL 。 source.properties.`connection_name` String 既存の CodeStar Connections の接続名。指定しない場合 Copilot は接続を作成します。 source.properties.`output_artifact_format` String 任意項目。アーティファクトの出力形式です。`CODEBUILD_CLONE_REF` または `CODE_ZIP` を指定します。省略した場合、デフォルトの `CODE_ZIP` が利用されます。 !!! info このプロパティは、`access_token_secret` を使用する[GitHub version 1](https://docs.aws.amazon.com/ja_jp/codepipeline/latest/userguide/appendix-github-oauth.html) ソースアクションでは利用できません。
`build` Map CodeBuild プロジェクトに関する設定。 build.`image` String CodeBuild のビルドプロジェクトで利用する Docker イメージの URI。`aws/codebuild/amazonlinux2-x86_64-standard:3.0` がデフォルトで利用されます。 build.`buildspec` String 任意項目。ビルドプロジェクトで利用する buildspec ファイルを指定する URI です。デフォルトでは、Copilot が buildspec ファイルを作成します。作成したファイルは、 `copilot/pipelines/[your pipeline name]/buildspec.yml` に配置されています。 build.`additional_policy.``PolicyDocument` Map 任意項目。ビルドプロジェクトロールに追加するポリシードキュメントを指定します。追加のポリシードキュメントは、以下の例のように YAML のマップに指定することができます。 ```yaml build: additional_policy: PolicyDocument: Version: 2012-10-17 Statement: - Effect: Allow Action: - ecr:GetAuthorizationToken Resource: '*' ``` or alternatively as JSON: ```yaml build: additional_policy: PolicyDocument: { “Statement": [ { "Action": ["ecr:GetAuthorizationToken"], "Effect": "Allow", "Resource": "*" } ], "Version": "2012-10-17" } ```
`stages` Array of Maps Pipeline のデプロイ先である 1 つ以上の Environment をデプロイしたい順番に並べたリスト。 stages.`name` String Service をデプロイする Environment 名。 stages.`requires_approval` Boolean Optional. Indicates whether to add a manual approval step before the deployment. Defaults to `false`. 任意項目。デプロイの前に手動承認ステップを追加するかどうかを示します。デフォルトは `false` です。 stages.`deployments` Map Optional. Control which CloudFormation stacks to deploy and their order. The `deployments` dependencies are specified in a map of the form: 任意項目。デプロイする CloudFormation スタックとその順序を制御します。 デプロイの依存関係は、次の形式の Map で指定されます。 ```yaml stages: - name: test deployments: : : depends_on: [, ...] ``` 例えば、Git リポジトリのレイアウトが次のようになっているとします。 ``` copilot ├── api │ └── manifest.yml └── frontend └── manifest.yml ``` また、`frontend` の前に `api` がデプロイされるようにデプロイの順序を制御したい場合は、ステージを次のように設定できます。 ```yaml stages: - name: test deployments: api: frontend: depends_on: - api ``` また、パイプラインの一部をリリースするマイクロサービスを制限することもできます。以下の Manifest では、`api` のみをデプロイし、`frontend` をデプロイしないよう指定しています。 ```yaml stages: - name: test deployments: api: ``` 最後に、もし `deployments` が指定されていない場合、デフォルトでは Copilot は git リポジトリにあるすべての Service と Job を並行してデプロイします。 stages.deployments.`` Map デプロイする Job または Service の名前。 stages.deployments.``.`depends_on` Array of Strings Optional. Name of other job or services that should be deployed prior to deploying this microservice. Defaults to no dependencies. 任意項目。このマイクロサービスをデプロイする前にデプロイする必要がある他の Job または Service の名前。デフォルトでは依存関係はありません。 stages.deployments.``.`stack_name` String 任意項目。作成または更新するスタックの名前。デフォルトは `--` です。 たとえば、Application 名が `demo`、ステージ名が `test`、Service 名が `frontend` の場合、スタック名は `demo-test-frontend` になります。 stages.deployments.``.`template_path` String 任意項目。`build` フェーズで生成された CloudFormation テンプレートへのパス。デフォルトは `infrastructure/-.yml` です。 stages.deployments.``.`template_config` String 任意項目。`build` フェーズで生成された CloudFormation テンプレート設定へのパス。デフォルトは `infrastructure/-.params.json` です。 stages.`test_commands` Array of Strings 任意項目。デプロイ後にインテグレーションテストまたは E2E テストを実行するコマンドです。デフォルトでは、デプロイ後の検証は行いません。