Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
* Update Makefiles to 9.5.2
* Update java base image to 17.0.13-1
  • Loading branch information
l-friebe committed Jan 20, 2025
1 parent 4754165 commit 9bb7c54
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 14 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
- [#156] Update Makefiles to 9.5.2
- [#156] Update java base image to 17.0.13-1

## [v3.75.0-1] - 2024-12-19
### Changed
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM registry.cloudogu.com/official/java:17.0.12-4 as builder
FROM registry.cloudogu.com/official/java:17.0.13-1 as builder
LABEL maintainer="[email protected]" \
NAME="official/nexus" \
VERSION="3.75.0-1"
Expand Down Expand Up @@ -57,7 +57,7 @@ RUN set -o errexit \
&& mvn dependency:get -DgroupId=org.apache.shiro.tools -DartifactId=shiro-tools-hasher -Dclassifier=cli -Dversion=${SHIRO_VERSION} \
&& cp /root/.m2/repository/org/apache/shiro/tools/shiro-tools-hasher/${SHIRO_VERSION}/shiro-tools-hasher-${SHIRO_VERSION}-cli.jar /build/shiro-tools-hasher.jar

FROM registry.cloudogu.com/official/java:17.0.12-4
FROM registry.cloudogu.com/official/java:17.0.13-1

ENV SERVICE_TAGS=webapp \
SERVICE_ADDITIONAL_SERVICES='[{"name": "docker-registry", "port": 8082, "location": "v2", "pass": "nexus/repository/docker-registry/v2/"}]' \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAKEFILES_VERSION=9.5.0
MAKEFILES_VERSION=9.5.2
VERSION=3.75.0-1

.DEFAULT_GOAL:=dogu-release
Expand Down
2 changes: 1 addition & 1 deletion build/make/prerelease.mk
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@

.PHONY: prerelease_namespace
prerelease_namespace:
build/make/stagex.sh prerelease_namespace
build/make/prerelease.sh prerelease_namespace
12 changes: 10 additions & 2 deletions build/make/prerelease.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,29 @@ set -o pipefail

prerelease_namespace() {

TIMESTAMP=$(date +"%Y%m%d%H%M%S")

# Update version in dogu.json
if [ -f "dogu.json" ]; then
echo "Updating name in dogu.json..."
ORIG_NAME="$(jq -r ".Name" ./dogu.json)"
ORIG_VERSION="$(jq -r ".Version" ./dogu.json)"
PRERELEASE_NAME="prerelease_${ORIG_NAME}"
PRERELEASE_VERSION="${ORIG_VERSION}${TIMESTAMP}"
jq ".Name = \"${PRERELEASE_NAME}\"" dogu.json >dogu2.json && mv dogu2.json dogu.json
jq ".Version = \"${PRERELEASE_VERSION}\"" dogu.json >dogu2.json && mv dogu2.json dogu.json
jq ".Image = \"registry.cloudogu.com/${PRERELEASE_NAME}\"" dogu.json >dogu2.json && mv dogu2.json dogu.json
fi

# Update version in Dockerfile
if [ -f "Dockerfile" ]; then
echo "Updating version in Dockerfile..."
ORIG_NAME="$(grep -oP "^[ ]*NAME=\"([^\"]*)" Dockerfile | awk -F "\"" '{print $2}')"
ORIG_NAME="$(grep -oP ".*[ ]*NAME=\"([^\"]*)" Dockerfile | awk -F "\"" '{print $2}')"
ORIG_VERSION="$(grep -oP ".*[ ]*VERSION=\"([^\"]*)" Dockerfile | awk -F "\"" '{print $2}')"
PRERELEASE_NAME="prerelease_$( echo -e "$ORIG_NAME" | sed 's/\//\\\//g' )"
sed -i "s/\(^[ ]*NAME=\"\)\([^\"]*\)\(.*$\)/\1${PRERELEASE_NAME}\3/" Dockerfile
PRERELEASE_VERSION="${ORIG_VERSION}${TIMESTAMP}"
sed -i "s/\(.*[ ]*NAME=\"\)\([^\"]*\)\(.*$\)/\1${PRERELEASE_NAME}\3/" Dockerfile
sed -i "s/\(.*[ ]*VERSION=\"\)\([^\"]*\)\(.*$\)/\1${PRERELEASE_VERSION}\3/" Dockerfile
fi

}
Expand Down
2 changes: 1 addition & 1 deletion build/make/release.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

