Skip to content

Commit 2959470

Browse files
committed
Updates pipeline with version 1.1.1
1 parent 018a859 commit 2959470

File tree

6 files changed

+33
-4
lines changed

6 files changed

+33
-4
lines changed

Jenkinsfile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
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

chart/base/Chart.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ apiVersion: v1
22
appVersion: "1.0"
33
description: A Helm chart for Kubernetes
44
name: base
5-
version: 1.0.0
5+
version: 1.1.1
6+
branch: dev

chart/base/templates/deployment.yaml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,25 @@ apiVersion: apps/v1
22
kind: Deployment
33
metadata:
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}}
1524
spec:
1625
replicas: {{ .Values.replicaCount }}
1726
selector:

chart/base/templates/route.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ kind: Route
44
apiVersion: route.openshift.io/v1
55
metadata:
66
name: {{ $fullName }}
7+
annotations:
8+
argocd.argoproj.io/sync-options: Validate=false
79
spec:
810
to:
911
kind: Service

chart/base/values.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,9 @@ ingress:
3939
vcsInfo:
4040
repoUrl: ""
4141
branch: ""
42+
43+
partOf: ""
44+
45+
connectsTo: ""
46+
47+
runtime: nodejs

pipeline.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
version: 1.1.1
2+
name: nodejs
3+
runtime: nodejs
4+
build-tool: node

0 commit comments

Comments
 (0)