File tree Expand file tree Collapse file tree 5 files changed +29
-27
lines changed Expand file tree Collapse file tree 5 files changed +29
-27
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ set -E # needs to be set if we want the ERR trap
7
7
set -o pipefail # prevents errors in a pipeline from being masked
8
8
9
9
# Expected variables:
10
- PULL_BASE_REF=${PULL_BASE_REF?" Define PULL_BASE_REF env" } # name of the tag
11
10
GITHUB_TOKEN=${GITHUB_TOKEN?" Define GITHUB_TOKEN env" } # github token used to upload the template yaml
12
11
RELEASE_ID=${RELEASE_ID?" Define RELEASE_ID env" } # github token used to upload the template yaml
13
12
@@ -31,9 +30,7 @@ uploadFile() {
31
30
fi
32
31
}
33
32
34
- echo " PULL_BASE_REF ${PULL_BASE_REF} "
35
-
36
- MODULE_VERSION=${PULL_BASE_REF} make render-manifest
33
+ make render-manifest
37
34
38
35
echo " Generated keda-manager.yaml:"
39
36
cat keda-manager.yaml
Original file line number Diff line number Diff line change
1
+ #! /usr/bin/env bash
2
+
3
+ # standard bash error handling
4
+ set -o errexit # exit immediately when a command fails.
5
+ set -E # needs to be set if we want the ERR trap
6
+ set -o pipefail # prevents errors in a pipeline from being masked
7
+
8
+ # Expected variables:
9
+ IMG=${IMG?" Define IMG env" } # operator img
10
+ MODULE_VERSION=${MODULE_VERSION?" Define MODULE_VERSION env" } # module version used to set common labels
11
+
12
+ PROJECT_ROOT=${PWD}
13
+ CONFIG_OPERATOR=${PROJECT_ROOT} /config
14
+
15
+ echo " ensure kustomize..."
16
+ PROJECT_ROOT=${PROJECT_ROOT} make -C ${PROJECT_ROOT} kustomize
17
+
18
+ echo " upgrade ${CONFIG_OPERATOR} ..."
19
+
20
+ echo " upgrade image to ${IMG} ..."
21
+ cd ${CONFIG_OPERATOR} /manager && ${PROJECT_ROOT} /bin/kustomize edit set image controller=${IMG}
22
+
23
+ echo " upgrade module version to ${MODULE_VERSION} ..."
24
+ cd ${CONFIG_OPERATOR} /default && ${PROJECT_ROOT} /bin/kustomize edit add label app.kubernetes.io/version:${MODULE_VERSION} --force --without-selector --include-templates
Original file line number Diff line number Diff line change @@ -28,12 +28,12 @@ jobs:
28
28
token : ${{ secrets.BOT_TOKEN }}
29
29
fetch-depth : 0
30
30
31
- - name : Bump crd
31
+ - name : Bump kustomize
32
32
run : |
33
- ./hack/replace_keda_crd_version .sh
33
+ ./.github/scripts/upgrade-operator-kustomize .sh
34
34
env :
35
- IMG_VERSION : ${{ github.event.inputs.name }}
36
- PROJECT_ROOT : " . "
35
+ IMG : europe-docker.pkg.dev/kyma-project/prod/keda-manager: ${{ github.event.inputs.name }}
36
+ MODULE_VERSION : ${{ github.event.inputs.name }}
37
37
38
38
- name : Bump sec-scanners-config.yaml
39
39
run : ./.github/scripts/upgrade-sec-scanners-config.sh
@@ -101,7 +101,6 @@ jobs:
101
101
id : create-assets
102
102
env :
103
103
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
104
- PULL_BASE_REF : ${{ github.event.inputs.name }}
105
104
RELEASE_ID : ${{ steps.create-draft.outputs.release_id }}
106
105
run : ./.github/scripts/release.sh
107
106
Original file line number Diff line number Diff line change @@ -94,7 +94,6 @@ deploy: manifests kustomize ## Deploy controller to the K8s cluster specified in
94
94
95
95
.PHONY : render-manifest
96
96
render-manifest : manifests kustomize # # Render keda-manager.yaml manifest.
97
- cd config/manager && $(KUSTOMIZE ) edit set image controller=${IMG}
98
97
$(KUSTOMIZE ) build config/default > keda-manager.yaml
99
98
100
99
.PHONY : undeploy
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments