-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create make release target to update versions (#610)
* Added some basic labels to the resource deployments * Corrected the formatting for deploy file * Updated versions to 1.1.0 * Updated Makefile to substitute version in version.go * Revert version change in go file and use IMAGE_TAG instead of new VERSION variable * Updated release process for the new labels * Update HPA to reference the ScaledObject in the part-of label * Add a release target to the Makefile * Disable printing to output for the new commands in Makefile * Update release process documentation * Move release target into its own section * Update release process doc with shorthand * Change IMAGE_TAG to VERSION
- Loading branch information
1 parent
44fa696
commit c7a9ceb
Showing
5 changed files
with
29 additions
and
29 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ In order to develop a scaler, a developer should do the following: | |
6. Run `make build` from the root of KEDA and your scaler is ready. | ||
|
||
If you want to deploy locally | ||
1. Run `export IMAGE_TAG=local` | ||
1. Run `export VERSION=local` | ||
2. Open the terminal and go to the root of the source code | ||
3. Run `make build` | ||
5. If you haven't done it yet clone the charts repository: `git clone [email protected]:kedacore/charts.git` | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
################################################## | ||
# Variables # | ||
################################################## | ||
IMAGE_TAG ?= master | ||
VERSION ?= master | ||
IMAGE_REGISTRY ?= docker.io | ||
IMAGE_REPO ?= kedacore | ||
|
||
IMAGE_CONTROLLER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda:$(IMAGE_TAG) | ||
IMAGE_ADAPTER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda-metrics-adapter:$(IMAGE_TAG) | ||
IMAGE_CONTROLLER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda:$(VERSION) | ||
IMAGE_ADAPTER = $(IMAGE_REGISTRY)/$(IMAGE_REPO)/keda-metrics-adapter:$(VERSION) | ||
|
||
ARCH ?=amd64 | ||
CGO ?=0 | ||
|
@@ -49,6 +49,20 @@ publish: build | |
docker push $(IMAGE_ADAPTER) | ||
docker push $(IMAGE_CONTROLLER) | ||
|
||
################################################## | ||
# Release # | ||
################################################## | ||
K8S_DEPLOY_FILES = $(shell find ./deploy -name '*.yaml') | ||
|
||
.PHONY: release | ||
release: | ||
@sed -i 's@Version =.*@Version = "$(VERSION)"@g' ./version/version.go; | ||
@for file in $(K8S_DEPLOY_FILES); do \ | ||
sed -i '[email protected]/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 | ||
|
||
################################################## | ||
# Build # | ||
################################################## | ||
|
@@ -66,12 +80,12 @@ build: checkenv build-adapter build-controller | |
.PHONY: build-controller | ||
build-controller: generate-api pkg/scalers/liiklus/LiiklusService.pb.go | ||
$(GO_BUILD_VARS) operator-sdk build $(IMAGE_CONTROLLER) \ | ||
--go-build-args "-ldflags -X=main.GitCommit=$(GIT_COMMIT) -ldflags -X=github.com/kedacore/keda/version.Version=$(IMAGE_TAG) -o build/_output/bin/keda" | ||
--go-build-args "-ldflags -X=main.GitCommit=$(GIT_COMMIT) -ldflags -X=github.com/kedacore/keda/version.Version=$(VERSION) -o build/_output/bin/keda" | ||
|
||
.PHONY: build-adapter | ||
build-adapter: generate-api pkg/scalers/liiklus/LiiklusService.pb.go | ||
$(GO_BUILD_VARS) go build \ | ||
-ldflags "-X=main.GitCommit=$(GIT_COMMIT) -X=github.com/kedacore/keda/version.Version=$(IMAGE_TAG)" \ | ||
-ldflags "-X=main.GitCommit=$(GIT_COMMIT) -X=github.com/kedacore/keda/version.Version=$(VERSION)" \ | ||
-o build/_output/bin/keda-adapter \ | ||
cmd/adapter/main.go | ||
docker build -f build/Dockerfile.adapter -t $(IMAGE_ADAPTER) . | ||
|
This file contains 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
This file contains 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