-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
110 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,13 +4,13 @@ ENV SONARQUBE_HOME=/opt/sonar \ | |
# mark as webapp for nginx | ||
SERVICE_TAGS=webapp \ | ||
SONAR_VERSION=9.9.1.69595 \ | ||
CAS_PLUGIN_VERSION=5.0.0 \ | ||
CAS_PLUGIN_VERSION=5.0.1 \ | ||
STARTUP_DIR="/" | ||
|
||
FROM BASE as builder | ||
|
||
ENV SONARQUBE_ZIP_SHA256=40bb45f551c7959ba1d3a5ff7b5432a558a5b2ad2efa5e9e1fcf52b83142897b \ | ||
CAS_PLUGIN_JAR_SHA256=c5f45bed9d4dc748a28f14bd2d1885996ae6c63361be4d1818da258e985ead81 \ | ||
CAS_PLUGIN_JAR_SHA256=d154d2c5872eb4086a2261fa3c090322eb6e73f11707bc2ea34e47795f22f175 \ | ||
BUILDER_HOME="/builder/sonar" | ||
|
||
WORKDIR /builder | ||
|
@@ -27,7 +27,7 @@ RUN echo "${CAS_PLUGIN_JAR_SHA256} *${BUILDER_HOME}/sonar-cas-plugin-${CAS_PLUGI | |
FROM BASE | ||
|
||
LABEL NAME="official/sonar" \ | ||
VERSION="9.9.1-1" \ | ||
VERSION="9.9.1-2" \ | ||
maintainer="[email protected]" | ||
|
||
RUN set -eux \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#!groovy | ||
@Library(['github.com/cloudogu/[email protected]', 'github.com/cloudogu/dogu-build-lib@v2.0.0']) | ||
@Library(['github.com/cloudogu/[email protected]', 'github.com/cloudogu/dogu-build-lib@v2.1.0']) | ||
import com.cloudogu.ces.cesbuildlib.* | ||
import com.cloudogu.ces.dogubuildlib.* | ||
|
||
|
@@ -25,10 +25,13 @@ node('vagrant') { | |
booleanParam(defaultValue: false, description: 'Test dogu upgrade from latest release or optionally from defined version below', name: 'TestDoguUpgrade'), | ||
string(defaultValue: '', description: 'Old Dogu version for the upgrade test (optional; e.g. 2.222.1-1)', name: 'OldDoguVersionForUpgradeTest'), | ||
booleanParam(defaultValue: false, description: 'Enables the video recording during the test execution', name: 'EnableVideoRecording'), | ||
choice(name: 'TrivyScanLevels', choices: [TrivyScanLevel.CRITICAL, TrivyScanLevel.HIGH, TrivyScanLevel.MEDIUM, TrivyScanLevel.ALL], description: 'The levels to scan with trivy'), | ||
choice(name: 'TrivyStrategy', choices: [TrivyScanStrategy.UNSTABLE, TrivyScanStrategy.FAIL, TrivyScanStrategy.IGNORE], description: 'Define whether the build should be unstable, fail or whether the error should be ignored if any vulnerability was found.'), | ||
]) | ||
]) | ||
|
||
EcoSystem ecoSystem = new EcoSystem(this, "gcloud-ces-operations-internal-packer", "jenkins-gcloud-ces-operations-internal") | ||
Trivy trivy = new Trivy(this, ecoSystem) | ||
|
||
stage('Checkout') { | ||
checkout scm | ||
|
@@ -68,6 +71,12 @@ node('vagrant') { | |
ecoSystem.build("/dogu") | ||
} | ||
|
||
stage('Trivy scan') { | ||
trivy.scanDogu("/dogu", TrivyScanFormat.HTML, params.TrivyScanLevels, params.TrivyStrategy) | ||
trivy.scanDogu("/dogu", TrivyScanFormat.JSON, params.TrivyScanLevels, params.TrivyStrategy) | ||
trivy.scanDogu("/dogu", TrivyScanFormat.PLAIN, params.TrivyScanLevels, params.TrivyStrategy) | ||
} | ||
|
||
stage('Verify') { | ||
ecoSystem.verify("/dogu") | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters