Skip to content

Commit 0aae6ea

Browse files
committed
fix: improve release pipeline
1 parent 5071257 commit 0aae6ea

16 files changed

+212
-34
lines changed

.bin/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*

.circleci/config.yml

+1-34
Original file line numberDiff line numberDiff line change
@@ -74,40 +74,7 @@ jobs:
7474
working_directory: /go/src/github.com/ory/k8s
7575
steps:
7676
- checkout
77-
- run: |
78-
wget https://github.com/mikefarah/yq/releases/download/{VERSION}/{BINARY} -O /usr/bin/yq && \
79-
chmod +x /usr/bin/yq
80-
-
81-
run: curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash
82-
- run: |
83-
version=`echo $CIRCLE_TAG | sed s/v//g`
84-
yq w -i helm/charts/example-idp/Chart.yaml version "$version"
85-
yq w -i helm/charts/hydra/Chart.yaml version "$version"
86-
yq w -i helm/charts/hydra-maester/Chart.yaml version "$version"
87-
yq w -i helm/charts/kratos/Chart.yaml version "$version"
88-
yq w -i helm/charts/kratos-selfservice-ui-node/Chart.yaml version "$version"
89-
yq w -i helm/charts/oathkeeper/Chart.yaml version "$version"
90-
yq w -i helm/charts/oathkeeper-maester/Chart.yaml version "$version"
91-
-
92-
run: helm dep update ./helm/charts/oathkeeper/
93-
-
94-
run: helm package -d docs/helm/charts/ ./helm/charts/oathkeeper/ --version `echo $CIRCLE_TAG | sed s/v//g`
95-
-
96-
run: helm package -d docs/helm/charts/ ./helm/charts/oathkeeper-maester/ --version `echo $CIRCLE_TAG | sed s/v//g`
97-
-
98-
run: helm dep update ./helm/charts/hydra/
99-
-
100-
run: helm package -d docs/helm/charts/ ./helm/charts/hydra/ --version `echo $CIRCLE_TAG | sed s/v//g`
101-
-
102-
run: helm package -d docs/helm/charts/ ./helm/charts/hydra-maester/ --version `echo $CIRCLE_TAG | sed s/v//g`
103-
-
104-
run: helm package -d docs/helm/charts/ ./helm/charts/example-idp/ --version `echo $CIRCLE_TAG | sed s/v//g`
105-
-
106-
run: helm package -d docs/helm/charts/ ./helm/charts/kratos/ --version `echo $CIRCLE_TAG | sed s/v//g`
107-
-
108-
run: helm package -d docs/helm/charts/ ./helm/charts/kratos-selfservice-ui-node/ --version `echo $CIRCLE_TAG | sed s/v//g`
109-
-
110-
run: helm repo index docs/helm/charts/
77+
- run: make release
11178
-
11279
run: git config --global user.email "aeneas@ory.sh"
11380
-

Makefile

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
SHELL=/bin/bash -euxo pipefail
2+
3+
export PATH := .bin:${PATH}
4+
export PWD := $(shell pwd)
5+
export CIRCLE_TAG := ${CIRCLE_TAG}
6+
export VERSION=$(shell echo ${CIRCLE_TAG} | sed s/v//g)
7+
8+
.bin/yq: go.mod
9+
go build -o .bin/yq github.com/mikefarah/yq/v3
10+
11+
.bin/helm: Makefile
12+
HELM_INSTALL_DIR=.bin bash <(curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3) -v v3.3.4 --no-sudo
13+
14+
release: .bin/yq .bin/helm
15+
yq w -i helm/charts/example-idp/Chart.yaml version "${VERSION}"
16+
yq w -i helm/charts/hydra-maester/Chart.yaml version "${VERSION}"; \
17+
yq w -i helm/charts/hydra/Chart.yaml version "${VERSION}"; \
18+
yq w -i helm/charts/hydra/Chart.yaml "dependencies.(name==hydra-maester).version" "${VERSION}"; \
19+
yq w -i helm/charts/kratos/Chart.yaml version "${VERSION}"; \
20+
yq w -i helm/charts/kratos-selfservice-ui-node/Chart.yaml version "${VERSION}"; \
21+
yq w -i helm/charts/oathkeeper-maester/Chart.yaml version "${VERSION}"; \
22+
yq w -i helm/charts/oathkeeper/Chart.yaml version "${VERSION}"; \
23+
yq w -i helm/charts/oathkeeper/Chart.yaml "dependencies.(name==oathkeeper-maester).version" "${VERSION}"; \
24+
helm dep update ./helm/charts/oathkeeper/; \
25+
helm package -d docs/helm/charts/ ./helm/charts/oathkeeper/ --version "${VERSION}"; \
26+
helm package -d docs/helm/charts/ ./helm/charts/oathkeeper-maester/ --version "${VERSION}"; \
27+
helm dep update ./helm/charts/hydra/; \
28+
helm package -d docs/helm/charts/ ./helm/charts/hydra/ --version "${VERSION}"; \
29+
helm package -d docs/helm/charts/ ./helm/charts/hydra-maester/ --version "${VERSION}"; \
30+
helm package -d docs/helm/charts/ ./helm/charts/example-idp/ --version "${VERSION}"; \
31+
helm package -d docs/helm/charts/ ./helm/charts/kratos/ --version "${VERSION}"; \
32+
helm package -d docs/helm/charts/ ./helm/charts/kratos-selfservice-ui-node/ --version "${VERSION}"; \
33+
helm repo index docs/helm/charts/
2.95 KB
Binary file not shown.
2.96 KB
Binary file not shown.

docs/helm/charts/hydra-0.1.2.tgz

14.5 KB
Binary file not shown.
9.59 KB
Binary file not shown.

docs/helm/charts/kratos-0.1.2.tgz

4.6 KB
Binary file not shown.
Binary file not shown.
Binary file not shown.

docs/helm/charts/oathkeeper-0.1.2.tgz

20.4 KB
Binary file not shown.
9.3 KB
Binary file not shown.

go.mod

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module github.com/ory/k8s
2+
3+
go 1.15
4+
5+
require github.com/mikefarah/yq/v3 v3.0.0-20201018214059-6afc2e918934 // indirect

go.sum

+172
Large diffs are not rendered by default.
9.59 KB
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)