feat(jenkins): Retry on 404 when getting build artifact #767
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is to fix spinnaker/spinnaker#5803. There is a small chance that the property file is not immediately available after build completes.
This PR adds retry on 404 when getting property file from Jenkins build, in addition to network/5XX errors.
Before this PR, if Jenkins return 404 on getPropertyFile it will not retried and the Jenkins stage will immediately fail. User will have to restart the stage just to get the build artifact.
After this PR, Igor will retry up to 5 times with 2 seconds non-exponential backoff if Jenkins return 404 code.