@@ -115,11 +115,7 @@ void resultNotification(message) {
115
115
116
116
void lint () {
117
117
sh '''
118
- # Added to fix 'Context loading failed error'
119
- go get ./...
120
- echo Installing golangci-lint
121
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.50.0
122
- make lint saveOutput=true path=./bin/
118
+ make lint saveOutput=true
123
119
'''
124
120
125
121
LINT_OUTPUT = sh(returnStdout : true , script : ' echo helm template lint output: ;cat helm-lint-output.txt ;echo all tests lint output: ;cat test-lint-output.txt' ). trim()
@@ -139,10 +135,23 @@ void pullImage() {
139
135
sh """
140
136
echo "\$ docker_password" | docker login --username \$ docker_user --password-stdin ${ dockerRegistry}
141
137
docker pull ${ dockerRepository} :${ dockerVersion}
138
+ docker pull ${ dockerRepository} :${ dockerVersion}
139
+ docker pull ${ dockerRepository} :${ prevDockerVersion}
142
140
"""
143
141
}
144
142
}
145
143
144
+ String getVersionDiv (mlVersion ) {
145
+ switch (mlVersion) {
146
+ case ' 10.0' :
147
+ return ' -'
148
+ case ' 9.0' :
149
+ return ' -'
150
+ default :
151
+ return ' .'
152
+ }
153
+ }
154
+
146
155
pipeline {
147
156
agent {
148
157
label {
@@ -161,13 +170,19 @@ pipeline {
161
170
timeStamp = sh(returnStdout : true , script : " date +%Y%m%d -d '-5 hours'" ). trim()
162
171
dockerRegistry = ' ml-docker-dev.marklogic.com'
163
172
dockerRepository = " ${ dockerRegistry} /marklogic/marklogic-server-centos"
164
- dockerVersion = " ${ ML_VERSION} -${ timeStamp} -centos-1.0.0"
173
+ dockerVerDivider = getVersionDiv(params. ML_VERSION )
174
+ prevDockerVerDivider = getVersionDiv(params. PREV_ML_VERSION )
175
+ dockerVersion = " ${ ML_VERSION}${ dockerVerDivider}${ timeStamp} -centos-${ dockerReleaseVer} "
176
+ prevDockerVersion = " ${ PREV_ML_VERSION}${ prevDockerVerDivider}${ timeStamp} -centos-${ prevDockerReleaseVer} "
165
177
}
166
178
167
179
parameters {
168
180
string(name : ' emailList' , defaultValue : emailList, description : ' List of email for build notification' , trim : true )
169
- choice(name : ' ML_VERSION' , choices : ' 10 .0\n 11 .0\n 9.0' , description : ' MarkLogic version. used to pick appropriate docker image' )
181
+ choice(name : ' ML_VERSION' , choices : ' 11 .0\n 12.0 \n 10 .0\n 9.0' , description : ' MarkLogic version. used to pick appropriate docker image' )
170
182
booleanParam(name : ' KUBERNETES_TESTS' , defaultValue : true , description : ' Run kubernetes tests' )
183
+ string(name : ' dockerReleaseVer' , defaultValue : ' 1.0.2' , description : ' Current Docker version. (e.g. 1.0.1)' , trim : true )
184
+ choice(name : ' PREV_ML_VERSION' , choices : ' 10.0\n 9.0' , description : ' Previous MarkLogic version for MarkLogic upgrade tests' )
185
+ string(name : ' prevDockerReleaseVer' , defaultValue : ' 1.0.2' , description : ' Previous Docker version for MarkLogic upgrade tests. (e.g. 1.0.1)' , trim : true )
171
186
}
172
187
173
188
stages {
@@ -196,7 +211,7 @@ pipeline {
196
211
steps {
197
212
sh """
198
213
export MINIKUBE_HOME=/space;
199
- make test dockerImage=${ dockerRepository} :${ dockerVersion} saveOutput=true
214
+ make test dockerImage=${ dockerRepository} :${ dockerVersion} prevDockerImage= ${ dockerRepository } : ${ prevDockerVersion } saveOutput=true
200
215
"""
201
216
}
202
217
}
0 commit comments