Skip to content

Commit

Permalink
Merge branch 'release/v3.0.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
meiserloh committed Dec 12, 2024
2 parents 4d617b1 + 164d56e commit 1f8d9d2
Show file tree
Hide file tree
Showing 12 changed files with 22 additions and 587 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v3.ß.0] - 2024-12-12
### Added
- [#58] Add function to copy Dogu images to the Jenkins worker

This release contains a **breaking change**. All Trivy-specific functionality has been removed.
See [Scan Dogu image with Trivy](https://github.com/cloudogu/ces-build-lib/tree/main?tab=readme-ov-file##scan-dogu-image-with-trivy) for migration.

### Removed
- Removed all Trivy-specific functionality. Please use the Trivy class of the [ces-build-lib](https://github.com/cloudogu/ces-build-lib)

## [v2.6.0] - 2024-11-25
### Added
- [#56] function to push a pre release to registry
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ EcoSystem ecosystem = new EcoSystem(this, "gcloud-ces-operations-internal-packer
- upgradeFromPreviousRelease(String oldDoguVersionForUpgradeTest, String doguName, String namespace = "official") | upgrade dogu from previous version
- restartDogu(String doguName, boolean waitUntilAvailable=true) | Restarts a dogu and by default waits until it is available again.
- changeGlobalAdminGroup(String newAdminGroup) | Changes the global admin group to the given value.
- copyDoguImageToJenkinsWorker(String doguPath) | Copies the built Dogu image from the CES machine to the Jenkins worker and imports it into Docker

##### runCypressIntegrationTests():

Expand Down
77 changes: 0 additions & 77 deletions docs/development/trivy_de.md

This file was deleted.

71 changes: 0 additions & 71 deletions docs/development/trivy_en.md

This file was deleted.

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<groupId>com.cloudogu.ces</groupId>
<artifactId>dogu-build-lib</artifactId>
<name>dogu-build-lib</name>
<version>2.6.0</version>
<version>3.0.0</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
25 changes: 10 additions & 15 deletions src/com/cloudogu/ces/dogubuildlib/EcoSystem.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,11 @@ class EcoSystem {
Vagrant vagrant
String externalIP
String mountPath
Trivy trivy

EcoSystem(script, String gcloudCredentials, String sshCredentials) {
this.script = script
this.gcloudCredentials = gcloudCredentials
this.sshCredentials = sshCredentials
this.trivy = new Trivy(script, this)
}

void changeNamespace(String namespace, doguPath = null) {
Expand Down Expand Up @@ -285,21 +283,18 @@ class EcoSystem {
}

/**
* Executes a trivy scan for critical security issues in the image of the dogu in doguPath
* Copies the built Dogu image from the CES machine to the Jenkins worker and imports it into Docker
* @param doguPath The path of the dogu sources
* @param failOnError
*/
void scanCriticalVulnerabilities(String doguPath, boolean failOnError) {
this.trivy.scanCritical(this.getDoguImage(doguPath), failOnError)
}

/**
* Executes a trivy scan for high and critical security issues in the image of the dogu in doguPath
* @param doguPath The path of the dogu sources
* @param failOnError
*/
void scanHighOrCriticalVulnerabilities(String doguPath, boolean failOnError) {
this.trivy.scanHighOrCritical(this.getDoguImage(doguPath), failOnError)
void copyDoguImageToJenkinsWorker(String doguPath) {
String savedImageFileName = "savedImage.tar"
String savedImageFilePath = "${doguPath}/${savedImageFileName}"
String image = getDoguImage(doguPath)
vagrant.ssh("sudo docker save -o ${savedImageFilePath} ${image}")
vagrant.ssh("sudo chown jenkins:jenkins ${savedImageFilePath}")
vagrant.scp(":${savedImageFilePath}", "${savedImageFileName}")
script.sh("sudo docker image load -i ${savedImageFileName}")
script.sh("rm ${savedImageFileName}")
}

/**
Expand Down
134 changes: 0 additions & 134 deletions src/com/cloudogu/ces/dogubuildlib/Trivy.groovy

This file was deleted.

10 changes: 0 additions & 10 deletions src/com/cloudogu/ces/dogubuildlib/TrivyScanException.groovy

This file was deleted.

Loading

0 comments on commit 1f8d9d2

Please sign in to comment.