Skip to content

Commit

Permalink
Update release process
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ribbybibby committed Sep 28, 2021
1 parent dd0c046 commit 5be29fd
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 14 deletions.
15 changes: 6 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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)"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion base/vault-namespace/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ configMapGenerator:
- resources/statsd-mappings.yaml
images:
- name: quay.io/utilitywarehouse/vault-toolkit
newTag: 1.7.1-1
newTag: master
2 changes: 1 addition & 1 deletion example/cluster-wide/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion example/vault-namespace/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 5be29fd

Please sign in to comment.