Copilot-cli: Pipeline: support manual approvals

Created on 22 Jul 2020  路  4Comments  路  Source: aws/copilot-cli

In our pipeline.yml we should support the ability to add:

   requires_approval: true

This will generate a manual approval action in the Pipeline.

arepipeline good first issue

Most helpful comment

I think once we have the manifest version of the requires approval, we can stop the behavior of implicitly setting it for production environments. Instead, when a production environment is added via pipeline init, we can add the requires_approval: true line. That way customers can choose to remove it :D

What do ya'll think of that?

For example, imagine I have two environments

  • test
  • prod (production)

When someone runs pipeline init, we generate a manifest file that's like:

$ copilot pipeline init --environments "test,prod" 
name: pipeline-ecs-kudos-kohidave-demo-api-frontend
version: 1
source:
  provider: GitHub
  properties:
   ...
stages:
    -
      name: test
      requires_approval: true
      test_commands:
        - make test
        - echo "woo! Tests passed"
    -
      name: prod

All 4 comments

I'll implement it. I plan to name the property as "requires_approval" using underscore like "test_commands".

I just noticed that some version of this is already in place, a manual approval step is included on environments that have Production: true.

Yes, if an environment is created with --prod option, a manual approval action for it is added implicitly. I plan to add the property in manifest file (pipeline.yml) to enable a manual approval action explicitly regardless prod environment or not. Or should we make environment as prod without adding the new property when we want to set a manual approve action?

I think once we have the manifest version of the requires approval, we can stop the behavior of implicitly setting it for production environments. Instead, when a production environment is added via pipeline init, we can add the requires_approval: true line. That way customers can choose to remove it :D

What do ya'll think of that?

For example, imagine I have two environments

  • test
  • prod (production)

When someone runs pipeline init, we generate a manifest file that's like:

$ copilot pipeline init --environments "test,prod" 
name: pipeline-ecs-kudos-kohidave-demo-api-frontend
version: 1
source:
  provider: GitHub
  properties:
   ...
stages:
    -
      name: test
      requires_approval: true
      test_commands:
        - make test
        - echo "woo! Tests passed"
    -
      name: prod
Was this page helpful?
0 / 5 - 0 ratings

Related issues

sundarnarasiman picture sundarnarasiman  路  3Comments

kohidave picture kohidave  路  3Comments

iamhopaul123 picture iamhopaul123  路  3Comments

mikelhamer picture mikelhamer  路  3Comments

srrengar picture srrengar  路  3Comments