All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
v9.4.0 2024-11-25
- [#205] make step for prereleasing dogu
v9.3.2 2024-10-18
- Use v2 api version for k8s dogu deployment [#198]
v9.3.1 2024-10-11
- Update go linter to 1.61.0 to support go 1.23
- use go 1.23 as default for linting
- use go 1.23 as default for builds
v9.2.1 2024-09-05
- Add missing yq dependency on docker-build target
v9.2.0 2024-08-28
- Add make target
govulncheck
to scan go repositories for vulnerabilities using govulncheck
bats.mk
:- Raise BATS image version to 1.11.0
- set BATS's /workspace directory as a safe git directory to avoid the git error
detected dubious ownership
- Remove Docker warning about potentially missing ARG default values [#190]
v9.1.0 2024-06-28
- Add support for remote runtimes and container-registries for k8s-make-targets [#188]
- The make-targets for k8s like dogu-
build
,helm-apply
orcomponent-apply
now support deploying to remote kubernetes-clusters
- The make-targets for k8s like dogu-
v9.0.5 2024-05-23
- update Go version to 1.22 (for
make compile
andmake static analysis
) [#186] - update Go linter to 1.58.2 [#185]
- Fix false positive during Go linting with Go version 1.22 [#186]
v9.0.4 2024-04-19
- [#180] Properly delete previous helm packages to mitigate error where helm secrets get too big.
- Update CONTROLLER_GEN_VERSION to v0.14.0 to avoid panic during manifest-run when using go1.22 [#178]
v9.0.3 2024-03-18
- Pick up mockery version when the version was defined before including
mocks.mk
- it is no longer necessary to set the version variable
MOCKERY_VERSION
after includingmocks.mk
. Instead the variable can be overwritten before the include.
- it is no longer necessary to set the version variable
- Update Mockery to v2.42.1 to avoid error messages during mock generation [#176]
- these error messages occurred only with very recent Golang versions like Go 1.22. No errors were shown with Go 1.21
v9.0.2 2024-01-18
- Remove duplicate version-tag from Dogu-Image in ks8-dogu.mk [#174]
- Set the yq output to YAML (instead of JSON)
- This was changed for JSON-inputs in YQ v4.32.1 (see mikefarah/yq#1608)
v9.0.1 2023-12-01
- Make the targets for generate and copy manifests configurable. External components have to override them with empty values because they do not have CRDs in go-code. [#172]
- Make the target to importing images configurable. Components with own images to build should override
IMAGE_IMPORT_TARGET
withimage-import
. [#172] - Make the target to check all environment variables configurable. Components with own images to build should override
CHECK_VAR_TARGETS
withcheck-all-vars
. [#172]
- fixes wrong container image version
latest
duringimage-import
[#172] - the k8s/CRD target
helm-package-release
renames tohelm-package
in order to harmonize withcrd-helm-package
- the k8s/CRD target
manifests
honors now the variableHELM_CRD_SOURCE_DIR
if set to a different value
- runs k8s/CRD target
crd-add-labels
by default after the CRD generation targetmanifest
v9.0.0 2023-11-30
Breaking change ahead! [#170]
This release cleans up lots of K8s targets and renames targets and variables in a more matching manner. Please take the time to revise the changes for your project if you use them after a major version upgrade.
- the k8s variable
IMAGE_DEV
no longer contains a version tag because it makes editing YAML files easier- you can append
${VERSION}
as it should already be defined in your main makefile.
- you can append
- k8s tool versions are now replaceable by these variables
BINARY_YQ_4_VERSION
,BINARY_HELM_VERSION
, andCONTROLLER_GEN_VERSION
can now be customized if needed- simply set these variables before the inclusion of any
k8s*.mk
files
- simply set these variables before the inclusion of any
- the corresponding path and version variables move to the same place in
k8s.mk
for better maintenance experience
- the variable
K8S_RESOURCE_TEMP_FOLDER
no longer contains amake
subdirectory to simplify the directory structure intarget/
- the k8s/dogu variable
DOGU_JSON_DEV_FILE
is no longer a relative path but absolute - The k8s/dogu target
k8s-create-temporary-resource
renames tocreate-dogu-resource
- its output can be optionally defined by setting
K8S_RESOURCE_DOGU
but defaults to `target/k8s/${ARTIFACT_ID}.yaml
- its output can be optionally defined by setting
- the k8s/helm target
helm-generate-chart
renames tohelm-generate
helm-generate
also provides now optional post-exec targets by settingHELM_POST_GENERATE_TARGETS
- the k8s/helm target
helm-apply
also executesimage-import
- this target also allows now optional pre-exec targets by setting
HELM_PRE_APPLY_TARGETS
- this target also allows now optional pre-exec targets by setting
- the k8s/helm target
helm-chart-import
also executesimage-import
- these overridable variables rename to their respective counterparts:
K8S_HELM_TARGET
toHELM_TARGET_DIR
K8S_HELM_RESSOURCES
toHELM_SOURCE_DIR
K8S_HELM_ARTIFACT_NAMESPACE
toHELM_ARTIFACT_NAMESPACE
- the k8s/crd targets
manifests
andgenerate
are no longer specific to the controller implementationmanifests
can be found by includingbuild/make/k8s-crd.mk
- this target also allows now optional post-exec targets by setting
CRD_POST_MANIFEST_TARGETS
- this target also allows now optional post-exec targets by setting
generate
can be found by includingbuild/make/k8s-controller.mk
- the k8s/crd target
crd-helm-generate-chart
renames tocrd-helm-generate
and executes prior two checks:validate-crd-chart
,validate-crd
crd-helm-generate
allows also now optional post-exec targets by settingK8S_POST_CRD_HELM_GENERATE_TARGETS
- the k8s/controller target
generate
renames togenerate-deepcopy
for better understandability
- the k8s targets
k8s-delete
,k8s-generate
, andk8s-apply
are removed in favor of Helm targets- along with these targets, the variables
K8S_PRE_GENERATE_TARGETS
,PRE_APPLY_TARGETS
,K8S_POST_GENERATE_TARGETS
are removed - instead these targets take their place:
HELM_PRE_GENERATE_TARGETS
,HELM_PRE_APPLY_TARGETS
/COMPONENT_PRE_APPLY_TARGETS
,HELM_POST_GENERATE_TARGETS
- along with these targets, the variables
- the k8s/controller target
k8s-create-temporary-resource
which used to produce monolithic YAML resources is removed
- the k8s target
check-all-vars
executes now also thecheck-k8s-image-env-var
check - the k8s/helm targets
${HELM_TARGET_DIR}/Chart.yaml
(and thushelm-generate
) may execute pre-targets configured in the new variableHELM_PRE_GENERATE_TARGETS
- this target also checks with
validate-chart
if a source HelmChart.yaml
exists
- this target also checks with
- the k8s/helm target
copy-helm-files
copies all Helm files (includingChart.yaml
) from the source directory totarget/k8s/helm
${COMPONENT_PRE_APPLY_TARGETS} - adds k8s/crd target
validate-crd-chart
to check for a source CRDChart.yaml
- adds k8s/crd target
validate-crd
to check ifK8S_CRD_COMPONENT_SOURCE
was properly set - adds k8s/crd target
crd-helm-lint
to lint the CRD's Helm chart - adds k8s/component target
helm-lint
to lint the component's Helm chart
v8.8.0 2023-11-21
- [#168] Publish targets for yarn to run publish tasks in a unified way
- update the variable NODE_VERSION to define the used version of nodeJs (default: 8)
- new target
node-release
to start the release for a node package
v8.7.3 2023-10-20
- [#166] use --no-cache in dogu-cve-release
- [#166] make fixed CVE-list unique
v8.7.2 2023-10-20
- [#164] make cve severity configurable
v8.7.1 2023-10-12
- [#162] fix coder build if secrets dir does not exist
v8.7.0 2023-10-06
- [#159] Update Helm binary to 3.13
- [#160] Add more Helm support
- new
install-helm
phony target enables preparing Helm calls outside the makefile - update Helm chart dependencies in order to have dependencies after generating a proper chart
- new
v8.6.0 2023-10-06
- [#154] Make the
image-import
for k8s components and controllers configurable.- With this change k8s-components do not have to create own wrapper targets for apply task without the
image-import
. They must overridePRE_APPLY_TARGETS
with an empty string and can use regular targets likehelm-apply
orcomponent-apply
.
- With this change k8s-components do not have to create own wrapper targets for apply task without the
- [#158] Changed Component CR generation. Components can now use the variable
COMPONENT_DEPLOY_NAMESPACE
that will be used as the fielddeployNamespace
in the CR.
v8.5.1 2023-10-05
- [#156] fix detection of podman and docker in coder
- [#156] fix detection of coder user
v8.5.0 2023-09-27
- [#152] Add make targets for generating and packaging helm-charts for CRDs of ces-components.
v8.4.0 2023-09-21
- [#145] Add make targets and shell script to support Coder use-cases
v8.3.0 2023-09-19
- [#150] Set bash as default shell in
k8s.mk
. - Add stage
production
as default variable ink8s.mk
. - Template
{{ .Namespace }}
from the resource only in the non helm dev targetk8s-apply
with the current namespace. When creating a helm chart use{{ .Release.Namespace }}
for the current namespace at deploy time.
v8.2.0 2023-09-15
- [#143] Add release target
dogu-cve-release
for dogus if a simple rebuild fixes critical CVEs.- The target can be executed with a
DRY_RUN
environment variable for added developer experience.
- The target can be executed with a
- Add missing K8s and bats target descriptions on the README.md
v8.1.0 2023-09-15
- [#147] Remove Dummy-Chart-Dependencies from Helm-Chart-Generation
v8.0.0 2023-09-12
- [#141] Add target to generate, apply etc. components resources.
- Because of the new dev proxy registry image tags will now receive a
-dev
suffix to avoid getting a version that matches tags in the remote registry. This prevents the registry proxy to pull the remote image. The random make variableIMAGE_DEV
is now part of thek8s-component.mk
and projects no longer need to override it.
- Because of the new dev proxy registry image tags will now receive a
Breaking change ahead!
- Changed name of component targets for better readability.
- Keep in mind to update affected targets in build pipelines.
v7.13.1 2023-09-01
- [#139] Use
yq
frombin
instead of the host machine to fix pipeline errors.
v7.13.0 2023-08-31
- [#137] Package generated chart-dependencies in helm-chart
- [#135] Updated controller-gen to v0.13.0
v7.12.1 2023-08-31
- [#133] Added missing template-file
k8s-helm-temp-chart.yaml
v7.12.0 2023-08-23
- [#131] Support optional Helm chart dependencies during
k8s-helm-package-release
- Please note, that the dependency charts will be created on the fly. The created Helm package will not contain the dependency charts.
- [#131] the target
k8s-helm-init-chart
helps to create a filek8s/helm/Chart.yaml
- please note, that an existing file will be overwritten.
- [#131] Add further additional Helm command arguments variables. All of these variables are optional:
BINARY_HELM_ADDITIONAL_PUSH_ARGS
forhelm push
BINARY_HELM_ADDITIONAL_PACK_ARGS
forhelm package
BINARY_HELM_ADDITIONAL_UNINST_ARGS
forhelm uninstall
BINARY_HELM_ADDITIONAL_UPGR_ARGS
forhelm upgrade
- Rename the additional Helm command argument variable
ADDITIONAL_HELM_APPLY_ARGS
toBINARY_HELM_ADDITIONAL_UPGR_ARGS
- [#131] avoid to re-pack a Helm package from a previous
k8s-helm-package-release
run- instead the older copy of the Helm package will be deleted prior the actual Helm package creation
v7.11.0 2023-08-22
- [#129] Instead of just copy the chart.yaml the whole chart will be copied from the
k8s
to the artifact.- Added additional helm args to configure definitions of helm values.
- [#115] Use labels
app: ces
for Dogu-CRs.
v7.10.0 2023-07-07
- [#127] Remove helmify and just copy the release resource in the helm chart because the helmify generation does not fit with our name prefixes and does not recognize some properties like
publishNotReadyAddresses
from the service spec.
v7.9.0 2023-07-06
- [#125] Differentiate dev & prod environments and add release target
v7.8.0 2023-07-04
- [#123] Add make target to create (Helm-)Chart.yaml-template and use it in other helm targets
v7.7.0 2023-06-30
- [#121] Add make targets for packaging Helm charts
- [#119] Add make targets for handling Helm charts
v7.6.0 2023-06-14
- [#117] Script to generate sha256sum for a given url
v7.5.0 2023-02-24
- [#110] Update controller-gen to v0.11.3
- [#110] Update kustomize to v4.5.7
- [#111] Removed double import causing messy output
v7.4.0 2023-02-16
- Make
MOCKERY_IGNORED
overridable
- [#107]
mock
target didn't work
v7.3.1 2023-02-16
- [#107] debug output of
make mocks
v7.3.0 2023-02-16
- [#107] Create mocks with
make mocks
v7.2.0 2023-01-25
- [#105] Use the environment variable
NAMESPACE
from the .env file to generate and apply resources to the cluster. - [#103] Remove the environment variable
K8S_CLUSTER_ROOT
, because it is no longer needed.
v7.1.1 2022-11-30
- [#101] revert Target directory variable to be relative because it produced errors and unexpected results in already existing projects
v7.1.0 2022-11-28
- [#98] Target directory variable is now absolute.
- [#99] Exclude vendor directory for source file changes.
v7.0.1 2022-08-30
- Removed
vet
targets from k8s makefiles
v7.0.0 2022-08-30
Breaking change ahead!
- Removed
vet
target becausevet
is used in golangci-lint #94- Projects must specify the path in
sonar-project.properties
to the golanci-lint report instead of the vet report:sonar.go.golangci-lint.reportPaths=target/static-analysis/static-analysis-cs.log
- Projects must specify the path in
- Fixed golangci-lint and added new linters #94
- Create folder
target/make/k8s
for targetk8s-create-temporary-resource
#93
v6.3.0 2022-08-24
- Add makefile
bats.mk
to execute bats tests.
- Use
BINARY_YQ
target ink8s-dogu.mk
v6.2.1 2022-08-24
- Fix order of imports and use native yq for
k8s-dogu.mk
v6.2.0 2022-08-24
- Import
k8s.mk
ink8s-dogu.mk
before var declaration and use yq as downloaded binary; #89
v6.1.0 2022-08-12
- Changed the way how integration-tests are executed: #87
- The variable PACKAGES_FOR_INTEGRATION_TEST has been removed and should no longer be used
- By default when running
make integration-test
all existing tests are executed (specifically: all unit tests) - You should now define a pattern for integration tests in the Variable
INTEGRATION_TEST_NAME_PATTERN
- Only tests which names are matching this pattern will be executed in
make integration-test
- Suggested Pattern:
INTEGRATION_TEST_NAME_PATTERN=.*_inttest$$
. - With that pattern, only test functions which names are ending with
_inttest
are executed bymake integration-test
- Only tests which names are matching this pattern will be executed in
- The variable PACKAGES_FOR_INTEGRATION_TEST
v6.0.3 2022-06-13
- Use consistent temporary yaml file names in k8s makefiles: #86
v6.0.2 2022-06-07
- Moved function
go-get-tool
fromdependencies-gomod.mk
tovariables.mk
- Removed the
k8s-delete
target as requirement for thebuild
target ink8s-controller.mk
andk8s-dogu.mk
v6.0.1 2022-05-30
- Fix shell error when executing
k8s-dogu.mk
target; #82- this error only occurs with GNU make 4.2 and earlier
v6.0.0 2022-05-20
- k8s.mk: Replaced docker image
.tar
rollout withdocker push
; #78- Users of k8s-related (non-dogu) targets need to add two things:
- Add a make variable of the local dev-image
- Most likely this will look like
IMAGE_DEV=${K3CES_REGISTRY_URL_PREFIX}/${ARTIFACT_ID}:${VERSION}
- Most likely this will look like
- They must replace
$(IMAGE)
references with$(IMAGE_DEV)
when they are solely used inside a local dev cluster
- Add a make variable of the local dev-image
- this DOES NOT apply for dogus: The respective functionality works out-of-the-box by including
k8s-dogu.mk
as before- Anyhow, the referenced image inside the dogu descriptor changed under the hood
- Users of k8s-related (non-dogu) targets need to add two things:
- k8s.mk; #78
- Added
check-etc-hosts
target to detect errors in the DNS resolution while pushing images to a local registry - Added
check-insecure-cluster-registry
target to detect errors in the local Docker configuration while pushing images to a local registry
- Added
v5.2.0 2022-05-09
- Added variable
LINT_VERION
tostatic-analysis.mk
to define thegolangci-lint
version used for the analysis; #77
v5.1.0 2022-04-29
- Target
vet
performing a static go vet analysis; #70 - Makefiles for k8s (
k8s.mk
) dogus (k8s-dogu.mk
) and controllers (k8s-controller.mk
) containing everything to build, test and deploy these applications; #70
v5.0.0 2022-03-09
Heads-up: This release removes obsolete Go dependency management files. All go dependency management should be conducted
with go mod
by now.
- Default help target to print all available make targets; #71
- new method
go-get-tool
to conveniently download go tools without affecting the module of the current project; #73- call it like so:
$(call go-get-tool,$(YOUR_BINARY_TARGET),YOURGOTOOLURL)
- find an example call in
build/make/test-common.mk
- find an example call in
- this feature introduces a project relative directory
.bin
which will contain your downloaded go tools - you may add a matching line to your
.gitignore
file to avoid adding it to your repository
- call it like so:
- go-junit-reporter is now being downloaded without affecting the project module; #73
- the removal routine in
make clean
expands to the new.bin
go tool directory
- Remove glide and go dep makefiles
v4.8.0 2022-02-28
- create extensibility to change version of files not tracked by the makefiles; #68
v4.7.1 2021-12-01
- Make grep regex work with grep v3.7; #66
v4.7.0 2021-11-30
- Make the nodejs version adjustable via NODE_VERSION variable; #64
v4.6.0 2021-09-16
- Reworked Release-script. It is new also able to handle releases of non-dogus (#62)
- Added command to release go-tools (#62)
v4.5.0 2021-04-06
- The testing dependency
go-junit-reporting
is retrieved withGO111MODULE=off go get...
to support all kinds of dependency managers (gomod
,dep
,glide
) - Use main as production releases branch if existent; #60
v4.4.0 2021-03-18
- make go build args configurable
- Debian package (un)deployment for focal (Ubuntu 20.04); #56
- Debian package (un)deployment for xenial (Ubuntu 16.04); #56
v4.3.1 2021-01-25
- Calls an additional
go mod vendor
after installingj-unit-report
to prevent inconsistencies betweengo.mod
andvendor/modules.txt
[#53].
v4.3.0 2020-12-17
Breaking Change ahead!, see below
- Replace custom
cloudogu/golang
container with official golang container (#51)- The affected targets are:
build
static-analysis-ci
static-analysis-local
- The targets
static-analysis
/static-analysis-ci
may no longer work on your CI because of changed container references- mounting a custom
/etc/passwd
into the golang container is advised
- mounting a custom
- Golang containers default to version 1.14.13 now
- the Go compiler version is adjustable via the
GOTAG
variable - customized make variables
GOIMAGE
andGOTAG
should be replaced in your mainMakefile
accordingly - see also the README.md for more information
- the Go compiler version is adjustable via the
- The affected targets are:
- Add customizable make variable for Golang container volume mount (#51)
- f. e.:
CUSTOM_GO_MOUNT=-v /host/path:/container/path
- see also the README.md for more information
- f. e.:
- Add make variable
ETCGROUP
for generated/etc/group
file
v4.2.0 2020-05-25
- Set repo-specific user output in deploy-debian.mk
- dogu-release target to start an automated dogu release
- Include a new variable
APT_REPO
which controls which apt repository should be used as a deploy target.ces-premium
deploys into the premium repository while any other value deploys into the public repositories. (Issue 45) - dogu-release target to start an automated dogu release
Please note: Default behaviour changed! The "CGO_ENABLED=0" variable is not set per default any more! You have to set it via the Makefile, if needed.
- Introduce GO_ENV_VARS for go environment variables
- Issue 34
make unit-test
andmake integration-test
depend on the go sources and won't download go-junit-report each time they run
Please note: Breaking change ahead.
- Update vendor target to check for new gomod dependencies
- Separate the debian package building and deploying targets
package-debian.mk
only holds deb package building targets nowdeploy-debian.mk
holds the deb package deployment targets now
When you are upgrading to this version and want to deploy deb packages, you have to
include the deploy-debian.mk
into your Makefile, below the package-debian.mk
.
For example, see the Makefile in this repository.
- Changed reviewdog -ci flag to -reporter flag in jenkins build
- static-analysis-ci now also executes the goal to create static-analysis.log
- Add Go modules support (#31)
- Go module is activated by setting GO_ENVIRONMENT=GO111MODULE=on before including variables.mk
- When working with go modules
dependencies-gomod.mk
has to be included.
- Furthermore this commit fixes a weird unit-test behaviour when the go-junit tool is older than the tests.
Please note: Breaking change ahead.
By default all go packages in the project are subject to the integration-test
target. To reduce the foot print and test run time the variable containing the selected packages can be overwritten in the main Makefile like this (after including the variables.mk
files but before the integration test inclusion.
This example extracts only the package paths for the packages tasks
and registry
:
PACKAGES_FOR_INTEGRATION_TEST=$(shell go list ./... | grep 'tasks\|registry')
- Added customizable
clean
target- This comes handy if more files and directory should be removed during
clean
than the common stuff - Appending one's own clean target is easily done by defining the variable
ADDITIONAL_CLEAN
with a custom target name
- This comes handy if more files and directory should be removed during
Previously the main Makefile was the place to accommodate the update-makefiles target.
Since it is encouraged (even more: necessary) to edit the main Makefile in order to customize a project's build process this file is never going to be updated. In order to allow the migration process of updating this routine moves to the self-update.mk
file.
After updating to this version you SHOULD remove the update-makefiles
from the main Makefile in order to avoid make target conflicts.
Please note, if the update-makefiles
target is called, all filial makefiles under build/make/
are deleted. The directory build/make/
are not supposed to contain manual changes. Instead file a Feature Request in the makefiles repo and update to the following release version.
- Changes in test makefiles to support proper integration tests
Please include these files for your tests. It is possible to include neither, only one, or both files for unit and integration tests. Both need test-common.mk
included beforehand.
test-common.mk
- this should be included first because both depend on it
test-unit.mk
test-integration
The test-related filial makefiles integration-test.mk
and unit-test-docker-compose.mk
are deleted in favour of new makefiles which sort better in a directory listing (#28)
- Moved a debian related variable to
package-debian.mk
to remove an error message (#30) - Removed cleaning the directory under
${DEBIAN_BUILD_DIR}
duringclean
- This is a specific clean target which belongs to the project's makefile
- Appending one's own clean target is easily done by defining the variable
ADDITIONAL_CLEAN
with a custom target name (#25)
v1.0.6 - 2019-09-11
- If building a
.tar
file the permissions are now with owner/group ID 0 (#23)
v1.0.5 - 2019-09-11
- Add a deletion rule if building a
.deb
package temporary in which conffiles are now deleted after the debian package building process (#20)
v1.0.4 - 2019-09-11
- Copy files in
deb/data/
to data folder with the access permissions they already have without using the install command. Also now is ensured that the data folder exists. (#18)