I have a step that builds and deploys my app, like this:
./build
./deploy
Pushing to the repo, an application version is built and deployed. The thing is when the branching off that branch, this pipeline runs again, as designed. This is somewhat troublesome because the deploy script fails (using the same version id). To avoid unnecessary work, I added a check in the build script, which errors when in this situation.
Question: how to avoid running additional scripts in the step, at the same time marking the pipeline as successful, so no email is sent because a failure?
Edit: Also, skip every automatic step after that point.
Thanks in advance!