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} "
13/*
24 * This is a vanilla Jenkins pipeline that relies on the Jenkins kubernetes plugin to dynamically provision agents for
35 * the build containers.
@@ -220,9 +222,11 @@ spec:
220222
221223 git config --local credential.helper "!f() { echo username=\\ $GIT_AUTH_USER; echo password=\\ $GIT_AUTH_PWD; }; f"
222224
223- git fetch origin ${BRANCH}
225+ git fetch
224226 git fetch --tags
225- git checkout ${BRANCH}
227+ git tag -l
228+
229+ git checkout -b ${BRANCH} --track origin/${BRANCH}
226230 git branch --set-upstream-to=origin/${BRANCH} ${BRANCH}
227231
228232 git config --global user.name "Jenkins Pipeline"
@@ -249,10 +253,13 @@ spec:
249253 release-it patch ${PRE_RELEASE} \
250254 --ci \
251255 --no-npm \
256+ --no-git.push \
252257 --no-git.requireCleanWorkingDir \
253258 --verbose \
254259 -VV
255260
261+ git push --follow-tags -v
262+
256263 echo "IMAGE_VERSION=$(git describe --abbrev=0 --tags)" > ./env-config
257264 echo "IMAGE_NAME=$(basename -s .git `git config --get remote.origin.url` | tr '[:upper:]' '[:lower:]' | sed 's/_/-/g')" >> ./env-config
258265 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
22appVersion : " 1.0"
33description : A Helm chart for Kubernetes
44name : 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
22kind : Deployment
33metadata :
44 name : {{ include "starter-kit.fullname" . }}
5- {{- if and .Values.vcsInfo.repoUrl .Values.vcsInfo.branch }}
65 annotations :
6+ {{- if and .Values.vcsInfo.repoUrl .Values.vcsInfo.branch }}
77 app.openshift.io/vcs-ref : {{ .Values.vcsInfo.branch }}
88 app.openshift.io/vcs-uri : {{ .Values.vcsInfo.repoUrl }}
99 {{- end }}
10+ {{- if .Values.connectsTo }}
11+ app.openshift.io/connects-to : {{ .Values.connectsTo }}
12+ {{- end }}
1013 labels :
1114 app.kubernetes.io/name : {{ include "starter-kit.name" . }}
1215 helm.sh/chart : {{ include "starter-kit.chart" . }}
1316 app.kubernetes.io/instance : {{ .Release.Name }}
1417 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}}
1524spec :
1625 replicas : {{ .Values.replicaCount }}
1726 selector :
Original file line number Diff line number Diff line change @@ -4,6 +4,8 @@ kind: Route
44apiVersion : route.openshift.io/v1
55metadata :
66 name : {{ $fullName }}
7+ annotations :
8+ argocd.argoproj.io/sync-options : Validate=false
79spec :
810 to :
911 kind : Service
Original file line number Diff line number Diff line change @@ -39,3 +39,9 @@ ingress:
3939vcsInfo :
4040 repoUrl : " "
4141 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