Skip to content

Commit

Permalink
Merge branch 'release/v8.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ppxl committed Sep 15, 2023
2 parents a216e2f + 46a9d52 commit 44973bf
Show file tree
Hide file tree
Showing 11 changed files with 744 additions and 87 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
.idea
target
.bin
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [v8.2.0](https://github.com/cloudogu/makefiles/releases/tag/v8.2.0) 2023-09-15
### Added
- [#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.
- Add missing K8s and bats target descriptions on the [README.md](README.md)

## [v8.1.0](https://github.com/cloudogu/makefiles/releases/tag/v8.1.0) 2023-09-15
### Removed
- [#147] Remove Dummy-Chart-Dependencies from Helm-Chart-Generation
Expand Down
56 changes: 4 additions & 52 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,60 +1,12 @@
# Set these to the desired values
ARTIFACT_ID=
VERSION=

MAKEFILES_VERSION=8.1.0
ARTIFACT_ID=makefiles
MAKEFILES_VERSION=8.2.0
VERSION=${MAKEFILES_VERSION}

.DEFAULT_GOAL:=help

# set PRE_COMPILE to define steps that shall be executed before the go build
# PRE_COMPILE=

# set GO_ENV_VARS to define go environment variables for the go build
# GO_ENV_VARS = CGO_ENABLED=0

# set PRE_UNITTESTS and POST_UNITTESTS to define steps that shall be executed before or after the unit tests
# PRE_UNITTESTS?=
# POST_UNITTESTS?=

# set PREPARE_PACKAGE to define a target that should be executed before the package build
# PREPARE_PACKAGE=

# set ADDITIONAL_CLEAN to define a target that should be executed before the clean target, e.g.
# ADDITIONAL_CLEAN=clean_deb
# clean_deb:
# rm -rf ${DEBIAN_BUILD_DIR}

# APT_REPO controls the target apt repository for deploy-debian.mk
# -> APT_REPO=ces-premium results in a deploy to the premium apt repository
# -> Everything else results in a deploy to the public repositories
APT_REPO?=ces

include build/make/variables.mk

# You may want to overwrite existing variables for target actions to fit into your project.

include build/make/self-update.mk
include build/make/dependencies-gomod.mk
include build/make/build.mk
include build/make/test-common.mk
include build/make/test-integration.mk
include build/make/test-unit.mk
include build/make/mocks.mk
include build/make/static-analysis.mk
include build/make/clean.mk
# either package-tar.mk
include build/make/package-tar.mk
# or package-debian.mk
include build/make/package-debian.mk
# deploy-debian.mk depends on package-debian.mk
include build/make/deploy-debian.mk
include build/make/digital-signature.mk
include build/make/yarn.mk
include build/make/bower.mk
# only include this in repositories which support the automatic release process (like dogus or golang apps)
include build/make/release.mk
# either k8s-dogu.mk
include build/make/k8s-dogu.mk
# or k8s-controller.mk; only include this in k8s-controller repositories
include build/make/k8s-controller.mk

include build/make/bats.mk
126 changes: 126 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,71 @@ This repository holds makefiles for building Cloudogu tools, especially those wr

Please note that `make` only accepts `Makefile`s that are **only** indented with tabs.

## Quick Example

```makefile
# Set these to the desired values
ARTIFACT_ID=
VERSION=

MAKEFILES_VERSION=8.0.0

.DEFAULT_GOAL:=help

# set PRE_COMPILE to define steps that shall be executed before the go build
# PRE_COMPILE=

# set GO_ENV_VARS to define go environment variables for the go build
# GO_ENV_VARS = CGO_ENABLED=0

# set PRE_UNITTESTS and POST_UNITTESTS to define steps that shall be executed before or after the unit tests
# PRE_UNITTESTS?=
# POST_UNITTESTS?=

# set PREPARE_PACKAGE to define a target that should be executed before the package build
# PREPARE_PACKAGE=

# set ADDITIONAL_CLEAN to define a target that should be executed before the clean target, e.g.
# ADDITIONAL_CLEAN=clean_deb
# clean_deb:
# rm -rf ${DEBIAN_BUILD_DIR}

# APT_REPO controls the target apt repository for deploy-debian.mk
# -> APT_REPO=ces-premium results in a deploy to the premium apt repository
# -> Everything else results in a deploy to the public repositories
APT_REPO?=ces

include build/make/variables.mk

# You may want to overwrite existing variables for target actions to fit into your project.

include build/make/self-update.mk
include build/make/dependencies-gomod.mk
include build/make/build.mk
include build/make/test-common.mk
include build/make/test-integration.mk
include build/make/test-unit.mk
include build/make/mocks.mk
include build/make/static-analysis.mk
include build/make/clean.mk
# either package-tar.mk
include build/make/package-tar.mk
# or package-debian.mk
include build/make/package-debian.mk
# deploy-debian.mk depends on package-debian.mk
include build/make/deploy-debian.mk
include build/make/digital-signature.mk
include build/make/yarn.mk
include build/make/bower.mk
# only include this in repositories which support the automatic release process (like dogus or golang apps)
include build/make/release.mk
# either k8s-dogu.mk
include build/make/k8s-dogu.mk
# or k8s-controller.mk; only include this in k8s-controller repositories
include build/make/k8s-controller.mk
include build/make/bats.mk
```

## Overview over make targets

Starting with makefiles v5.0.0 `make help` will produce an overview of make popular targets:
Expand Down Expand Up @@ -284,5 +349,66 @@ This module enables you to use bower via the `bower-install` target.
### release.mk

This module holds the `dogu-release` or other binary release related targets for starting automated production releases.
Additionally, to the regular `dogu-release` the module contains a `dogu-cve-release`. This target checks if a simple
build of a dogu eliminates critical CVEs. If this is the case, a release process will be triggered.

Only include this module in dogu or Golang repositories that support a dedicated release flow!
### bats.mk

This module enables you to run BATS shell tests via the `unit-test-shell` target. All you need is a directory with BATS
tests in `${yourProjectDir}/batsTests` (overrideable with the variable `TESTS_DIR`).

### K8s-related makefiles

#### k8s.mk

This module provides generic targets for developing K8s Cloudogu EcoSystem

- `image-import` - imports the currently available image into the cluster-local registry.
- `docker-dev-tag` - tags a Docker image for local K8s-CES deployment.
- `docker-build` - builds the docker image of the K8s app.
- `k8s-generate` - generates one concatenated resource YAML
- `k8s-apply` - applies all generated K8s resources to the current cluster and namespace
- check single or all of these variables:
- `check-all-vars`
- `check-k8s-namespace-env-var`
- `check-k8s-image-env-var`
- `check-k8s-artifact-id`
- `check-etc-hosts`
- `check-insecure-cluster-registry`

#### k8s-component.mk

This module provides targets for developing K8s Cloudogu EcoSystem components (including controllers)
- General helm targets
- `helm-init-chart` - Creates a Chart.yaml-template with zero values
- `helm-generate-chart` - Generates the final helm chart
- Helm developing targets
- `helm-generate` - Generates the final helm chart with dev-urls
- `helm-apply` - Generates and installs the helm chart
- `helm-delete` - Uninstalls the current helm chart
- `helm-reinstall` - Uninstalls the current helm chart and re-installs it
- `helm-chart-import` - Imports the currently available chart into the cluster-local registry
- Release targets
- `helm-package-release` - Generates and packages the helm chart with release urls.
- `helm-generate-release` - Generates the final helm chart with release urls.
- Component-oriented targets
- `component-generate` - Generate the component YAML resource
- `component-apply` - Applies the component yaml resource to the actual defined context.
- `component-reinstall` - Re-installs the component yaml resource from the actual defined context.
- `component-delete` - Deletes the component yaml resource from the actual defined context.

#### k8s-dogu.mk

This module provides targets for developing Dogus with a K8s Cloudogu EcoSystem.

- `build` - Builds a new version of the dogu and deploys it into the K8s-EcoSystem.
- `install-dogu-descriptor` - Installs a configmap with current dogu.json into the cluster.

#### k8s-controller.mk

This module provides targets for K8s Cloudogu EcoSystem controllers.

- `k8s-integration-test` - Run k8s integration tests.
- `controller-release` - Interactively starts the release workflow.
- `build: helm-apply` - Builds a new version of the dogu and deploys it into the K8s-EcoSystem.
Loading

0 comments on commit 44973bf

Please sign in to comment.