Can I skip one of the action in CodeBuild ? to continue the pipieline

0

Hello guys, I have a pipeline Source -> CodeBuild -> Deploy And I have two actions in the CodeBuild. I found out if one of the action of failed, the pipeline will stop. This action in CodeBuild is optional to the project, so I want to continue the pipeline to Deploy even the action is failed in CodeBuild. Thanks!

質問済み 2年前3977ビュー
2回答
1
承認された回答

Hello,

Currently, CodePipeline does not support skipping a stage/action. The available option to bypass this failing stage would be to edit the pipeline, remove the action and re-run the Pipeline.

You may automate the process of bypassing the failing stage by creating an event rule to monitor the Pipeline for failed action-level events. This event can then be routed to targets such as Lambda and SNS. The Lambda can be configured to make GetPipeline and UpdatePipeline calls to remove the failing action.

There is an existing feature request for CodePipeline to support skipping a stage or action and I have added your request to it. While I am unable to comment on if/when this feature may get released, I request you to keep an eye on our What's New, Document History and Blog pages for any new feature announcements.

AWS
回答済み 2年前
  • +1 need support for this

0

I dont think there is direct support for this. However, the way I worked around it was:

  1. Add a Pipeline Variable called something like "ACTION" with a value of "process", "apply" or, in this case, "no-op" to represent a bypass scenario.
  2. In your buildspec (or scripts) add the little logic to evaluate that ACTION. Something like the code below.
if [ $ACTION == "process" ]; then
   process.sh
elif [$ACTION == "no-op"]; then
  echo "Received value of no-op, bypassing this step"
....etc. 
DaveC
回答済み 2年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