Reputation: 2266
Is there anyway to execute action in a pipeline stage based on a condition.
I mean for example, when the pipeline releases, it sources the source files at the source stage, and in the build, deploy or other stages are executed if a file exists in the artifact or is not empty...
In fact I would to execute the whole pipeline stages only when my condition is met...
Till I didn't see how to well achieve this.
What I think now to play on approval feature, I don't what you think and if one here has already had the same requirement.
Upvotes: 1
Views: 3228
Reputation: 3312
The simplest way to achieve this is likely to add a Test
stage to your pipeline. You test can simply check for the desired file in the build artifact, and simply fail the check if the file isn't there, which would halt the pipeline.
Usings tests with AWS CodePipeline
Upvotes: 2