.PHONY: node-release
node-release: ## Start a node package release
Expand Down
2 changes: 1 addition & 1 deletion build/make/self-update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ get_highest_version() {
# Patch Jenkinsfile
update_jenkinsfile() {
sed -i "s/ces-build-lib@[[:digit:]].[[:digit:]].[[:digit:]]/ces-build-lib@$(get_highest_version ces)/g" Jenkinsfile
sed -i "s/dogu-build-lib@[[:digit:]].[[:digit:]].[[:digit:]]/dogu-build-lib@$(get_highest_version dogu)/g" Jenkinsfile
sed -i "s/dogu-build-lib@v[[:digit:]].[[:digit:]].[[:digit:]]/dogu-build-lib@v$(get_highest_version dogu)/g" Jenkinsfile
}

# switch for script entrypoint
Expand Down
4 changes: 2 additions & 2 deletions build/make/test-common.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
GO_JUNIT_REPORT=$(UTILITY_BIN_PATH)/go-junit-report
GO_JUNIT_REPORT_VERSION=v1.0.0
GO_JUNIT_REPORT_VERSION=v2.1.0

$(GO_JUNIT_REPORT): $(UTILITY_BIN_PATH)
@echo "Download go-junit-report..."
@$(call go-get-tool,$@,github.com/jstemmer/go-junit-report@$(GO_JUNIT_REPORT_VERSION))
@$(call go-get-tool,$@,github.com/jstemmer/go-junit-report/v2@$(GO_JUNIT_REPORT_VERSION))
11 changes: 7 additions & 4 deletions build/make/test-unit.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
##@ Unit testing

UNIT_TEST_DIR=$(TARGET_DIR)/unit-tests
XUNIT_JSON=$(UNIT_TEST_DIR)/report.json
XUNIT_XML=$(UNIT_TEST_DIR)/unit-tests.xml
UNIT_TEST_LOG=$(UNIT_TEST_DIR)/unit-tests.log
COVERAGE_REPORT=$(UNIT_TEST_DIR)/coverage.out
Expand All @@ -9,9 +10,9 @@ PRE_UNITTESTS?=
POST_UNITTESTS?=

.PHONY: unit-test
unit-test: $(XUNIT_XML) ## Start unit tests
unit-test: $(XUNIT_JSON) ## Start unit tests

$(XUNIT_XML): $(SRC) $(GO_JUNIT_REPORT)
$(XUNIT_JSON): $(SRC) $(GO_JUNIT_REPORT)
ifneq ($(strip $(PRE_UNITTESTS)),)
@make $(PRE_UNITTESTS)
endif
Expand All @@ -20,13 +21,15 @@ endif
@echo 'mode: set' > ${COVERAGE_REPORT}
@rm -f $(UNIT_TEST_LOG) || true
@for PKG in $(PACKAGES) ; do \
${GO_CALL} test -v $$PKG -coverprofile=${COVERAGE_REPORT}.tmp 2>&1 | tee $(UNIT_TEST_LOG).tmp ; \
${GO_CALL} test -v $$PKG -coverprofile=${COVERAGE_REPORT}.tmp -json 2>&1 | tee $(UNIT_TEST_LOG).tmp ; \
cat ${COVERAGE_REPORT}.tmp | tail +2 >> ${COVERAGE_REPORT} ; \
rm -f ${COVERAGE_REPORT}.tmp ; \
cat $(UNIT_TEST_LOG).tmp >> $(UNIT_TEST_LOG) ; \
rm -f $(UNIT_TEST_LOG).tmp ; \
done
@cat $(UNIT_TEST_LOG) | $(GO_JUNIT_REPORT) > $@
@cat $(UNIT_TEST_LOG) >> $@
@cat $(UNIT_TEST_LOG) | $(GO_JUNIT_REPORT) -parser gojson > $(XUNIT_XML)

@if grep '^FAIL' $(UNIT_TEST_LOG); then \
exit 1; \
fi
Expand Down

0 comments on commit 9bb7c54

Please sign in to comment.