Created
September 3, 2018 20:15
-
-
Save affixalex/82c3a1919b0603f3151a28c5b5966d09 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CHART_REPO := http://jenkins-x-chartmuseum:8080 | |
| CURRENT=$(pwd) | |
| NAME := dashboard | |
| OS := $(shell uname) | |
| RELEASE_VERSION := $(shell cat ../../VERSION) | |
| build: clean | |
| rm -rf requirements.lock | |
| helm dependency build | |
| helm lint | |
| install: clean build | |
| helm install . --name ${NAME} | |
| upgrade: clean build | |
| helm upgrade ${NAME} . | |
| delete: | |
| helm delete --purge ${NAME} | |
| clean: | |
| rm -rf charts | |
| rm -rf ${NAME}*.tgz | |
| release: clean | |
| helm dependency build | |
| helm lint | |
| helm init --client-only | |
| helm package . | |
| curl --fail -u $(CHARTMUSEUM_CREDS_USR):$(CHARTMUSEUM_CREDS_PSW) --data-binary "@$(NAME)-$(shell sed -n 's/^version: //p' Chart.yaml).tgz" $(CHART_REPO)/api/charts | |
| rm -rf ${NAME}*.tgz% | |
| tag: | |
| echo $(RELEASE_VERSION) | |
| ifeq ($(OS),Darwin) | |
| sed -i "" -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml | |
| sed -i "" -e "s/tag: .*/tag: $(RELEASE_VERSION)/" values.yaml | |
| else ifeq ($(OS),Linux) | |
| sed -i -e "s/version:.*/version: $(RELEASE_VERSION)/" Chart.yaml | |
| sed -i -e "s|repository: .*|repository: $(JENKINS_X_DOCKER_REGISTRY_SERVICE_HOST):$(JENKINS_X_DOCKER_REGISTRY_SERVICE_PORT)/$(ORG)/$(APP_NAME)|" values.yaml | |
| sed -i -e "s/tag: .*/tag: $(RELEASE_VERSION)/" values.yaml | |
| else | |
| echo "platfrom $(OS) not supported to release from" | |
| exit -1 | |
| endif | |
| git add --all | |
| git commit -m "release $(RELEASE_VERSION)" --allow-empty # if first release then no verion update is performed | |
| git tag -fa v$(RELEASE_VERSION) -m "Release version $(RELEASE_VERSION)" | |
| git push origin v$(RELEASE_VERSION) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment