Skip to content

Commit

Permalink
ci: use make to update values.yaml on v update
Browse files Browse the repository at this point in the history
  • Loading branch information
waveywaves committed Sep 11, 2023
1 parent f51aec2 commit 6515426
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include tests/e2e/Makefile

VERSION ?= 1.3.1
VERSION ?= 1.3.2

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down Expand Up @@ -169,9 +169,8 @@ undeploy: ## Undeploy controller from the K8s cluster specified in ~/.kube/confi
build-helm-chart: manifests generate fmt vet kustomize ## Deploy controller to the K8s cluster specified in ~/.kube/config.
# update the crd
$(KUSTOMIZE) build config/crd > chart/templates/uffizziclusters.uffizzi.com_customresourcedefinition.yaml
yq e -i '.appVersion = "v${VERSION}"' chart/Chart.yaml
sed -i'' -e 's/labels:/labels: {{ include "common.labels.standard" . | nindent 4 }}/' chart/templates/uffizziclusters.uffizzi.com_customresourcedefinition.yaml
# copy roles config
# update roles
cp config/rbac/role.yaml chart/templates/manager-role_clusterrole.yaml
sed -i'' -e 's/labels:/labels: {{ include "common.labels.standard" . | nindent 4 }}/' chart/templates/manager-role_clusterrole.yaml
sed -i'' -e 's/apiVersion: rbac.authorization.k8s.io\/v1/apiVersion: {{ include "common.capabilities.rbac.apiVersion" . }}/' chart/templates/manager-role_clusterrole.yaml
Expand All @@ -181,7 +180,9 @@ build-helm-chart: manifests generate fmt vet kustomize ## Deploy controller to t
labels: {{ include "common.labels.standard" . | nindent 4 }}\
app.kubernetes.io/component: rbac\
app.kubernetes.io/part-of: uffizzi' chart/templates/manager-role_clusterrole.yaml

# update chart versions
yq e -i '.appVersion = "v${VERSION}"' chart/Chart.yaml
yq e -i '.image.tag = "v${VERSION}"' chart/values.yaml

##@ Build Dependencies

Expand Down
2 changes: 1 addition & 1 deletion chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ version: 1.3.1
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "v1.3.1"
appVersion: "v1.3.2"
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
Expand Down
4 changes: 1 addition & 3 deletions chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@

image:
repository: docker.io/uffizzi/uffizzi-cluster-operator
tag: v1.3.1

tag: v1.3.2
# `flux` dependency values
flux:
helmController:
Expand All @@ -24,7 +23,6 @@ flux:
enabled: false
imageReflectorController:
enabled: false

#cert-manager: # dependency
# enabled: true
# installCRDs: true
Expand Down

0 comments on commit 6515426

Please sign in to comment.