Changes for page Jenkins Shared Library
Last modified by Boris Folgmann on 2025/11/03 09:41
From version 4.2
edited by Boris Folgmann
on 2025/11/03 08:42
on 2025/11/03 08:42
Change comment:
There is no comment for this version
To version 2.4
edited by Boris Folgmann
on 2025/07/09 16:15
on 2025/07/09 16:15
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -26,9 +26,8 @@ 26 26 1. Checking out the source code from git. 27 27 1. If a pom.xml is found your favorite JDK is selected, by default jdk11. Then a maven build is done. 28 28 1. If there's no pom.xml but a package.json is found a nodejs build is done. 29 -1. If there is no pom.xml or package.json but a go.mod file, a go build is done. 30 30 1. Then the following stages are executed in parallel 31 -11. Analysis: For maven projects the Java source code is checked by checkstyle, pmd and spotbugs. Furthermore the job output will be checked for any warnings generated by maven, javac or javadoc. If Python modules (.py files) exist in the git repository they will be analyzed using pylint and flake8. If pylint or flake8 are not available on the Jenkins agent the steps will be skipped. Python files that are generated or downloaded into the workspace will not be checked. The results will be displayed on the classical Jenkins build page after the build. For Go projects, the Go test tool is used to run all tests and produce a coverage output file for SonarQube. Additionally, the gotestsum tool is used to produce a report which is picked up by Jenkins.</dd>30 +11. Analysis: For maven projects the Java source code is checked by checkstyle, pmd and spotbugs. Furthermore the job output will be checked for any warnings generated by maven, javac or javadoc. If Python modules (.py files) exist in the git repository they will be analyzed using pylint and flake8. If pylint or flake8 are not available on the Jenkins agent the steps will be skipped. Python files that are generated or downloaded into the workspace will not be checked. The results will be displayed on the classical Jenkins build page after the build. 32 32 11. Security: If it's not a feature or bugfix branch a dependency check is done which checks if e.g. libraries are used which have known vulnerabilities. The results will be displayed in Jenkins after the build. 33 33 11. Docker: this will also work for projects which are neither maven or nodejs. A Dockerfile is enough to trigger this part of the pipeline. 34 34 111. If a Dockerfile is found a docker image is built. ... ... @@ -126,12 +126,8 @@ 126 126 )))|((( 127 127 'npm install && npm run build ~-~-prod' 128 128 )))|((( 129 -npm command to execute for building Node.JS projects. 128 +npm command to execute for building Node.JS projects. 130 130 ))) 131 -|= |goBuildCommand|((( 132 -'go build -o app cmd/server/main.go' 133 -)))|go build run. Should be overridden for your project. 134 -|= |goTestCommand|'gotestsum ~-~-format pkgname ~-~-junitfile report.xml ~-~- -failfast -race -coverprofile=coverage.out -tags=test ./...'|Runs gotestsum tool which in turn calls 'go test' for all packages in the project. Should be overridden for your project. The gotestsum tool is available out-of-the-box and produces a report file which is picked up by Jenkins automatically. 135 135 |=(% rowspan="10" %)((( 136 136 Docker build 137 137 )))|((( ... ... @@ -401,13 +401,11 @@ 401 401 |((( 402 402 sonarQube 403 403 )))|((( 404 -true for the defaultBranch and for pull-requests ,if a SonarQube version is detected which supports scanning multiple branches399 +true for the defaultBranch and for pull-requests if a SonarQube version is detected which supports scanning multiple branches 405 405 406 406 false for all other branches 407 407 )))|((( 408 -Set this to true to force a SonarQube scan for the current branch. Usually this makes only sense if you explicitly want to scan feature and bugfix branches. 409 - 410 -If not set or set to false, the default branch will be scanned automatically as well as pull-requests, if a SonarQube version is detected which supports scanning multiple branches. This is currently the case for SonarQube Developer and Enterprise editions. The free SonarQube Community edition supports just one branch. 403 +Set this to true to force a SonarQube scan for the current branch. Usually this makes only sense if you explicitly want to scan feature and bugfix branches. If not set or set to false, the default branch will be scanned automatically as well as pull-requests if a SonarQube version is detected which supports scanning multiple branches. This is currently the case for SonarQube Developer and Enterprise editions. The free SonarQube Community edition supports just one branch. 411 411 ))) 412 412 |((( 413 413 sonarScanMavenOpts ... ... @@ -449,7 +449,6 @@ 449 449 |sonarQualityGate| |Sets the desired quality gate to use for the scan result in SonarQube. 450 450 If not specified, the quality gate is not changed. 451 451 As a default, SonarQube will use the quality gate "Sonar way" for new scan results. 452 -|=(% colspan="1" %)Dependency T| | | 453 453 |=(% rowspan="7" %)((( 454 454 Deployment 455 455 )))|(((