From 5be29fdcb99b0e538520a997e891b9bafd024fcc Mon Sep 17 00:00:00 2001 From: Rob Best Date: Tue, 28 Sep 2021 11:17:31 +0100 Subject: [PATCH] Update release process Pulling the base with the master ref will use the vault-toolkit image built from master. The make task creates a release commit that uses the release image. --- Makefile | 15 ++++++--------- README.md | 4 ++-- base/vault-namespace/kustomization.yaml | 2 +- example/cluster-wide/kustomization.yaml | 2 +- example/vault-namespace/kustomization.yaml | 2 +- 5 files changed, 11 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index f9c6874..aa38d9b 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,9 @@ SHELL := /bin/bash -# Hack to take arguments from command line -# Usage: `make release 1.3.2-1` -# https://stackoverflow.com/questions/6273608/how-to-pass-argument-to-makefile-from-command-line release: - @find . -type f \ - \( -name README.md -o -name kustomization.yaml \) \ - -exec sed -ri 's#[0-9]+\.[0-9]+\.[0-9]+-[0-9]+#$(filter-out $@,$(MAKECMDGOALS))#g' {} \; - -%: # matches any task name - @: # empty recipe = do nothing + @sd "newTag: master" "newTag: $(VERSION)" base/vault-namespace/kustomization.yaml + @git add -- base/vault-namespace/kustomization.yaml + @git commit -m "Release $(VERSION)" + @sd "newTag: $(VERSION)" "newTag: master" base/vault-namespace/kustomization.yaml + @git add -- base/vault-namespace/kustomization.yaml + @git commit -m "Clean up release $(VERSION)" diff --git a/README.md b/README.md index 2b20b01..76280cf 100644 --- a/README.md +++ b/README.md @@ -134,7 +134,7 @@ In vault's namespace: apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization bases: - - github.com/utilitywarehouse/vault-manifests//base/vault-namespace?ref=1.7.1-1 + - github.com/utilitywarehouse/vault-manifests//base/vault-namespace ``` Somewhere with permission to apply cluster-wide resources @@ -143,7 +143,7 @@ Somewhere with permission to apply cluster-wide resources apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization bases: - - github.com/utilitywarehouse/vault-manifests//base/cluster-wide?ref=1.7.1-1 + - github.com/utilitywarehouse/vault-manifests//base/cluster-wide ``` ## Examples diff --git a/base/vault-namespace/kustomization.yaml b/base/vault-namespace/kustomization.yaml index 83bca24..bc51919 100644 --- a/base/vault-namespace/kustomization.yaml +++ b/base/vault-namespace/kustomization.yaml @@ -10,4 +10,4 @@ configMapGenerator: - resources/statsd-mappings.yaml images: - name: quay.io/utilitywarehouse/vault-toolkit - newTag: 1.7.1-1 + newTag: master diff --git a/example/cluster-wide/kustomization.yaml b/example/cluster-wide/kustomization.yaml index e826d39..552b32e 100644 --- a/example/cluster-wide/kustomization.yaml +++ b/example/cluster-wide/kustomization.yaml @@ -2,6 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization bases: - ../../base/cluster-wide - # github.com/utilitywarehouse/vault-manifests//base/cluster-wide?ref=1.7.1-1 + # github.com/utilitywarehouse/vault-manifests//base/cluster-wide resources: - rbac.yaml diff --git a/example/vault-namespace/kustomization.yaml b/example/vault-namespace/kustomization.yaml index d6f3a76..ed6a558 100644 --- a/example/vault-namespace/kustomization.yaml +++ b/example/vault-namespace/kustomization.yaml @@ -2,6 +2,6 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization bases: - ../../base/vault-namespace - # github.com/utilitywarehouse/vault-manifests//base/vault-namespace?ref=1.7.1-1 + # github.com/utilitywarehouse/vault-manifests//base/vault-namespace resources: - rbac.yaml