Skip to content

Commit

Permalink
Provide installation YAML in the release (#740)
Browse files Browse the repository at this point in the history
* Added YAMLs release packages makefile recipe

Signed-off-by: Paolo Patierno <ppatierno@live.com>
  • Loading branch information
ppatierno committed Apr 14, 2020
1 parent ef7e4e9 commit c064d67
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,32 @@ publish: build
K8S_DEPLOY_FILES = $(shell find ./deploy -name '*.yaml')

.PHONY: release
release:
release: release_prepare release_file release_pkg

.PHONY: release_file
release_file:
@sed -i 's@Version =.*@Version = "$(VERSION)"@g' ./version/version.go;
@for file in $(K8S_DEPLOY_FILES); do \
sed -i 's@app.kubernetes.io/version:.*@app.kubernetes.io/version: "$(VERSION)"@g' $$file; \
sed -i 's@image: docker.io/kedacore/keda:.*@image: docker.io/kedacore/keda:$(VERSION)@g' $$file; \
sed -i 's@image: docker.io/kedacore/keda-metrics-adapter:.*@image: docker.io/kedacore/keda-metrics-adapter:$(VERSION)@g' $$file; \
done

.PHONY: release_prepare
release_prepare:
rm -rf ./keda-$(VERSION)
rm -f ./keda-$(VERSION).tar.gz
rm -f ./keda-$(VERSION).zip
mkdir -p ./keda-$(VERSION)/crds

.PHONY: release_pkg
release_pkg:
cp -r ./deploy/*.yaml ./keda-$(VERSION)
cp ./deploy/crds/*_crd.yaml ./keda-$(VERSION)/crds
tar -z -cf ./keda-$(VERSION).tar.gz keda-$(VERSION)/
zip -r ./keda-$(VERSION).zip keda-$(VERSION)/
rm -rf ./keda-$(VERSION)

##################################################
# Build #
##################################################
Expand Down
5 changes: 5 additions & 0 deletions RELEASE-PROCESS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,8 @@ Then run the commands here: https://github.com/kedacore/charts
Update the following file:
https://github.com/Azure/azure-functions-core-tools/blob/dev/src/Azure.Functions.Cli/StaticResources/keda.yaml
[Search for 1.1.0 etc. and replace it]

**5) Upload release packages**

When a new GitHub release is created, upload the tar.gz and zip release package files generated during the release process.
They are named like `keda-$(VERSION).zip` and `keda-$(VERSION).tar.gz`.

0 comments on commit c064d67

Please sign in to comment.