Skip to content

Commit f324578

Browse files
dnschwarzercesmarvin
authored andcommitted
Merge branch 'release/v3.9.3-1'
2 parents 6588c62 + 4813e83 commit f324578

15 files changed

+115
-37
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [v3.9.3-1] - 2025-03-13
10+
### Changed
11+
- Update Postfix to v3.9.3
12+
- Updated Base Image to v3.21.0-1
13+
- Upgrade dogu-build-lib to v3.1.0
14+
- Upgrade ces-build-lib to v4.1.0
15+
- added pre-release steps in pipeline
16+
### Security
17+
- Fixed [CVE-2024-45337](https://avd.aquasec.com/nvd/2024/cve-2024-45337/)
18+
919
## [v3.9.0-4] - 2025-02-12
1020
### Changed
1121
- [#32] Update Makefiles to 9.5.0

Dockerfile

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
FROM registry.cloudogu.com/official/base:3.20.2-1
1+
FROM registry.cloudogu.com/official/base:3.21.0-1
22
LABEL NAME="official/postfix" \
3-
VERSION="3.9.0-4" \
3+
VERSION="3.9.3-1" \
44
55

6+
ENV POSTFIX_ALPINE_VERSION=3.9.3-r0
7+
68
# INSTALL POSTFIX
79
RUN set -o errexit \
810
&& set -o nounset \
911
&& set -o pipefail \
1012
&& apk update \
1113
&& apk upgrade \
12-
&& apk add --update postfix openrc supervisor rsyslog \
14+
&& apk add --update postfix=${POSTFIX_ALPINE_VERSION} openrc supervisor rsyslog \
1315
&& rm -rf /var/cache/apk/*
1416

1517
COPY resources /

Jenkinsfile

+32-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!groovy
2-
@Library(['github.com/cloudogu/[email protected]', 'github.com/cloudogu/[email protected]'])
3-
import com.cloudogu.ces.cesbuildlib.*
2+
@Library(['github.com/cloudogu/[email protected]', 'github.com/cloudogu/[email protected]']) _
43
import com.cloudogu.ces.dogubuildlib.*
4+
import com.cloudogu.ces.cesbuildlib.*
55

66
timestamps {
77
properties([
@@ -11,10 +11,10 @@ timestamps {
1111
disableConcurrentBuilds(),
1212
// Parameter to activate dogu upgrade test on demand
1313
parameters([
14-
booleanParam(defaultValue: false, description: 'Test dogu upgrade from latest release or optionally from defined version below', name: 'TestDoguUpgrade'),
15-
string(defaultValue: '', description: 'Old Dogu version for the upgrade test (optional; e.g. 2.222.1-1)', name: 'OldDoguVersionForUpgradeTest'),
16-
choice(name: 'TrivyScanLevels', choices: [TrivyScanLevel.CRITICAL, TrivyScanLevel.HIGH, TrivyScanLevel.MEDIUM, TrivyScanLevel.ALL], description: 'The levels to scan with trivy'),
17-
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.')
14+
booleanParam(defaultValue: false, description: 'Test dogu upgrade from latest release or optionally from defined version below', name: 'TestDoguUpgrade'),
15+
string(defaultValue: '', description: 'Old Dogu version for the upgrade test (optional; e.g. 3.23.0-1)', name: 'OldDoguVersionForUpgradeTest'),
16+
choice(name: 'TrivySeverityLevels', choices: [TrivySeverityLevel.CRITICAL, TrivySeverityLevel.HIGH_AND_ABOVE, TrivySeverityLevel.MEDIUM_AND_ABOVE, TrivySeverityLevel.ALL], description: 'The levels to scan with trivy', defaultValue: TrivySeverityLevel.CRITICAL),
17+
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.', defaultValue: TrivyScanStrategy.UNSTABLE),
1818
])
1919
])
2020

@@ -36,6 +36,7 @@ timestamps {
3636
shellCheck("./resources/logging.sh ./resources/startup.sh ./resources/mask2cidr.sh")
3737
}
3838
}
39+
3940
node('vagrant') {
4041
Git git = new Git(this, "cesmarvin")
4142
git.committerName = 'cesmarvin'
@@ -52,6 +53,10 @@ timestamps {
5253
try {
5354

5455
stage('Provision') {
56+
// change namespace to prerelease_namespace if in develop-branch
57+
if (gitflow.isPreReleaseBranch()) {
58+
sh "make prerelease_namespace"
59+
}
5560
ecoSystem.provision("/dogu")
5661
}
5762

@@ -61,19 +66,27 @@ timestamps {
6166
}
6267

6368
stage('Build') {
69+
// purge postfix from official namespace to prevent conflicts while building prerelease_official/postfix, keep config to avoid no etcd endpoints error
70+
if (gitflow.isPreReleaseBranch()) {
71+
ecoSystem.purgeDogu("postfix", "--keep-config")
72+
}
6473
ecoSystem.build("/dogu")
6574
}
6675

76+
77+
stage('Trivy scan') {
78+
ecoSystem.copyDoguImageToJenkinsWorker("/dogu")
79+
Trivy trivy = new Trivy(this)
80+
trivy.scanDogu(".", params.TrivySeverityLevels, params.TrivyStrategy)
81+
trivy.saveFormattedTrivyReport(TrivyScanFormat.TABLE)
82+
trivy.saveFormattedTrivyReport(TrivyScanFormat.JSON)
83+
trivy.saveFormattedTrivyReport(TrivyScanFormat.HTML)
84+
}
85+
6786
stage('Verify') {
6887
ecoSystem.verify("/dogu")
6988
}
7089

71-
stage('Trivy scan') {
72-
Trivy trivy = new Trivy(this, ecoSystem)
73-
trivy.scanDogu("/dogu", TrivyScanFormat.HTML, params.TrivyScanLevels, params.TrivyStrategy)
74-
trivy.scanDogu("/dogu", TrivyScanFormat.JSON, params.TrivyScanLevels, params.TrivyStrategy)
75-
trivy.scanDogu("/dogu", TrivyScanFormat.PLAIN, params.TrivyScanLevels, params.TrivyStrategy)
76-
}
7790

7891
if (params.TestDoguUpgrade != null && params.TestDoguUpgrade){
7992
stage('Upgrade dogu') {
@@ -98,8 +111,13 @@ timestamps {
98111
ecoSystem.push("/dogu")
99112
}
100113

101-
stage('Add Github-Release') {
102-
github.createReleaseWithChangelog(releaseVersion, changelog)
114+
stage('Add Github-Release'){
115+
github.createReleaseWithChangelog(releaseVersion, changelog, productionReleaseBranch)
116+
}
117+
} else if (gitflow.isPreReleaseBranch()) {
118+
// push to registry in prerelease_namespace
119+
stage('Push Prerelease Dogu to registry') {
120+
ecoSystem.pushPreRelease("/dogu")
103121
}
104122
}
105123

Makefile

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
MAKEFILES_VERSION=9.5.0
1+
MAKEFILES_VERSION=9.7.0
22

33
.DEFAULT_GOAL:=dogu-release
44

55
include build/make/variables.mk
66
include build/make/self-update.mk
77
include build/make/release.mk
8-
include build/make/k8s-dogu.mk
8+
include build/make/k8s-dogu.mk
9+
include build/make/prerelease.mk

build/make/k8s.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ K3S_LOCAL_REGISTRY_PORT?=30099
3636

3737
# The URL of the container-registry to use. Defaults to the registry of the local-cluster.
3838
# If RUNTIME_ENV is "remote" it is "registry.cloudogu.com/testing"
39-
CES_REGISTRY_HOST?="${K3S_CLUSTER_FQDN}:${K3S_LOCAL_REGISTRY_PORT}"
39+
CES_REGISTRY_HOST?=${K3S_CLUSTER_FQDN}:${K3S_LOCAL_REGISTRY_PORT}
4040
CES_REGISTRY_NAMESPACE ?=
4141
ifeq (${RUNTIME_ENV}, remote)
42-
CES_REGISTRY_HOST="registry.cloudogu.com"
43-
CES_REGISTRY_NAMESPACE="/testing"
42+
CES_REGISTRY_HOST=registry.cloudogu.com
43+
CES_REGISTRY_NAMESPACE=/testing
4444
endif
4545
$(info CES_REGISTRY_HOST=$(CES_REGISTRY_HOST))
4646

build/make/prerelease.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33

44
.PHONY: prerelease_namespace
55
prerelease_namespace:
6-
build/make/stagex.sh prerelease_namespace
6+
build/make/prerelease.sh prerelease_namespace

build/make/prerelease.sh

100644100755
+10-2
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,29 @@ set -o pipefail
55

66
prerelease_namespace() {
77

8+
TIMESTAMP=$(date +"%Y%m%d%H%M%S")
9+
810
# Update version in dogu.json
911
if [ -f "dogu.json" ]; then
1012
echo "Updating name in dogu.json..."
1113
ORIG_NAME="$(jq -r ".Name" ./dogu.json)"
14+
ORIG_VERSION="$(jq -r ".Version" ./dogu.json)"
1215
PRERELEASE_NAME="prerelease_${ORIG_NAME}"
16+
PRERELEASE_VERSION="${ORIG_VERSION}${TIMESTAMP}"
1317
jq ".Name = \"${PRERELEASE_NAME}\"" dogu.json >dogu2.json && mv dogu2.json dogu.json
18+
jq ".Version = \"${PRERELEASE_VERSION}\"" dogu.json >dogu2.json && mv dogu2.json dogu.json
1419
jq ".Image = \"registry.cloudogu.com/${PRERELEASE_NAME}\"" dogu.json >dogu2.json && mv dogu2.json dogu.json
1520
fi
1621

1722
# Update version in Dockerfile
1823
if [ -f "Dockerfile" ]; then
1924
echo "Updating version in Dockerfile..."
20-
ORIG_NAME="$(grep -oP "^[ ]*NAME=\"([^\"]*)" Dockerfile | awk -F "\"" '{print $2}')"
25+
ORIG_NAME="$(grep -oP ".*[ ]*NAME=\"([^\"]*)" Dockerfile | awk -F "\"" '{print $2}')"
26+
ORIG_VERSION="$(grep -oP ".*[ ]*VERSION=\"([^\"]*)" Dockerfile | awk -F "\"" '{print $2}')"
2127
PRERELEASE_NAME="prerelease_$( echo -e "$ORIG_NAME" | sed 's/\//\\\//g' )"
22-
sed -i "s/\(^[ ]*NAME=\"\)\([^\"]*\)\(.*$\)/\1${PRERELEASE_NAME}\3/" Dockerfile
28+
PRERELEASE_VERSION="${ORIG_VERSION}${TIMESTAMP}"
29+
sed -i "s/\(.*[ ]*NAME=\"\)\([^\"]*\)\(.*$\)/\1${PRERELEASE_NAME}\3/" Dockerfile
30+
sed -i "s/\(.*[ ]*VERSION=\"\)\([^\"]*\)\(.*$\)/\1${PRERELEASE_VERSION}\3/" Dockerfile
2331
fi
2432

2533
}

build/make/release.mk

+5-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
.PHONY: dogu-release
66
dogu-release: ## Start a dogu release
7-
build/make/release.sh dogu
7+
build/make/release.sh dogu "${FIXED_CVE_LIST}" $(DRY_RUN)
88

99
.PHONY: node-release
1010
node-release: ## Start a node package release
@@ -14,6 +14,10 @@ node-release: ## Start a node package release
1414
go-release: ## Start a go tool release
1515
build/make/release.sh go-tool
1616

17+
.PHONY: image-release
18+
image-release: ## Start a go tool release
19+
build/make/release.sh image
20+
1721
.PHONY: dogu-cve-release
1822
dogu-cve-release: ## Start a dogu release of a new build if the local build fixes critical CVEs
1923
@bash -c "build/make/release_cve.sh \"${REGISTRY_USERNAME}\" \"${REGISTRY_PASSWORD}\" \"${TRIVY_IMAGE_SCAN_FLAGS}\" \"${DRY_RUN}\" \"${CVE_SEVERITY}\""

build/make/self-update.mk

+6-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,9 @@ copy-new-files:
2424
.PHONY: update-build-libs
2525
update-build-libs:
2626
@echo "Check for newer Build-Lib versions"
27-
build/make/self-update.sh buildlibs
27+
build/make/self-update.sh buildlibs
28+
29+
.PHONY: set-dogu-version
30+
set-dogu-version:
31+
@echo "Set Version of Dogu without Release"
32+
build/make/self-update.sh versions

build/make/self-update.sh

+16-1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ set -o errexit
33
set -o nounset
44
set -o pipefail
55

6+
7+
# shellcheck disable=SC1090
8+
source "$(pwd)/build/make/release_functions.sh"
9+
610
TYPE="${1}"
711

812
update_build_libs() {
@@ -34,12 +38,23 @@ get_highest_version() {
3438
# Patch Jenkinsfile
3539
update_jenkinsfile() {
3640
sed -i "s/ces-build-lib@[[:digit:]].[[:digit:]].[[:digit:]]/ces-build-lib@$(get_highest_version ces)/g" Jenkinsfile
37-
sed -i "s/dogu-build-lib@[[:digit:]].[[:digit:]].[[:digit:]]/dogu-build-lib@$(get_highest_version dogu)/g" Jenkinsfile
41+
sed -i "s/dogu-build-lib@v[[:digit:]].[[:digit:]].[[:digit:]]/dogu-build-lib@v$(get_highest_version dogu)/g" Jenkinsfile
42+
}
43+
44+
# Patch Dogu Version without Release
45+
set_dogu_version() {
46+
CURRENT_TOOL_VERSION=$(get_current_version_by_dogu_json)
47+
echo "$(tput setaf 1)ATTENTION: Make sure that the new version corresponds to the current software version$(tput sgr0)"
48+
NEW_RELEASE_VERSION="$(read_new_version)"
49+
validate_new_version "${NEW_RELEASE_VERSION}"
50+
update_versions "${NEW_RELEASE_VERSION}"
3851
}
3952

4053
# switch for script entrypoint
4154
if [[ "${TYPE}" == "buildlibs" ]];then
4255
update_build_libs
56+
elif [[ "${TYPE}" == "versions" ]];then
57+
set_dogu_version
4358
else
4459
echo "Unknown target ${TYPE}"
4560
fi

build/make/test-common.mk

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
GO_JUNIT_REPORT=$(UTILITY_BIN_PATH)/go-junit-report
2-
GO_JUNIT_REPORT_VERSION=v1.0.0
2+
GO_JUNIT_REPORT_VERSION=v2.1.0
33

44
$(GO_JUNIT_REPORT): $(UTILITY_BIN_PATH)
55
@echo "Download go-junit-report..."
6-
@$(call go-get-tool,$@,github.com/jstemmer/go-junit-report@$(GO_JUNIT_REPORT_VERSION))
6+
@$(call go-get-tool,$@,github.com/jstemmer/go-junit-report/v2@$(GO_JUNIT_REPORT_VERSION))

build/make/test-unit.mk

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
##@ Unit testing
22

33
UNIT_TEST_DIR=$(TARGET_DIR)/unit-tests
4+
XUNIT_JSON=$(UNIT_TEST_DIR)/report.json
45
XUNIT_XML=$(UNIT_TEST_DIR)/unit-tests.xml
56
UNIT_TEST_LOG=$(UNIT_TEST_DIR)/unit-tests.log
67
COVERAGE_REPORT=$(UNIT_TEST_DIR)/coverage.out
@@ -9,9 +10,9 @@ PRE_UNITTESTS?=
910
POST_UNITTESTS?=
1011

1112
.PHONY: unit-test
12-
unit-test: $(XUNIT_XML) ## Start unit tests
13+
unit-test: $(XUNIT_JSON) ## Start unit tests
1314

14-
$(XUNIT_XML): $(SRC) $(GO_JUNIT_REPORT)
15+
$(XUNIT_JSON): $(SRC) $(GO_JUNIT_REPORT)
1516
ifneq ($(strip $(PRE_UNITTESTS)),)
1617
@make $(PRE_UNITTESTS)
1718
endif
@@ -20,13 +21,15 @@ endif
2021
@echo 'mode: set' > ${COVERAGE_REPORT}
2122
@rm -f $(UNIT_TEST_LOG) || true
2223
@for PKG in $(PACKAGES) ; do \
23-
${GO_CALL} test -v $$PKG -coverprofile=${COVERAGE_REPORT}.tmp 2>&1 | tee $(UNIT_TEST_LOG).tmp ; \
24+
${GO_CALL} test -v $$PKG -coverprofile=${COVERAGE_REPORT}.tmp -json 2>&1 | tee $(UNIT_TEST_LOG).tmp ; \
2425
cat ${COVERAGE_REPORT}.tmp | tail +2 >> ${COVERAGE_REPORT} ; \
2526
rm -f ${COVERAGE_REPORT}.tmp ; \
2627
cat $(UNIT_TEST_LOG).tmp >> $(UNIT_TEST_LOG) ; \
2728
rm -f $(UNIT_TEST_LOG).tmp ; \
2829
done
29-
@cat $(UNIT_TEST_LOG) | $(GO_JUNIT_REPORT) > $@
30+
@cat $(UNIT_TEST_LOG) >> $@
31+
@cat $(UNIT_TEST_LOG) | $(GO_JUNIT_REPORT) -parser gojson > $(XUNIT_XML)
32+
3033
@if grep '^FAIL' $(UNIT_TEST_LOG); then \
3134
exit 1; \
3235
fi

docs/gui/releasenotes_de.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@ Im Folgenden finden Sie die Release Notes für das Postfix-Dogu.
44

55
Technische Details zu einem Release finden Sie im zugehörigen [Changelog](https://docs.cloudogu.com/de/docs/dogus/postfix/CHANGELOG/).
66

7+
## [Unreleased]
8+
### Security
9+
- [CVE-2024-45337](https://avd.aquasec.com/nvd/2024/cve-2024-45337/) behoben.
10+
### Changed
11+
- Update der Postfix Version auf 3.9.3
12+
713
## [v3.9.0-3]
8-
- Die Cloudogu-eigenen Quellen werden von der MIT-Lizenz auf die AGPL-3.0-only relizensiert.
14+
- Die Cloudogu-eigenen Quellen werden von der MIT-Lizenz auf die AGPL-3.0-only relizensiert.

docs/gui/releasenotes_en.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,11 @@ Below you will find the release notes for the Postfix-Dogu.
44

55
Technical details on a release can be found in the corresponding [Changelog](https://docs.cloudogu.com/en/docs/dogus/postfix/CHANGELOG/).
66

7+
## [Unreleased]
8+
### Security
9+
- Resolved [CVE-2024-45337](https://avd.aquasec.com/nvd/2024/cve-2024-45337/).
10+
### Changed
11+
- Update Postfix to version 3.9.3
12+
713
## [v3.9.0-3]
8-
- Relicense own code to AGPL-3.0-only
14+
- Relicense own code to AGPL-3.0-only

dogu.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "official/postfix",
3-
"Version": "3.9.0-4",
3+
"Version": "3.9.3-1",
44
"DisplayName": "Postfix",
55
"Description": "Postfix - Mail Transfer Agent",
66
"Logo": "https://cloudogu.com/images/dogus/postfix.png",

0 commit comments

Comments
 (0)