0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

CircleCI 2.0 の Manual Approval のハマりどころ

Posted at

よく見るとドキュメントの例に書いてあるのですがハマったので備忘録です。

jobs:
  build:
  deploy_to_staging_with_approval: # 手動でデプロイするジョブ

workflows:
  build_accept_deploy:
    jobs:
      - build:
          # 略
      - deploy_to_staging_with_approval:
          type: approval
          requires:
            - build
          filters:
            branches:
              only:
                - /特定の命名規則にマッチする正規表現/

jobs:
  build:
  deploy_to_staging_with_approval:

workflows:
  build_accept_deploy:
    jobs:
      - build:
          # 略
      - approve_deploy_to_staging: # Manual Approval 用のジョブをはさむ!
          type: approval
          requires:
            - build
          filters:
            branches:
              only:
                - /特定の命名規則にマッチする正規表現/
      - deploy_to_staging_with_approval: # こっちが実際にデプロイするジョブ
          requires:
            - approve_deploy_to_staging

Manual Approva は UI 上は成功したようにみえるんですが、ログみれなくてどこまでうまくいっててどこから失敗しているのかわからない(Approval だけの機能なので当たり前...)ので調べるのがめっちゃ大変でした。

というわけで Manual Approval のジョブとデプロイのジョブはわけましょうというお話でした。

以上です。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?