Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Silent failure with missing artifact during publish to DependencyTrack #1486

Closed
putz612 opened this issue Sep 11, 2018 · 4 comments
Closed
Labels

Comments

@putz612
Copy link
Contributor

putz612 commented Sep 11, 2018

I have added the publish to DependencyTrack to my pipeline however during testing I noticed that if it could not find the artifact the build would fail in the console output it would not really state that it was a hard failure. Looking at the pipeline steps every stage would show success making harder to determine the cause of the failure.

From the logs

........
[Pipeline] dependencyTrackPublisher
[DependencyTrack] Publishing artifact to Dependency-Track
[DependencyTrack] The specified artifact does not exist
........
Finished: FAILURE

@jeremylong
Copy link
Owner

This ticket should probably be opened on the dependency-track project: https://github.com/DependencyTrack/dependency-track

--Jeremy

@putz612
Copy link
Contributor Author

putz612 commented Sep 12, 2018

Do they manage the dependency-check upload to dependency-track portion if the Jenkins plugin because the issue is somewhere in that process. I am unsure who owns that portion of code being that the dependencyTrackPublisher step in my Jenkinsfile comes from the dependency-check plugin.

@stevespringett
Copy link
Collaborator

The Dependency-Track publisher is part https://github.com/jenkinsci/dependency-check-plugin

However, I don't think there's a whole lot that can be done to improve this issue. Plugins have the ability to set the build status to:

  • SUCCESS
  • UNSTABLE
  • FAILURE
  • NOT_BUILT
  • ABORTED

If the dependency-check report specified in the job config doesn't exist when it attempts to upload it to Dependency-Track, the plugin will log The specified artifact does not exist to the console and set the build to FAILURE. The issue you're describing seems to be more of a Jenkins usability issue. There should be a better way to find out which step in the pipeline had an issue, and I agree.

If there are other things that can be done in the plugin to improve visibility into which step caused the issue, please open a PR and submit an issue to https://issues.jenkins-ci.org.

@putz612
Copy link
Contributor Author

putz612 commented Sep 13, 2018

Is there a way to fail the step vs the build so you can see where the failure is? I was using the verbiage described in another plugin that users were reporting similar results. Probably the best known is in archiveArtifacts on https://issues.jenkins-ci.org/browse/JENKINS-38005

There is two PR with different ways of failing the step and/or better log messages. Not very good at Java but I will try to see what I can do to help.
jenkinsci/jenkins#2823

@lock lock bot locked and limited conversation to collaborators Nov 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants