Ignore redeploy errors.
Closed this issue · 4 comments
When trying to push a build that's already deployed, Nexus responds with a 400 "Bad Request". This is fine, as the correct build is already uploaded, but the build fails on the 400 - confusing product and developers as to the status of the pipeline.
It would be sweet if there was a switch on maven-resource we could flip in order to allow this duplicate error to still make the build green.
Thanks!
We could implement a disable_redeploy
flag on the resource configuration:
- name: maven-release
type: maven-resource
source:
url: {{maven-release-url}}
artifact: com.example:myartifact:jar
username: {{maven-release-username}}
password: {{maven-release-password}}
skip_cert_check: {{maven-release-skip-ssl}}
disable_redeploy: true
If disable_redeploy: true
(defaults to false
) we would use curl
to check for the existence of the artifact in the repository before running the mvn deploy:deploy-file
command.
Please let me know if this would satisfy your needs.
oops, wrong Pivotal Tracker story. This is the correct one:
https://www.pivotaltracker.com/n/projects/1789539/stories/142618725
Implemented in 1.3.0/latest