Skip to content

Commit

Permalink
Merge branch 'release/v5.1.3-4'
Browse files Browse the repository at this point in the history
  • Loading branch information
meiserloh authored and cesmarvin committed Sep 25, 2024
2 parents b411835 + 7826423 commit 128e6fb
Show file tree
Hide file tree
Showing 16 changed files with 54 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -153,5 +153,5 @@ typings/
# End of https://www.gitignore.io/api/node,linux,visualstudiocode,intellij

.idea

.bin/
target
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v5.1.3-4] - 2024-09-25
### Changed
- Switch to new CAS service account structure in dogu.json
- [#128] Move state that should be persistent between restarts to local config.

## [v5.1.3-3] - 2024-09-06
### Changed
- Relicense to AGPL-3.0-only
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM registry.cloudogu.com/official/base:3.19.3-1
FROM registry.cloudogu.com/official/base:3.19.4-2

LABEL NAME="official/redmine" \
VERSION="5.1.3-3" \
VERSION="5.1.3-4" \
maintainer="[email protected]"

ENV USER=redmine \
Expand Down
3 changes: 1 addition & 2 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#!groovy
@Library(['github.com/cloudogu/ces-build-lib@2.2.1', 'github.com/cloudogu/dogu-build-lib@v2.3.1']) _
@Library(['github.com/cloudogu/ces-build-lib@2.4.0', 'github.com/cloudogu/dogu-build-lib@v2.4.0']) _
import com.cloudogu.ces.cesbuildlib.*
import com.cloudogu.ces.dogubuildlib.*
import com.cloudogu.ces.zaleniumbuildlib.*

node('vagrant') {
String doguName = "redmine"
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MAKEFILES_VERSION=9.1.0
MAKEFILES_VERSION=9.2.1

.DEFAULT_GOAL:=dogu-release

Expand All @@ -7,6 +7,7 @@ include build/make/self-update.mk
include build/make/release.mk
include build/make/bats.mk
include build/make/version-sha.mk
include build/make/k8s-dogu.mk

CAS_PLUGIN_VERSION=v$(shell grep CAS_PLUGIN_VERSION= Dockerfile | sed 's/.*CAS_PLUGIN_VERSION=\([^ ]*\).*/\1/g')
CLOUDOGU_THEME_VERSION=$(shell grep CLOUDOGU_THEME_VERSION= Dockerfile | sed 's/.*CLOUDOGU_THEME_VERSION=\([^ ]*\).*/\1/g')
Expand Down
4 changes: 2 additions & 2 deletions batsTests/post-upgrade.bats
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ teardown() {

assert_success
assert_line "get data for database connection"
assert_equal "$(mock_get_call_num "${doguctl}")" "9"
assert_equal "$(mock_get_call_num "${doguctl}")" "10"
assert_equal "$(mock_get_call_args "${doguctl}" "1")" "config -e sa-postgresql/username"
assert_equal "$(mock_get_call_args "${doguctl}" "2")" "config -e sa-postgresql/password"
assert_equal "$(mock_get_call_args "${doguctl}" "3")" "config -e sa-postgresql/database"
Expand Down Expand Up @@ -209,4 +209,4 @@ function isVarExported() {
fi

return 1
}
}
2 changes: 1 addition & 1 deletion build/make/bats.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BATS_SUPPORT=$(BATS_LIBRARY_DIR)/bats-support
BATS_FILE=$(BATS_LIBRARY_DIR)/bats-file
BATS_BASE_IMAGE?=bats/bats
BATS_CUSTOM_IMAGE?=cloudogu/bats
BATS_TAG?=1.2.1
BATS_TAG?=1.11.0
BATS_DIR=build/make/bats
BATS_WORKDIR="${WORKDIR}"/"${BATS_DIR}"

Expand Down
4 changes: 3 additions & 1 deletion build/make/bats/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
ARG BATS_BASE_IMAGE
ARG BATS_TAG

FROM ${BATS_BASE_IMAGE}:${BATS_TAG}
FROM ${BATS_BASE_IMAGE:-bats/bats}:${BATS_TAG:-1.11.0}

# Make bash more findable by scripts and tests
RUN apk add make git bash
# suppress git "detected dubious ownership" error/warning for repos which are checked out later
RUN git config --global --add safe.directory /workspace
2 changes: 1 addition & 1 deletion build/make/k8s.mk
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ ${K8S_RESOURCE_TEMP_FOLDER}:
##@ K8s - Docker

.PHONY: docker-build
docker-build: check-docker-credentials check-k8s-image-env-var ## Builds the docker image of the K8s app.
docker-build: check-docker-credentials check-k8s-image-env-var ${BINARY_YQ} ## Builds the docker image of the K8s app.
@echo "Building docker image $(IMAGE)..."
@DOCKER_BUILDKIT=1 docker build . -t $(IMAGE)

Expand Down
13 changes: 13 additions & 0 deletions build/make/vulnerability-scan.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
##@ Vulnerability scan

GOVULNCHECK_BIN=${UTILITY_BIN_PATH}/govulncheck
GOVULNCHECK_VERSION?=latest

${GOVULNCHECK_BIN}: ${UTILITY_BIN_PATH}
$(call go-get-tool,$(GOVULNCHECK_BIN),golang.org/x/vuln/cmd/govulncheck@$(GOVULNCHECK_VERSION))

.PHONY: govulncheck
govulncheck: ${GOVULNCHECK_BIN} ## This target is used to scan the go repository against known vulnerabilities
@echo "Start vulnerability against repository"
${GOVULNCHECK_BIN} -show verbose ./...
@echo "Finished scan"
1 change: 1 addition & 0 deletions docs/development/figures/post_upgrade_workflow.puml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ endif
:render templates and update plugins

:execute command: doguctl state "upgrade done";
:execute command: doguctl config --rm "local_state";

end

Expand Down
2 changes: 1 addition & 1 deletion docs/development/figures/pre_upgrade_workflow.puml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ endif
if (FROM_VERSION is equal to TO_VERSION) then (yes)
stop
else (no)
:execute command: doguctl state "upgrading";
:execute command: doguctl config "local_state" "upgrading";
endif

if (is FROM_VERSION less or equal than "4.2.3-4") then (no)
Expand Down
18 changes: 16 additions & 2 deletions dogu.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"Name": "official/redmine",
"Version": "5.1.3-3",
"Version": "5.1.3-4",
"DisplayName": "Redmine",
"Description": "Redmine is a flexible project management web application",
"Category": "Development Apps",
Expand All @@ -21,7 +21,8 @@
},
{
"type": "dogu",
"name": "cas"
"name": "cas",
"Version": ">=7.0.5.1-6"
},
{
"type": "dogu",
Expand Down Expand Up @@ -91,11 +92,24 @@
"Owner": "1000",
"Group": "1000",
"NeedsBackup": false
},
{
"Name": "localConfig",
"Path": "/var/ces/config",
"Owner": "1000",
"Group": "1000",
"NeedsBackup": true
}
],
"ServiceAccounts": [
{
"Type": "postgresql"
},
{
"Type": "cas",
"Params": [
"cas"
]
}
],
"HealthChecks": [
Expand Down
1 change: 1 addition & 0 deletions resources/post-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function run_postupgrade() {

echo "Set registry flag so startup script can start afterwards..."
doguctl state "upgrade done"
doguctl config --rm "local_state"

echo "Redmine post-upgrade done"
}
Expand Down
2 changes: 1 addition & 1 deletion resources/pre-upgrade.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ function run_preupgrade() {
fi

echo "Set registry flag so startup script waits for post-upgrade to finish..."
doguctl state "upgrading"
doguctl config "local_state" "upgrading"

if versionXLessOrEqualThanY "${FROM_VERSION}" "4.2.3-4" ; then
# this migration only needs to be done if the additional plugins volume was already created
Expand Down
5 changes: 3 additions & 2 deletions resources/startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ sourceUtilExitCode=0
source "${STARTUP_DIR}"/util.sh || sourceUtilExitCode=$?
if [[ ${sourceUtilExitCode} -ne 0 ]]; then
echo "ERROR: An error occurred while sourcing util functions."
doguctl state "ErrorSourceUtilFunctions"
doguctl config "local_state" "ErrorSourceUtilFunctions"
sleep 300
exit 2
fi
Expand Down Expand Up @@ -63,7 +63,7 @@ function setDoguLogLevel() {

function runMain() {
# check whether post-upgrade script is still running
while [[ "$(doguctl state)" == "upgrading" ]]; do
while [[ "$(doguctl config "local_state" -d "empty")" == "upgrading" ]]; do
echo "Upgrade script is running. Waiting..."
sleep 3
done
Expand Down Expand Up @@ -178,6 +178,7 @@ function runMain() {
exec_rake db:sessions:clear

doguctl state "ready"
doguctl config --rm "local_state"

# Start redmine
echo "Starting redmine..."
Expand Down

0 comments on commit 128e6fb

Please sign in to comment.