Skip to content

Commit

Permalink
feat: push chart to helm repo (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
givanov authored Jun 29, 2020
1 parent 1f73422 commit 70d2a4e
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .prow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ presubmits:
max_concurrency: 1
labels:
preset-semantic-release: "true"
preset-ouzi-helm-push: "true"
trigger: "(?m)semrelease-dryrun( please)?"
rerun_command: "semrelease-dryrun"
spec:
Expand All @@ -120,6 +121,7 @@ postsubmits:
labels:
preset-semantic-release: "true"
preset-gcloud-testinfra-prow: "true"
preset-ouzi-helm-push: "true"
clone_uri: "[email protected]:ouzi-dev/credstash-operator.git"
decorate: true
max_concurrency: 1
Expand Down
15 changes: 13 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ ifneq ($(BINARY_VERSION),)
LDFLAGS += -X $(BASE_BUILD_PATH)/version.Version=${BINARY_VERSION}
endif

export PATH := ./bin:$(PATH)

.PHONY: setup-lint
setup-lint:
@echo "bootstrap lint..."
Expand Down Expand Up @@ -168,6 +166,10 @@ CHART_NAME ?= credstash-operator
CHART_VERSION ?= 0.0.0
CHART_PATH ?= deploy/helm
CHART_DIST ?= $(CHART_PATH)/$(CHART_NAME)/dist
HELM_PLUGIN_PUSH_URL := https://github.com/chartmuseum/helm-push
HELM_PLUGIN_PUSH_VERSION := v0.8.1
HELM_REPO_URL := https://charts.ouzi.io
HELM_REPO_NAME := ouzi

.PHONY: helm-clean
helm-clean:
Expand Down Expand Up @@ -201,6 +203,15 @@ helm-package: helm-clean
helm-lint:
helm lint $(CHART_PATH)/$(CHART_NAME)

.PHONY: helm-push-init
helm-push-init:
@helm plugin install $(HELM_PLUGIN_PUSH_URL) --version $(HELM_PLUGIN_PUSH_VERSION) || echo "Plugin already installed - nothing to do"
@helm repo add $(HELM_REPO_NAME) $(HELM_REPO_URL)
@helm repo update

helm-push: helm-push-init
@helm push $(CHART_DIST)/$(CHART_NAME)-$(CHART_VERSION).tgz $(HELM_REPO_NAME)

.PHONY: semantic-release
semantic-release:
@npm ci
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,15 @@ helm upgrade --install credstash https://github.com/ouzi-dev/credstash-operator/
```
Where ${VERSION} is the version you want to install

#### Using the Ouzi helm repo
```
helm repo add ouzi https://charts.ouzi.io
helm repo update
helm upgrade --install credstash ouzi/credstash-operator \
--version ${VERSION}
-n credstash \
--set awsCredentials.secretName=aws-credentials
```
### Multi-Tenancy

The operator can monitor CRDs that have:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
[
"@semantic-release/exec",
{
"prepareCmd": "make docker-push helm-package VERSION=v${nextRelease.version}"
"prepareCmd": "make docker-push helm-package helm-push VERSION=v${nextRelease.version}"
}
],
[
Expand Down

0 comments on commit 70d2a4e

Please sign in to comment.