Skip to content

Commit dda0b59

Browse files
authored
Merge pull request #172 from marklogic/release/1.0.2
Release Helm Chart v1.0.2
2 parents e9621b4 + 3ba8637 commit dda0b59

22 files changed

+793
-211
lines changed

.golangci.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ linters-settings:
3131
- name: superfluous-else
3232
- name: unused-parameter
3333
- name: unreachable-code
34-
- name: redefines-builtin-id
34+
- name: redefines-builtin-id

Jenkinsfile

+31-19
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@
55
@Library('[email protected]')
66
import groovy.json.JsonSlurperClassic
77

8-
emailList = '[email protected], irosenba@marklogic.com, sumanth.ravipati@marklogic.com, peng.zhou@marklogic.com, fayez.saliba@marklogic.com, barkha.choithani@marklogic.com'
9-
gitCredID = '550650ab-ee92-4d31-a3f4-91a11d5388a3'
8+
emailList = 'vitaly.korolev@progress.com, sumanth.ravipati@progress.com, peng.zhou@progress.com, fayez.saliba@progress.com, barkha.choithani@progress.com, romain.winieski@progress.com'
9+
gitCredID = 'marklogic-builder-github'
1010
JIRA_ID = ''
11-
JIRA_ID_PATTERN = /CLD-\d{3,4}/
11+
JIRA_ID_PATTERN = /(?i)(CLD|DEVO|QAINF|BUG|DBI)-\d{3,4}/
1212
LINT_OUTPUT = ''
1313
SCAN_OUTPUT = ''
1414
IMAGE_INFO = 0
@@ -31,7 +31,7 @@ void preBuildCheck() {
3131
if (env.CHANGE_ID) {
3232
if (prDraftCheck()) { sh 'exit 1' }
3333
if (getReviewState().equalsIgnoreCase('CHANGES_REQUESTED')) {
34-
println(reviewState)
34+
echo 'PR changes requested. (' + reviewState + ') Aborting.'
3535
sh 'exit 1'
3636
}
3737
}
@@ -51,11 +51,11 @@ def extractJiraID() {
5151
match = env.GIT_BRANCH =~ JIRA_ID_PATTERN
5252
}
5353
else {
54-
echo 'Warning: Jira ticket number not detected.'
54+
echo 'Warning: No Git title or branch available.'
5555
return ''
5656
}
5757
try {
58-
return match[0]
58+
return match[0][0]
5959
} catch (any) {
6060
echo 'Warning: Jira ticket number not detected.'
6161
return ''
@@ -127,11 +127,11 @@ void lint() {
127127

128128
void publishTestResults() {
129129
junit allowEmptyResults:true, testResults: '**/test/test_results/*.xml'
130-
publishHTML allowMissing: true, alwaysLinkToLastBuild: true, keepAll: true, reportDir: 'test/test_results', reportFiles: 'report.html', reportName: 'Kubernetes Tests Report', reportTitles: ''
130+
archiveArtifacts artifacts: '**/test/test_results/*.xml', allowEmptyArchive: true
131131
}
132132

133133
void pullImage() {
134-
withCredentials([usernamePassword(credentialsId: '8c2e0b38-9e97-4953-aa60-f2851bb70cc8', passwordVariable: 'docker_password', usernameVariable: 'docker_user')]) {
134+
withCredentials([usernamePassword(credentialsId: 'builder-credentials-artifactory', passwordVariable: 'docker_password', usernameVariable: 'docker_user')]) {
135135
sh """
136136
echo "\$docker_password" | docker login --username \$docker_user --password-stdin ${dockerRegistry}
137137
docker pull ${dockerRepository}:${dockerVersion}
@@ -167,8 +167,9 @@ pipeline {
167167
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 04 * * *''' : '')
168168
}
169169
environment {
170-
timeStamp = sh(returnStdout: true, script: "date +%Y%m%d -d '-5 hours'").trim()
171-
dockerRegistry = 'ml-docker-dev.marklogic.com'
170+
//timeStamp = sh(returnStdout: true, script: "date +%Y%m%d -d '-5 hours'").trim()
171+
timeStamp = 'nightly'
172+
dockerRegistry = 'ml-docker-db-dev-tierpoint.bed-artifactory.bedford.progress.com'
172173
dockerRepository = "${dockerRegistry}/marklogic/marklogic-server-centos"
173174
dockerVerDivider = getVersionDiv(params.ML_VERSION)
174175
prevDockerVerDivider = getVersionDiv(params.PREV_ML_VERSION)
@@ -178,11 +179,12 @@ pipeline {
178179

179180
parameters {
180181
string(name: 'emailList', defaultValue: emailList, description: 'List of email for build notification', trim: true)
181-
choice(name: 'ML_VERSION', choices: '11.1\n12.0\n10.0\n9.0', description: 'MarkLogic version. used to pick appropriate docker image')
182+
choice(name: 'ML_VERSION', choices: '11.2\n12.0\n10.0', description: 'MarkLogic version. used to pick appropriate docker image')
182183
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\n9.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)
184+
booleanParam(name: 'HC_TESTS', defaultValue: false, description: 'Run Hub Central E2E UI tests (takes about 3 hours)')
185+
string(name: 'dockerReleaseVer', defaultValue: '1.1.1', description: 'Current Docker version. (e.g. 1.0.1)', trim: true)
186+
choice(name: 'PREV_ML_VERSION', choices: '10.0\n9.0\n11.2', description: 'Previous MarkLogic version for MarkLogic upgrade tests')
187+
string(name: 'prevDockerReleaseVer', defaultValue: '1.1.1', description: 'Previous Docker version for MarkLogic upgrade tests. (e.g. 1.0.1)', trim: true)
186188
choice(name: 'K8_VERSION', choices: 'v1.25.8\nv1.26.3\nv1.24.12\nv1.23.17', description: 'Test Kubernetes version. (e.g. v1.25.8)')
187189
}
188190

@@ -211,22 +213,32 @@ pipeline {
211213
}
212214
steps {
213215
sh """
214-
export MINIKUBE_HOME=/space;
215-
make test dockerImage=${dockerRepository}:${dockerVersion} prevDockerImage=${dockerRepository}:${prevDockerVersion} kubernetesVersion=${params.K8_VERSION} saveOutput=true
216+
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; make test dockerImage=${dockerRepository}:${dockerVersion} prevDockerImage=${dockerRepository}:${prevDockerVersion} kubernetesVersion=${params.K8_VERSION} saveOutput=true minikubeMemory=20gb
217+
"""
218+
}
219+
}
220+
stage('Kubernetes-Run-HC-Tests') {
221+
when {
222+
expression { return params.HC_TESTS }
223+
}
224+
steps {
225+
sh """
226+
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; make hc-test dockerImage=${dockerRepository}:${dockerVersion} kubernetesVersion=${params.K8_VERSION} minikubeMemory=20gb
216227
"""
217228
}
218229
}
219230
}
220231

221232
post {
222233
always {
234+
publishTestResults()
223235
sh '''
224236
docker system prune --force --filter "until=720h"
225237
docker volume prune --force
226238
docker image prune --force --all
227-
minikube delete --all --purge
239+
export MINIKUBE_HOME=/space; export KUBECONFIG=/space/.kube-config; minikube delete --all --purge
228240
'''
229-
publishTestResults()
241+
sh "rm -rf $WORKSPACE/test/test_results/"
230242
}
231243
success {
232244
resultNotification('BUILD SUCCESS ✅')
@@ -238,4 +250,4 @@ pipeline {
238250
resultNotification('BUILD UNSTABLE ❌')
239251
}
240252
}
241-
}
253+
}

0 commit comments

Comments
 (0)