Replies: 4 comments
-
|
Its documented in the swagger. https://docs.dependencytrack.org/integrations/rest-api/ Also note, the Jenkins plugin is not maintained here. It has its own maintainer independent of this project. |
Beta Was this translation helpful? Give feedback.
-
|
No, I'm using the DT Jenkins Plugin, and I want the plugin to create the project automatically. Of course, give to PROJECT_CREATION_UPLOAD. |
Beta Was this translation helpful? Give feedback.
-
|
Refer to https://github.com/jenkinsci/dependency-track-plugin |
Beta Was this translation helpful? Give feedback.
-
|
POSTing to the REST API use "autoCreate=true" and specify "projectName=YOUR_NEW_NAME_HERE". Optionally you can also specify a "projectVersion". I tested the following (DependencyTrack 4.2.1):
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
you have two options:
Sample pipeline
node { stage "Publish Dependency-Track results" dependencyTrackPublisher artifact: 'bom.xml', artifactType: 'bom', projectName: 'Acme Example', projectVersion: '1.0', synchronous: true //dependencyTrackPublisher artifact: 'bom.xml', artifactType: 'bom', projectId: '3a38aedf-e9e9-4e0a-8913-2d99951aa76d', synchronous: true }Console output
The projectName and projectVersion can obviously be variables injected from your build as well.
Originally posted by @stevespringett in #499 (comment)
Beta Was this translation helpful? Give feedback.
All reactions