Comments (5)
For async setup jobs this is "must have". For sync jobs it could be nice that the build did not fail, but instead gave the possibility to be unstable
from dependency-track-plugin.
Failing the build job if something is wrong with your build environment is a common behavior and it is intended (#9). It is also a signal (to you or Jenkins admin) that there is something abnormal and that needs your attention. If you want to ignore errors and make the job go on, use a pipeline job, wrap the dependencyTrackPublisher
call in a try-catch block and do whatever makes you happy when an exception occurred.
Declarative Pipeline example
pipeline {
agent any
stages {
stage('dependencyTrackPublisher') {
steps {
withCredentials([string(credentialsId: '506ed685-4e2b-4d31-a44f-8ba8e67b6341', variable: 'API_KEY')]) {
script {
try {
dependencyTrackPublisher artifact: 'target/bom.xml', projectName: 'my-project', projectVersion: 'my-version', synchronous: true, dependencyTrackApiKey: API_KEY
} catch (e) {
echo 'failed'
}
}
}
}
}
}
}
Scripted Pipeline example: see README
from dependency-track-plugin.
Thanks for that input. There is a lot of plugins for Jenkins supporting returning a response code when used, IMHO that would be much cleaner as this leaves the pipelines "in good shape" as you are able to create all you pipeline logic without a lot of try catches on different plugins.
It could be as simple as returning the HTTP code.
from dependency-track-plugin.
Hi @giacgbj
I face the same issue, I fix the code on my fork (rvsoni@eee4259)
I introduced an option on the global config advance section, also on job config, that can help you to just upload a BOM and not wait for the result, this would mark build success.
Pl. build this code and test it, Pl. let me know if there are any improvements,
Ravi
from dependency-track-plugin.
It prints the below logs on Jenkins and does not wait to collect the result. ```
Waiting for Jenkins to finish collecting data
channel stopped
[DependencyTrack] Publishing artifact to Dependency-Track - https://dtrack.example.com
[DependencyTrack] Not waiting for project analysis result.
[JaCoCo plugin] Collecting JaCoCo coverage data...
Ravi
from dependency-track-plugin.
Related Issues (20)
- Add the possibility to assign (newly created) projects to a team HOT 2
- Add Support for Identification of Aliases HOT 8
- Dtrack-API with contextpath not accessible
- Implement Support for SBOM Quality Score Tool (sbomqs) HOT 2
- Using the dependency-track-plugin behind an (authenticating) proxy HOT 1
- Allow overrideGlobals to override Global timeout and interval settings.
- Explanation of upload error "Error was: Input length = 1 HOT 1
- I don't want to show Dependency-Track Project on Jenkins HOT 1
- HTTP 403 Forbidden, but curl works fine HOT 1
- Upload with Parent uuid does not work with 4.10.0 HOT 2
- Request Tier 2 Plugin for Dependency Track CloudBees HOT 1
- how to build the project HOT 1
- Update to Vue.js 3
- Fails if Dependencey Track API server returns Not Modified HOT 3
- sbom upload fails with "Input length = 1" after Jenkins upgrade HOT 1
- Set stage as unstable
- Is it possible to fail Jenkins on specific critical finding instead of Critical integer value.
- Plugin throws exception when timeouts are 0 HOT 1
- Builds fail on return-code 304 - No Modification HOT 1
- upstream request timeout when uploading large sbom HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from dependency-track-plugin.