Skip to content

Commit f0ceeae

Browse files
sklein94cesmarvin
authored andcommitted
Merge branch 'release/v3.68.1-2'
2 parents a400e54 + 907925e commit f0ceeae

14 files changed

+117
-46
lines changed

.env.template

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
NAMESPACE=ecosystem
2+
3+
# Use this to deploy to remote k8s-clusters
4+
# RUNTIME_ENV=remote

.gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,6 @@ build/tmp/
114114

115115
/target
116116
/.bin
117+
118+
119+
.env

CHANGELOG.md

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

77
## [Unreleased]
88

9+
## [v3.68.1-2] - 2024-07-01
10+
### Changed
11+
- [#131] Update base image to java:11.0.23-3 to use doguctl v0.12.0
12+
913
## [v3.68.1-1] - 2024-05-17
1014
### Changed
1115
- [#128] Upgrade nexus to 3.68.1 to fix CVE-2024-4956

Dockerfile

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# registry.cloudogu.com/official/nexus
2-
FROM registry.cloudogu.com/official/java:11.0.20-1 as builder
2+
FROM registry.cloudogu.com/official/java:11.0.23-3 as builder
33
LABEL maintainer="[email protected]" \
44
NAME="official/nexus" \
5-
VERSION="3.68.1-1"
5+
VERSION="3.68.1-2"
66

77
WORKDIR /build
88

@@ -59,7 +59,7 @@ RUN set -o errexit \
5959
&& 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
6060

6161

62-
FROM registry.cloudogu.com/official/java:11.0.20-1
62+
FROM registry.cloudogu.com/official/java:11.0.23-3
6363

6464
ENV SERVICE_TAGS=webapp \
6565
SERVICE_ADDITIONAL_SERVICES='[{"name": "docker-registry", "port": 8082, "location": "v2", "pass": "nexus/repository/docker-registry/v2/"}]' \

Jenkinsfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!groovy
2-
@Library(['github.com/cloudogu/[email protected]', 'github.com/cloudogu/[email protected].0'])
2+
@Library(['github.com/cloudogu/[email protected]', 'github.com/cloudogu/[email protected].1'])
33
import com.cloudogu.ces.cesbuildlib.*
44
import com.cloudogu.ces.dogubuildlib.*
55

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
MAKEFILES_VERSION=9.0.4
2-
VERSION=3.68.1-1
1+
MAKEFILES_VERSION=9.1.0
2+
VERSION=3.68.1-2
33

44
.DEFAULT_GOAL:=dogu-release
55

build/make/build.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ADDITIONAL_LDFLAGS?=-extldflags -static
44
LDFLAGS?=-ldflags "$(ADDITIONAL_LDFLAGS) -X main.Version=$(VERSION) -X main.CommitID=$(COMMIT_ID)"
55
GOIMAGE?=golang
6-
GOTAG?=1.14.13
6+
GOTAG?=1.22
77
GOOS?=linux
88
GOARCH?=amd64
99
PRE_COMPILE?=

build/make/k8s-component.mk

+14-9
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ COMPONENT_DEV_VERSION?=${VERSION}-dev
22

33
include ${BUILD_DIR}/make/k8s.mk
44

5-
BINARY_HELM_ADDITIONAL_PUSH_ARGS?=--plain-http
5+
ifeq (${RUNTIME_ENV}, local)
6+
BINARY_HELM_ADDITIONAL_PUSH_ARGS?=--plain-http
7+
endif
68
BINARY_HELM_ADDITIONAL_PACK_ARGS?=
79
BINARY_HELM_ADDITIONAL_UNINST_ARGS?=
810
BINARY_HELM_ADDITIONAL_UPGR_ARGS?=
@@ -12,6 +14,9 @@ HELM_SOURCE_DIR ?= k8s/helm
1214
HELM_RELEASE_TGZ=${HELM_TARGET_DIR}/${ARTIFACT_ID}-${VERSION}.tgz
1315
HELM_DEV_RELEASE_TGZ=${HELM_TARGET_DIR}/${ARTIFACT_ID}-${COMPONENT_DEV_VERSION}.tgz
1416
HELM_ARTIFACT_NAMESPACE?=k8s
17+
ifeq (${RUNTIME_ENV}, remote)
18+
HELM_ARTIFACT_NAMESPACE?=testing/k8s
19+
endif
1520

1621
K8S_RESOURCE_COMPONENT ?= "${K8S_RESOURCE_TEMP_FOLDER}/component-${ARTIFACT_ID}-${VERSION}.yaml"
1722
K8S_RESOURCE_COMPONENT_CR_TEMPLATE_YAML ?= $(BUILD_DIR)/make/k8s-component.tpl
@@ -75,24 +80,24 @@ helm-update-dependencies: ${BINARY_HELM} ## Update Helm chart dependencies
7580
.PHONY: helm-apply
7681
helm-apply: ${BINARY_HELM} check-k8s-namespace-env-var ${IMAGE_IMPORT_TARGET} helm-generate ${HELM_PRE_APPLY_TARGETS} ## Generates and installs the Helm chart.
7782
@echo "Apply generated helm chart"
78-
@${BINARY_HELM} upgrade -i ${ARTIFACT_ID} ${HELM_TARGET_DIR} ${BINARY_HELM_ADDITIONAL_UPGR_ARGS} --namespace ${NAMESPACE}
83+
@${BINARY_HELM} --kube-context="${KUBE_CONTEXT_NAME}" upgrade -i ${ARTIFACT_ID} ${HELM_TARGET_DIR} ${BINARY_HELM_ADDITIONAL_UPGR_ARGS} --namespace ${NAMESPACE}
7984

8085
.PHONY: helm-delete
8186
helm-delete: ${BINARY_HELM} check-k8s-namespace-env-var ## Uninstalls the current Helm chart.
8287
@echo "Uninstall helm chart"
83-
@${BINARY_HELM} uninstall ${ARTIFACT_ID} --namespace=${NAMESPACE} ${BINARY_HELM_ADDITIONAL_UNINST_ARGS} || true
88+
@${BINARY_HELM} --kube-context="${KUBE_CONTEXT_NAME}" uninstall ${ARTIFACT_ID} --namespace=${NAMESPACE} ${BINARY_HELM_ADDITIONAL_UNINST_ARGS} || true
8489

8590
.PHONY: helm-reinstall
8691
helm-reinstall: helm-delete helm-apply ## Uninstalls the current helm chart and reinstalls it.
8792

8893
.PHONY: helm-chart-import
8994
helm-chart-import: ${CHECK_VAR_TARGETS} helm-generate helm-package ${IMAGE_IMPORT_TARGET} ## Imports the currently available chart into the cluster-local registry.
9095
@if [[ ${STAGE} == "development" ]]; then \
91-
echo "Import ${HELM_DEV_RELEASE_TGZ} into K8s cluster ${K3CES_REGISTRY_URL_PREFIX}..."; \
92-
${BINARY_HELM} push ${HELM_DEV_RELEASE_TGZ} oci://${K3CES_REGISTRY_URL_PREFIX}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
96+
echo "Import ${HELM_DEV_RELEASE_TGZ} into K8s cluster ${CES_REGISTRY_HOST}..."; \
97+
${BINARY_HELM} push ${HELM_DEV_RELEASE_TGZ} oci://${CES_REGISTRY_HOST}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
9398
else \
94-
echo "Import ${HELM_RELEASE_TGZ} into K8s cluster ${K3CES_REGISTRY_URL_PREFIX}..."; \
95-
${BINARY_HELM} push ${HELM_RELEASE_TGZ} oci://${K3CES_REGISTRY_URL_PREFIX}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
99+
echo "Import ${HELM_RELEASE_TGZ} into K8s cluster ${CES_REGISTRY_HOST}..."; \
100+
${BINARY_HELM} push ${HELM_RELEASE_TGZ} oci://${CES_REGISTRY_HOST}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
96101
fi
97102
@echo "Done."
98103

@@ -138,12 +143,12 @@ ${K8S_RESOURCE_COMPONENT_CR_TEMPLATE_YAML}: ${K8S_RESOURCE_TEMP_FOLDER}
138143

139144
.PHONY: component-apply
140145
component-apply: check-k8s-namespace-env-var ${COMPONENT_PRE_APPLY_TARGETS} ${IMAGE_IMPORT_TARGET} helm-generate helm-chart-import component-generate ## Applies the component yaml resource to the actual defined context.
141-
@kubectl apply -f "${K8S_RESOURCE_COMPONENT}" --namespace="${NAMESPACE}"
146+
@kubectl apply -f "${K8S_RESOURCE_COMPONENT}" --namespace="${NAMESPACE}" --context="${KUBE_CONTEXT_NAME}"
142147
@echo "Done."
143148

144149
.PHONY: component-delete
145150
component-delete: check-k8s-namespace-env-var component-generate $(K8S_POST_GENERATE_TARGETS) ## Deletes the component yaml resource from the actual defined context.
146-
@kubectl delete -f "${K8S_RESOURCE_COMPONENT}" --namespace="${NAMESPACE}" || true
151+
@kubectl delete -f "${K8S_RESOURCE_COMPONENT}" --namespace="${NAMESPACE}" --context="${KUBE_CONTEXT_NAME}" || true
147152
@echo "Done."
148153

149154
.PHONY: component-reinstall

build/make/k8s-crd.mk

+8-8
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,12 @@ validate-crd-chart:
6262
.PHONY: crd-helm-apply
6363
crd-helm-apply: ${BINARY_HELM} check-k8s-namespace-env-var crd-helm-generate ## Generates and installs the Helm CRD chart.
6464
@echo "Apply generated Helm CRD chart"
65-
@${BINARY_HELM} upgrade -i ${ARTIFACT_CRD_ID} ${HELM_CRD_TARGET_DIR} ${BINARY_HELM_ADDITIONAL_UPGR_ARGS} --namespace ${NAMESPACE}
65+
@${BINARY_HELM} --kube-context="${KUBE_CONTEXT_NAME}" upgrade -i ${ARTIFACT_CRD_ID} ${HELM_CRD_TARGET_DIR} ${BINARY_HELM_ADDITIONAL_UPGR_ARGS} --namespace ${NAMESPACE}
6666

6767
.PHONY: crd-helm-delete
6868
crd-helm-delete: ${BINARY_HELM} check-k8s-namespace-env-var ## Uninstalls the current Helm CRD chart.
6969
@echo "Uninstall Helm CRD chart"
70-
@${BINARY_HELM} uninstall ${ARTIFACT_CRD_ID} --namespace=${NAMESPACE} ${BINARY_HELM_ADDITIONAL_UNINST_ARGS} || true
70+
@${BINARY_HELM} --kube-context="${KUBE_CONTEXT_NAME}" uninstall ${ARTIFACT_CRD_ID} --namespace=${NAMESPACE} ${BINARY_HELM_ADDITIONAL_UNINST_ARGS} || true
7171

7272
.PHONY: crd-helm-package
7373
crd-helm-package: crd-helm-delete-existing-tgz ${HELM_CRD_RELEASE_TGZ} ## Generates and packages the Helm CRD chart.
@@ -83,11 +83,11 @@ ${HELM_CRD_RELEASE_TGZ}: ${BINARY_HELM} crd-helm-generate ## Generates and packa
8383
.PHONY: crd-helm-chart-import
8484
crd-helm-chart-import: ${CHECK_VAR_TARGETS} check-k8s-artifact-id crd-helm-generate crd-helm-package ## Imports the currently available Helm CRD chart into the cluster-local registry.
8585
@if [[ ${STAGE} == "development" ]]; then \
86-
echo "Import ${HELM_CRD_DEV_RELEASE_TGZ} into K8s cluster ${K3CES_REGISTRY_URL_PREFIX}..."; \
87-
${BINARY_HELM} push ${HELM_CRD_DEV_RELEASE_TGZ} oci://${K3CES_REGISTRY_URL_PREFIX}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
86+
echo "Import ${HELM_CRD_DEV_RELEASE_TGZ} into K8s cluster ${CES_REGISTRY_HOST}..."; \
87+
${BINARY_HELM} push ${HELM_CRD_DEV_RELEASE_TGZ} oci://${CES_REGISTRY_HOST}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
8888
else \
89-
echo "Import ${HELM_CRD_RELEASE_TGZ} into K8s cluster ${K3CES_REGISTRY_URL_PREFIX}..."; \
90-
${BINARY_HELM} push ${HELM_CRD_RELEASE_TGZ} oci://${K3CES_REGISTRY_URL_PREFIX}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
89+
echo "Import ${HELM_CRD_RELEASE_TGZ} into K8s cluster ${CES_REGISTRY_HOST}..."; \
90+
${BINARY_HELM} push ${HELM_CRD_RELEASE_TGZ} oci://${CES_REGISTRY_HOST}/${HELM_ARTIFACT_NAMESPACE} ${BINARY_HELM_ADDITIONAL_PUSH_ARGS}; \
9191
fi
9292
@echo "Done."
9393

@@ -106,10 +106,10 @@ crd-component-generate: ${K8S_RESOURCE_TEMP_FOLDER} ## Generate the CRD componen
106106

107107
.PHONY: crd-component-apply
108108
crd-component-apply: check-k8s-namespace-env-var crd-helm-chart-import crd-component-generate ## Applies the CRD component YAML resource to the actual defined context.
109-
@kubectl apply -f "${K8S_RESOURCE_CRD_COMPONENT}" --namespace="${NAMESPACE}"
109+
@kubectl apply -f "${K8S_RESOURCE_CRD_COMPONENT}" --namespace="${NAMESPACE}" --context="${KUBE_CONTEXT_NAME}"
110110
@echo "Done."
111111

112112
.PHONY: crd-component-delete
113113
crd-component-delete: check-k8s-namespace-env-var crd-component-generate ## Deletes the CRD component YAML resource from the actual defined context.
114-
@kubectl delete -f "${K8S_RESOURCE_CRD_COMPONENT}" --namespace="${NAMESPACE}" || true
114+
@kubectl delete -f "${K8S_RESOURCE_CRD_COMPONENT}" --namespace="${NAMESPACE}" --context="${KUBE_CONTEXT_NAME}" || true
115115
@echo "Done."

build/make/k8s-dogu.mk

+3-5
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ ARTIFACT_NAMESPACE=$(shell $(BINARY_YQ) -oy -e ".Name" $(DOGU_JSON_FILE) | sed "
1010
VERSION=$(shell $(BINARY_YQ) -oy -e ".Version" $(DOGU_JSON_FILE))
1111
# Image of the dogu is extracted from the dogu.json
1212
IMAGE=$(shell $(BINARY_YQ) -oy -e ".Image" $(DOGU_JSON_FILE)):$(VERSION)
13-
IMAGE_DEV_WITHOUT_TAG=$(shell $(BINARY_YQ) -oy -e ".Image" $(DOGU_JSON_FILE) | sed "s|registry\.cloudogu\.com\(.\+\)|${K3CES_REGISTRY_URL_PREFIX}\1|g")
14-
IMAGE_DEV=${IMAGE_DEV_WITHOUT_TAG}
1513

1614
include $(BUILD_DIR)/make/k8s.mk
1715

@@ -37,13 +35,13 @@ create-dogu-resource: ${BINARY_YQ} $(K8S_RESOURCE_TEMP_FOLDER)
3735

3836
.PHONY: apply-dogu-resource
3937
apply-dogu-resource:
40-
@kubectl apply -f "$(K8S_RESOURCE_DOGU)"
38+
@kubectl --context="${KUBE_CONTEXT_NAME}" --namespace=${NAMESPACE} apply -f "$(K8S_RESOURCE_DOGU)"
4139

4240
##@ K8s - Dogu
4341

4442
.PHONY: install-dogu-descriptor
4543
install-dogu-descriptor: ${BINARY_YQ} $(TARGET_DIR) ## Installs a configmap with current dogu.json into the cluster.
4644
@echo "Generate configmap from dogu.json..."
47-
@$(BINARY_YQ) -oj ".Image=\"${IMAGE_DEV_WITHOUT_TAG}\"" ${DOGU_JSON_FILE} > ${DOGU_JSON_DEV_FILE}
48-
@kubectl create configmap "$(ARTIFACT_ID)-descriptor" --from-file=$(DOGU_JSON_DEV_FILE) --dry-run=client -o yaml | kubectl apply -f - --namespace=${NAMESPACE}
45+
@$(BINARY_YQ) -oj ".Image=\"${IMAGE_DEV}\" | .Version=\"${VERSION}\"" ${DOGU_JSON_FILE} > ${DOGU_JSON_DEV_FILE}
46+
@kubectl --context="${KUBE_CONTEXT_NAME}" create configmap "$(ARTIFACT_ID)-descriptor" --from-file=$(DOGU_JSON_DEV_FILE) --dry-run=client -o yaml | kubectl --context="${KUBE_CONTEXT_NAME}" --namespace=${NAMESPACE} apply -f -
4947
@echo "Done."

build/make/k8s.mk

+69-12
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,48 @@ SHELL = /usr/bin/env bash -o pipefail
2222
IMAGE ?=
2323

2424
# Set production as default stage. Use "development" as stage in your .env file to generate artifacts
25-
# with development images pointing to K3S_CLUSTER_FQDN.
25+
# with development images pointing to CES_REGISTRY_URL_PREFIX.
2626
STAGE?=production
27+
28+
# Set the "local" as runtime-environment, to push images to the container-registry of the local cluster and to apply resources to the local cluster.
29+
# Use "remote" as runtime-environment in your .env file to push images to the container-registry at "registry.cloudogu.com/testing" and to apply resources to the configured kubernetes-context in KUBE_CONTEXT_NAME.
30+
RUNTIME_ENV?=local
31+
$(info RUNTIME_ENV=$(RUNTIME_ENV))
32+
33+
# The host and port of the local cluster
2734
K3S_CLUSTER_FQDN?=k3ces.local
2835
K3S_LOCAL_REGISTRY_PORT?=30099
29-
K3CES_REGISTRY_URL_PREFIX="${K3S_CLUSTER_FQDN}:${K3S_LOCAL_REGISTRY_PORT}"
36+
37+
# The URL of the container-registry to use. Defaults to the registry of the local-cluster.
38+
# If RUNTIME_ENV is "remote" it is "registry.cloudogu.com/testing"
39+
CES_REGISTRY_HOST?="${K3S_CLUSTER_FQDN}:${K3S_LOCAL_REGISTRY_PORT}"
40+
CES_REGISTRY_NAMESPACE ?=
41+
ifeq (${RUNTIME_ENV}, remote)
42+
CES_REGISTRY_HOST="registry.cloudogu.com"
43+
CES_REGISTRY_NAMESPACE="/testing"
44+
endif
45+
$(info CES_REGISTRY_HOST=$(CES_REGISTRY_HOST))
46+
47+
# The name of the kube-context to use for applying resources.
48+
# If KUBE_CONTEXT_NAME is empty and RUNTIME_ENV is "remote" the currently configured kube-context is used.
49+
# If KUBE_CONTEXT_NAME is empty and RUNTIME_ENV is not "remote" the "k3ces.local" is used as kube-context.
50+
ifeq (${KUBE_CONTEXT_NAME}, )
51+
ifeq (${RUNTIME_ENV}, remote)
52+
KUBE_CONTEXT_NAME = $(shell kubectl config current-context)
53+
else
54+
KUBE_CONTEXT_NAME = k3ces.local
55+
endif
56+
endif
57+
$(info KUBE_CONTEXT_NAME=$(KUBE_CONTEXT_NAME))
58+
59+
# The git branch-name in lowercase, shortened to 63 bytes, and with everything except 0-9 and a-z replaced with -. No leading / trailing -.
60+
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD | tr '[:upper:]' '[:lower:]' | sed -E 's/[^a-z0-9]+/-/g; s/^-+|-+$$//g' | cut -c1-63)
61+
# The short git commit-hash
62+
GIT_HASH := $(shell git rev-parse --short HEAD)
63+
3064
## Image URL to use all building/pushing image targets
31-
IMAGE_DEV?=${K3CES_REGISTRY_URL_PREFIX}/${ARTIFACT_ID}
32-
IMAGE_DEV_VERSION=${IMAGE_DEV}:${VERSION}
65+
IMAGE_DEV?=$(CES_REGISTRY_HOST)$(CES_REGISTRY_NAMESPACE)/$(ARTIFACT_ID)/$(GIT_BRANCH)
66+
IMAGE_DEV_VERSION=$(IMAGE_DEV):$(VERSION)
3367

3468
# Variables for the temporary yaml files. These are used as template to generate a development resource containing
3569
# the current namespace and the dev image.
@@ -64,13 +98,36 @@ check-k8s-artifact-id:
6498

6599
.PHONY: check-etc-hosts
66100
check-etc-hosts:
67-
@grep -E "^.+\s+${K3S_CLUSTER_FQDN}\$$" /etc/hosts > /dev/null || \
68-
(echo "Missing /etc/hosts entry for ${K3S_CLUSTER_FQDN}" && exit 1)
101+
@if [[ ${RUNTIME_ENV} == "local" ]]; then \
102+
grep -E "^.+\s+${K3S_CLUSTER_FQDN}\$$" /etc/hosts > /dev/null || \
103+
(echo "Missing /etc/hosts entry for ${K3S_CLUSTER_FQDN}" && exit 1) \
104+
fi
69105

70106
.PHONY: check-insecure-cluster-registry
71107
check-insecure-cluster-registry:
72-
@grep "${K3CES_REGISTRY_URL_PREFIX}" /etc/docker/daemon.json > /dev/null || \
73-
(echo "Missing /etc/docker/daemon.json for ${K3CES_REGISTRY_URL_PREFIX}" && exit 1)
108+
@if [[ ${RUNTIME_ENV} == "local" ]]; then \
109+
grep "${CES_REGISTRY_HOST}" /etc/docker/daemon.json > /dev/null || \
110+
(echo "Missing /etc/docker/daemon.json for ${CES_REGISTRY_HOST}" && exit 1) \
111+
fi
112+
113+
# If the RUNTIME_ENV is "remote" checks if the current docker-client has credentials for CES_REGISTRY_HOST
114+
# If no credentials could be found, the credentials are queried and docker-login is performed
115+
check-docker-credentials:
116+
@if [[ "$(RUNTIME_ENV)" == "remote" ]]; then \
117+
if ! grep -q $(CES_REGISTRY_HOST) ~/.docker/config.json ; then \
118+
echo "Error: Docker is not logged in to $(CES_REGISTRY_HOST)"; \
119+
read -p "Enter Docker Username for $(CES_REGISTRY_HOST): " username; \
120+
read -sp "Enter Docker Password for $(CES_REGISTRY_HOST): " password; \
121+
echo ""; \
122+
echo "$$password" | docker login -u "$$username" --password-stdin $(CES_REGISTRY_HOST); \
123+
if [ $$? -eq 0 ]; then \
124+
echo "Docker login to $(CES_REGISTRY_HOST) successful"; \
125+
else \
126+
echo "Docker login to $(CES_REGISTRY_HOST) failed"; \
127+
exit 1; \
128+
fi \
129+
fi \
130+
fi
74131

75132
##@ K8s - Resources
76133

@@ -81,7 +138,7 @@ ${K8S_RESOURCE_TEMP_FOLDER}:
81138
##@ K8s - Docker
82139

83140
.PHONY: docker-build
84-
docker-build: check-k8s-image-env-var ## Builds the docker image of the K8s app.
141+
docker-build: check-docker-credentials check-k8s-image-env-var ## Builds the docker image of the K8s app.
85142
@echo "Building docker image $(IMAGE)..."
86143
@DOCKER_BUILDKIT=1 docker build . -t $(IMAGE)
87144

@@ -93,13 +150,13 @@ docker-dev-tag: check-k8s-image-dev-var docker-build ## Tags a Docker image for
93150
.PHONY: check-k8s-image-dev-var
94151
check-k8s-image-dev-var:
95152
ifeq (${IMAGE_DEV},)
96-
@echo "Missing make variable IMAGE_DEV detected. It should look like \$${K3CES_REGISTRY_URL_PREFIX}/docker-image:tag"
153+
@echo "Missing make variable IMAGE_DEV detected. It should look like \$${CES_REGISTRY_HOST}/docker-image:tag"
97154
@exit 19
98155
endif
99156

100157
.PHONY: image-import
101-
image-import: check-all-vars check-k8s-artifact-id docker-dev-tag ## Imports the currently available image into the cluster-local registry.
102-
@echo "Import $(IMAGE_DEV_VERSION) into K8s cluster ${K3S_CLUSTER_FQDN}..."
158+
image-import: check-all-vars check-k8s-artifact-id docker-dev-tag ## Imports the currently available image into the configured ces-registry.
159+
@echo "Import $(IMAGE_DEV_VERSION) into K8s cluster ${KUBE_CONTEXT_NAME}..."
103160
@docker push $(IMAGE_DEV_VERSION)
104161
@echo "Done."
105162

build/make/static-analysis.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
STATIC_ANALYSIS_DIR=$(TARGET_DIR)/static-analysis
44
GOIMAGE?=golang
5-
GOTAG?=1.18
5+
GOTAG?=1.22
66
CUSTOM_GO_MOUNT?=-v /tmp:/tmp
77

88
REVIEW_DOG=$(TMP_DIR)/bin/reviewdog
99
LINT=$(TMP_DIR)/bin/golangci-lint
10-
LINT_VERSION?=v1.49.0
10+
LINT_VERSION?=v1.58.2
1111
# ignore tests and mocks
12-
LINTFLAGS=--tests=false --skip-files="^.*_mock.go$$" --skip-files="^.*/mock.*.go$$" --timeout 10m --issues-exit-code 0
12+
LINTFLAGS=--tests=false --exclude-files="^.*_mock.go$$" --exclude-files="^.*/mock.*.go$$" --timeout 10m --issues-exit-code 0
1313
ADDITIONAL_LINTER=-E bodyclose -E containedctx -E contextcheck -E decorder -E dupl -E errname -E forcetypeassert -E funlen -E unparam
1414

1515
.PHONY: static-analysis

dogu.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"Name": "official/nexus",
3-
"Version": "3.68.1-1",
3+
"Version": "3.68.1-2",
44
"DisplayName": "Sonatype Nexus",
55
"Description": "The Nexus Repository is like the local warehouse where all of the parts and finished goods used in your software supply chain are stored and distributed.",
66
"Url": "http://www.sonatype.org/nexus",

integrationTests/cypress.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ module.exports = defineConfig({
2727
"DoguName": "nexus",
2828
"MaxLoginRetries": 3,
2929
"AdminUsername": "ces-admin",
30-
"AdminPassword": "ecosystem2016",
30+
"AdminPassword": "Ecosystem2016!",
3131
"AdminGroup": "CesAdministrators"
3232
},
3333
videoCompression: false,

0 commit comments

Comments
 (0)