Skip to content

Commit 340ec5b

Browse files
committed
Add release version label to all resources
Add the released version label to all files in config Closes #381 Signed-off-by: Chmouel Boudjnah <[email protected]>
1 parent 44e2d06 commit 340ec5b

21 files changed

+50
-3
lines changed

.tekton/release-pipeline.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ spec:
6666
msg="Release version ${version}"
6767
echo ${msg}
6868
export TARGET_BRANCH=${version}
69+
export PAC_VERSION=${version}
6970
hack/upload-file-to-github.py \
7071
--message "Release yaml generated for Release ${TARGET_BRANCH}" \
7172
--owner-repository openshift-pipelines/pipelines-as-code \

Makefile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ OUTPUT_DIR=bin
99

1010
YAML_FILES := $(shell find . -type f -regex ".*y[a]ml" -print)
1111

12-
ifeq ($(TKN_PAC_VERSION),)
13-
TKN_PAC_VERSION="$(shell git describe --tags --exact-match 2>/dev/null || echo nightly-`date +'%Y%m%d'`-`git rev-parse --short HEAD`)"
12+
ifeq ($(PAC_VERSION),)
13+
PAC_VERSION="$(shell git describe --tags --exact-match 2>/dev/null || echo nightly-`date +'%Y%m%d'`-`git rev-parse --short HEAD`)"
1414
endif
15-
FLAGS += -ldflags "-X github.com/openshift-pipelines/pipelines-as-code/pkg/params/version.Version=$(TKN_PAC_VERSION) $(LDFLAGS)"
15+
FLAGS += -ldflags "-X github.com/openshift-pipelines/pipelines-as-code/pkg/params/version.Version=$(PAC_VERSION) $(LDFLAGS)"
1616

1717
all: $(OUTPUT_DIR)/pipelines-as-code $(OUTPUT_DIR)/tkn-pac test
1818

@@ -28,11 +28,13 @@ $(OUTPUT_DIR)/%: cmd/% FORCE
2828
.PHONY: releaseyaml
2929
releaseyaml: ## Generate release.yaml, use it like this `make releaseyaml|kubectl apply -f-`
3030
@env TARGET_REPO=$(QUAY_REPOSITORY) TARGET_BRANCH=$(QUAY_REPOSITORY_BRANCH) TARGET_NAMESPACE=$(TARGET_NAMESPACE) \
31+
PAC_VERSION=$(PAC_VERSION) \
3132
./hack/generate-releaseyaml.sh
3233

3334
.PHONY: releaseko
3435
releaseko: ## Generate release.yaml with ko but changing the target_namespace and branch if needed
3536
@env TARGET_BRANCH=$(QUAY_REPOSITORY_BRANCH) TARGET_NAMESPACE=$(TARGET_NAMESPACE) \
37+
PAC_VERSION=$(PAC_VERSION) \
3638
./hack/generate-releaseyaml.sh ko
3739

3840
check: lint test

config/100-namespace.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,5 +16,6 @@ kind: Namespace
1616
metadata:
1717
name: pipelines-as-code
1818
labels:
19+
app.kubernetes.io/version: "devel"
1920
app.kubernetes.io/instance: default
2021
app.kubernetes.io/part-of: pipelines-as-code

config/200-role.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ metadata:
2121
name: pipelines-as-code-sa-el
2222
namespace: pipelines-as-code
2323
labels:
24+
app.kubernetes.io/version: "devel"
2425
app.kubernetes.io/instance: default
2526
app.kubernetes.io/part-of: pipelines-as-code
2627
---
@@ -30,6 +31,7 @@ metadata:
3031
name: pipelines-as-code-role-el
3132
namespace: pipelines-as-code
3233
labels:
34+
app.kubernetes.io/version: "devel"
3335
app.kubernetes.io/instance: default
3436
app.kubernetes.io/part-of: pipelines-as-code
3537
rules:
@@ -58,6 +60,7 @@ metadata:
5860
name: pipelines-as-code-binding
5961
namespace: pipelines-as-code
6062
labels:
63+
app.kubernetes.io/version: "devel"
6164
app.kubernetes.io/instance: default
6265
app.kubernetes.io/part-of: pipelines-as-code
6366
subjects:
@@ -75,6 +78,7 @@ metadata:
7578
name: openshift-pipeline-as-code-clusterrole
7679
namespace: pipelines-as-code
7780
labels:
81+
app.kubernetes.io/version: "devel"
7882
app.kubernetes.io/instance: default
7983
app.kubernetes.io/part-of: pipelines-as-code
8084
rules:
@@ -110,6 +114,7 @@ metadata:
110114
name: pipelines-as-code-clusterbinding
111115
namespace: pipelines-as-code
112116
labels:
117+
app.kubernetes.io/version: "devel"
113118
app.kubernetes.io/instance: default
114119
app.kubernetes.io/part-of: pipelines-as-code
115120
subjects:

