For example I have a deploy step and a test step in my pipeline.
If I run them in parallel and a test fails, but deploy finishes faster, will the deploy already be done even though the tests failed?
Or do the changes in that step revert?
My goal is to run test and deploy in parallel so if they do succeed it is much faster, but if they fail then deploy doesn't actually deploy broken code.
Not sure if this is possible.
Hi Drew!
If I run them in parallel and a test fails, but deploy finishes faster, will the deploy already be done even though the tests failed?
Yes, the deploy will already be done and the changes will not be reverted.
There is an option fail-fast: true for parallel steps (see the doc here), that will make the whole parallel group stop if a step fails. However, I don't think this will be useful for your use case because if the deploy finishes faster the changes will not be reverted in this case either.
If you don't want to deploy broken code, then the deploy step shouldn't be in the parallel set of test, so that if the test fails the build stops and the deploy doesn't happen.
Kind regards,
Theodora
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.