File tree Expand file tree Collapse file tree 6 files changed +33
-4
lines changed Expand file tree Collapse file tree 6 files changed +33
-4
lines changed Original file line number Diff line number Diff line change
1
+ def pipelineVersion= ' 1.1.1'
2
+ println " Pipeline version: ${ pipelineVersion} "
1
3
/*
2
4
* This is a vanilla Jenkins pipeline that relies on the Jenkins kubernetes plugin to dynamically provision agents for
3
5
* the build containers.
@@ -220,9 +222,11 @@ spec:
220
222
221
223
git config --local credential.helper "!f() { echo username=\\ $GIT_AUTH_USER; echo password=\\ $GIT_AUTH_PWD; }; f"
222
224
223
- git fetch origin ${BRANCH}
225
+ git fetch
224
226
git fetch --tags
225
- git checkout ${BRANCH}
227
+ git tag -l
228
+
229
+ git checkout -b ${BRANCH} --track origin/${BRANCH}
226
230
git branch --set-upstream-to=origin/${BRANCH} ${BRANCH}
227
231
228
232
git config --global user.name "Jenkins Pipeline"
@@ -249,10 +253,13 @@ spec:
249
253
release-it patch ${PRE_RELEASE} \
250
254
--ci \
251
255
--no-npm \
256
+ --no-git.push \
252
257
--no-git.requireCleanWorkingDir \
253
258
--verbose \
254
259
-VV
255
260
261
+ git push --follow-tags -v
262
+
256
263
echo "IMAGE_VERSION=$(git describe --abbrev=0 --tags)" > ./env-config
257
264
echo "IMAGE_NAME=$(basename -s .git `git config --get remote.origin.url` | tr '[:upper:]' '[:lower:]' | sed 's/_/-/g')" >> ./env-config
258
265
echo "REPO_URL=$(git config --get remote.origin.url)" >> ./env-config
Original file line number Diff line number Diff line change @@ -2,4 +2,5 @@ apiVersion: v1
2
2
appVersion : " 1.0"
3
3
description : A Helm chart for Kubernetes
4
4
name : base
5
- version : 1.0.0
5
+ version : 1.1.1
6
+ branch : dev
Original file line number Diff line number Diff line change @@ -2,16 +2,25 @@ apiVersion: apps/v1
2
2
kind : Deployment
3
3
metadata :
4
4
name : {{ include "starter-kit.fullname" . }}
5
- {{- if and .Values.vcsInfo.repoUrl .Values.vcsInfo.branch }}
6
5
annotations :
6
+ {{- if and .Values.vcsInfo.repoUrl .Values.vcsInfo.branch }}
7
7
app.openshift.io/vcs-ref : {{ .Values.vcsInfo.branch }}
8
8
app.openshift.io/vcs-uri : {{ .Values.vcsInfo.repoUrl }}
9
9
{{- end }}
10
+ {{- if .Values.connectsTo }}
11
+ app.openshift.io/connects-to : {{ .Values.connectsTo }}
12
+ {{- end }}
10
13
labels :
11
14
app.kubernetes.io/name : {{ include "starter-kit.name" . }}
12
15
helm.sh/chart : {{ include "starter-kit.chart" . }}
13
16
app.kubernetes.io/instance : {{ .Release.Name }}
14
17
app : {{ .Release.Name }}
18
+ {{- if .Values.partOf }}
19
+ app.kubernetes.io/part-of : {{ .Values.partOf }}
20
+ {{- end}}
21
+ {{- if .Values.runtime }}
22
+ app.openshift.io/runtime : {{ .Values.runtime }}
23
+ {{- end}}
15
24
spec :
16
25
replicas : {{ .Values.replicaCount }}
17
26
selector :
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ kind: Route
4
4
apiVersion : route.openshift.io/v1
5
5
metadata :
6
6
name : {{ $fullName }}
7
+ annotations :
8
+ argocd.argoproj.io/sync-options : Validate=false
7
9
spec :
8
10
to :
9
11
kind : Service
Original file line number Diff line number Diff line change @@ -39,3 +39,9 @@ ingress:
39
39
vcsInfo :
40
40
repoUrl : " "
41
41
branch : " "
42
+
43
+ partOf : " "
44
+
45
+ connectsTo : " "
46
+
47
+ runtime : nodejs
Original file line number Diff line number Diff line change
1
+ version : 1.1.1
2
+ name : nodejs
3
+ runtime : nodejs
4
+ build-tool : node
You can’t perform that action at this time.
0 commit comments