config/300-repositories.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ kind: CustomResourceDefinition
1717
metadata:
1818
name: repositories.pipelinesascode.tekton.dev
1919
labels:
20+
app.kubernetes.io/version: "devel"
2021
app.kubernetes.io/instance: default
2122
app.kubernetes.io/part-of: pipelines-as-code
2223
spec:

config/302-pac-configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,5 @@ metadata:
4747
name: pipelines-as-code
4848
namespace: pipelines-as-code
4949
labels:
50+
app.kubernetes.io/version: "devel"
5051
app.kubernetes.io/part-of: pipelines-as-code

config/305-cleanup-cron.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
name: pipelines-as-code-pr-cleanup
1919
namespace: pipelines-as-code
2020
labels:
21+
app.kubernetes.io/version: "devel"
2122
app.kubernetes.io/part-of: pipelines-as-code
2223
spec:
2324
concurrencyPolicy: Replace

config/400-trigger-eventlistenner.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ metadata:
1919
namespace: pipelines-as-code
2020
labels:
2121
app.kubernetes.io/instance: default
22+
app.kubernetes.io/version: "devel"
2223
app.kubernetes.io/part-of: pipelines-as-code
2324
spec:
2425
serviceAccountName: pipelines-as-code-sa-el

config/401-github-issue-recheck.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
name: pipelines-as-code-github-recheck
1919
namespace: pipelines-as-code
2020
labels:
21+
app.kubernetes.io/version: "devel"
2122
app.kubernetes.io/instance: default
2223
app.kubernetes.io/part-of: pipelines-as-code
2324
spec:
@@ -56,6 +57,7 @@ metadata:
5657
name: pipelines-as-code-github-recheck
5758
namespace: pipelines-as-code
5859
labels:
60+
app.kubernetes.io/version: "devel"
5961
app.kubernetes.io/instance: default
6062
app.kubernetes.io/part-of: pipelines-as-code
6163
spec:
@@ -81,6 +83,7 @@ spec:
8183
metadata:
8284
generateName: pipelines-as-code-run-
8385
labels:
86+
app.kubernetes.io/version: "devel"
8487
app.kubernetes.io/managed-by: pipelines-as-code
8588
pipelinesascode.tekton.dev/event: $(tt.params.event_type)
8689
spec:

config/402-github-pull-request.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ metadata:
1818
name: pipelines-as-code-github-pullreq
1919
namespace: pipelines-as-code
2020
labels:
21+
app.kubernetes.io/version: "devel"
2122
app.kubernetes.io/instance: default
2223
app.kubernetes.io/part-of: pipelines-as-code
2324
spec:
@@ -57,6 +58,7 @@ metadata:
5758
name: pipelines-as-code-github-pullreq
5859
namespace: pipelines-as-code
5960
labels:
61+
app.kubernetes.io/version: "devel"
6062
app.kubernetes.io/instance: default
6163
app.kubernetes.io/part-of: pipelines-as-code
6264
spec:
@@ -83,6 +85,7 @@ spec:
8385
metadata:
8486
generateName: pipelines-as-code-run-
8587
labels:
88+
app.kubernetes.io/version: "devel"
8689
app.kubernetes.io/managed-by: pipelines-as-code
8790
pipelinesascode.tekton.dev/event: $(tt.params.event_type)
8891
spec:

0 commit comments

Comments
 (0)