Skip to content

Commit 4bfa99a

Browse files
vitalykorolevilanRosenbaumVitaly KorolevBarkha Choithanibarkhachoithani
authored
Release/docker 1.0.1 (#191)
* Move email list to variable, add me to email list * Feature/CLD-612 (#166) (#167) * Update email lists * Update RPM path based on new format * Update converters RPM path * Update RPM path conditionally for 11 * Update marklogic description * Add Jira ID to email subject Co-authored-by: Vitaly Korolev <[email protected]> * Replace -1 with -rhel in 11.0 RPM (#168) * CLD-615: Remove Docker Hub account requirement in the README * Fix invalid email format in Jenkinsfile (#169) * CLD-597: Update the docker readme to make it more clear that it must run as privileged * Changes based on PR comments * Use older version of container tests (#172) (#173) * CLD-614: instance-admin should only be called on the bootstrap host * Fix typo * CLD-645: Implement ready check after bootstrap host initialisation * Move variable declaration * Add Comment * CLD-631 (#176) (#177) * Remove -rhel from Docker image label * Update default email list (sumanth) * Update default build email list (peng) * CLD-658 Update branch names for the server (#179) * CLD-658 Update scheduled builds to run develop-11 (#180) * updated readme for docker release 11.0.0-centos-1.0.1 * removed latest ml version supported and updated supported tags section * fix for handling special chars in admin pwd & updated error msg and readme * changes for allowing special chars in admin password * updated error message in the docker tests * added test for admin password with special char * fixed test * fixed test * Feature/CLD-673 (#190) * Remove explicit version tag in examples * Increment copyright version * Increment release version and add ML 12 build * Fix typos in README There are some minor typos in the Known Issues and Limitations section. Co-authored-by: IlanRosenbaum <[email protected]> Co-authored-by: Vitaly Korolev <[email protected]> Co-authored-by: Ilan <[email protected]> Co-authored-by: Barkha Choithani <[email protected]> Co-authored-by: barkhachoithani <[email protected]>
1 parent cdcac7d commit 4bfa99a

12 files changed

+107
-114
lines changed

Jenkinsfile

+24-13
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,16 @@
55
@Library('[email protected]')
66
import groovy.json.JsonSlurperClassic
77

8-
8+
// email list for scheduled builds (includes security vulnerability)
9+
10+
// email list for security vulnerabilities only
11+
912
gitCredID = '550650ab-ee92-4d31-a3f4-91a11d5388a3'
1013
JIRA_ID = ''
1114
JIRA_ID_PATTERN = /CLD-\d{3,4}/
1215
LINT_OUTPUT = ''
1316
SCAN_OUTPUT = ''
1417
IMAGE_INFO = 0
15-
1618
// Define local funtions
1719
void preBuildCheck() {
1820
// Initialize parameters as env variables as workaround for https://issues.jenkins-ci.org/browse/JENKINS-41929
@@ -110,7 +112,7 @@ void resultNotification(message) {
110112
if (JIRA_ID) {
111113
def comment = [ body: "Jenkins pipeline build result: ${message}" ]
112114
jiraAddComment site: 'JIRA', idOrKey: JIRA_ID, failOnError: false, input: comment
113-
mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailList}", body: "${jira_email_body}", subject: "${message}: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
115+
mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailList}", body: "${jira_email_body}", subject: "${message}: ${env.JOB_NAME} #${env.BUILD_NUMBER} - ${JIRA_ID}"
114116
} else {
115117
mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailList}", body: "${email_body}", subject: "${message}: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
116118
}
@@ -119,6 +121,8 @@ void resultNotification(message) {
119121
String getServerVersion(branchName) {
120122
switch (branchName) {
121123
case 'develop':
124+
return '12.0'
125+
case 'develop-11':
122126
return '11.0'
123127
case 'develop-10.0':
124128
return '10.0'
@@ -131,18 +135,24 @@ String getServerVersion(branchName) {
131135

132136
void copyRPMs() {
133137
timeStamp = sh(returnStdout: true, script: 'date +%Y%m%d').trim()
138+
if (buildServerVersion == "11.0" || buildServerVersion == "12.0") {
139+
RPMsuffix = ".${timeStamp}-rhel"
140+
}
141+
else {
142+
RPMsuffix = "-${timeStamp}"
143+
}
134144
sh """
135145
cd src/centos
136146
if [ -z ${env.ML_RPM} ]; then
137147
unset RETCODE
138-
scp ${env.buildServer}:${env.buildServerBasePath}/${env.buildServerPlatform}/${buildServerPath}/pkgs.${timeStamp}/MarkLogic-${buildServerVersion}-${timeStamp}.x86_64.rpm . || RETCODE=\$?
148+
scp ${env.buildServer}:${env.buildServerBasePath}/${env.buildServerPlatform}/${buildServerPath}/pkgs.${timeStamp}/MarkLogic-${buildServerVersion}${RPMsuffix}.x86_64.rpm . || RETCODE=\$?
139149
if [ ! -z \$RETCODE ]; then
140150
count_iter=75
141151
while [ \$count_iter -gt 0 ] ; do
142152
unset RETCODE
143153
echo "WARN : unable to copy package!! retrying after 5 mins"
144154
sleep 300
145-
scp ${env.buildServer}:${env.buildServerBasePath}/${env.buildServerPlatform}/${buildServerPath}/pkgs.${timeStamp}/MarkLogic-${buildServerVersion}-${timeStamp}.x86_64.rpm . || RETCODE=\$?
155+
scp ${env.buildServer}:${env.buildServerBasePath}/${env.buildServerPlatform}/${buildServerPath}/pkgs.${timeStamp}/MarkLogic-${buildServerVersion}${RPMsuffix}.x86_64.rpm . || RETCODE=\$?
146156
if [ -z \$RETCODE ] ; then
147157
echo "INFO" "Successfully copied package"
148158
break
@@ -161,14 +171,14 @@ void copyRPMs() {
161171
fi
162172
if [ -z ${env.ML_CONVERTERS}]; then
163173
unset RETCODE
164-
scp ${env.buildServer}:${env.buildServerBasePath}/converter/${buildServerPath}/pkgs.${timeStamp}/MarkLogicConverters-${buildServerVersion}-${timeStamp}.x86_64.rpm . || RETCODE=\$?
174+
scp ${env.buildServer}:${env.buildServerBasePath}/converter/${buildServerPath}/pkgs.${timeStamp}/MarkLogicConverters-${buildServerVersion}${RPMsuffix}.x86_64.rpm . || RETCODE=\$?
165175
if [ ! -z \$RETCODE ]; then
166176
count_iter=75
167177
while [ \$count_iter -gt 0 ] ; do
168178
unset RETCODE
169179
echo "WARN : unable to copy package!! retrying after 5 mins"
170180
sleep 300
171-
scp ${env.buildServer}:${env.buildServerBasePath}converter/${buildServerPath}/pkgs.${timeStamp}/MarkLogicConverters-${buildServerVersion}-${timeStamp}.x86_64.rpm . || RETCODE=\$?
181+
scp ${env.buildServer}:${env.buildServerBasePath}converter/${buildServerPath}/pkgs.${timeStamp}/MarkLogicConverters-${buildServerVersion}${RPMsuffix}.x86_64.rpm . || RETCODE=\$?
172182
if [ -z \$RETCODE ] ; then
173183
echo "INFO" "Successfully copied package"
174184
break
@@ -189,7 +199,7 @@ void copyRPMs() {
189199
script {
190200
RPM = sh(returnStdout: true, script: 'cd src/centos;file MarkLogic-*.rpm | cut -d: -f1').trim()
191201
CONVERTERS = sh(returnStdout: true, script: 'cd src/centos;file MarkLogicConverters-*.rpm | cut -d: -f1').trim()
192-
mlVersion = sh(returnStdout: true, script: "echo ${RPM}| awk -F \"MarkLogic-\" '{print \$2;}' | awk -F \".x86_64.rpm\" '{print \$1;}' ").trim()
202+
mlVersion = sh(returnStdout: true, script: "echo ${RPM}| awk -F \"MarkLogic-\" '{print \$2;}' | awk -F \".x86_64.rpm\" '{print \$1;}' | awk -F \"-rhel\" '{print \$1;}' ").trim()
193203
}
194204
}
195205

@@ -199,7 +209,7 @@ void structureTests() {
199209
#insert current version
200210
sed -i -e 's^VERSION_PLACEHOLDER^${mlVersion}-${env.platformString}-${env.dockerVersion}^g' -e 's^BRANCH_PLACEHOLDER^${env.BRANCH_NAME}^g' ./structure-test.yaml
201211
cd ..
202-
curl -s -LO https://storage.googleapis.com/container-structure-test/latest/container-structure-test-linux-amd64 && chmod +x container-structure-test-linux-amd64 && mv container-structure-test-linux-amd64 container-structure-test
212+
curl -s -LO https://storage.googleapis.com/container-structure-test/v1.11.0/container-structure-test-linux-amd64 && chmod +x container-structure-test-linux-amd64 && mv container-structure-test-linux-amd64 container-structure-test
203213
make structure-test version=${mlVersion}-${env.platformString}-${env.dockerVersion} Jenkins=true
204214
#fix junit output
205215
sed -i -e 's/<\\/testsuites>//' -e 's/<testsuite>//' -e 's/<testsuites/<testsuite name="container-structure-test"/' ./container-structure-test.xml
@@ -236,7 +246,7 @@ void scan() {
236246

237247
SCAN_OUTPUT = sh(returnStdout: true, script: 'grep \'High\\|Critical\' scan-server-image.txt')
238248
if (SCAN_OUTPUT.size()) {
239-
mail charset: 'UTF-8', mimeType: 'text/html', to: "${params.emailList}", body: "<br>Jenkins pipeline for ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br>Vulnerabilities: <pre><code>${SCAN_OUTPUT}</code></pre>", subject: "Critical or High Security Vulnerabilities Found: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
249+
mail charset: 'UTF-8', mimeType: 'text/html', to: "${emailSecList}", body: "<br>Jenkins pipeline for ${env.JOB_NAME} <br>Build Number: ${env.BUILD_NUMBER} <br>Vulnerabilities: <pre><code>${SCAN_OUTPUT}</code></pre>", subject: "Critical or High Security Vulnerabilities Found: ${env.JOB_NAME} #${env.BUILD_NUMBER}"
240250
}
241251

242252
sh '''rm -f scan-server-image.txt'''
@@ -270,7 +280,8 @@ pipeline {
270280
}
271281
triggers {
272282
parameterizedCron( env.BRANCH_NAME == 'develop' ? '''00 03 * * * % ML_SERVER_BRANCH=develop-10.0
273-
00 04 * * * % ML_SERVER_BRANCH=develop''' : '')
283+
00 04 * * * % ML_SERVER_BRANCH=develop-11
284+
00 05 * * * % ML_SERVER_BRANCH=develop''' : '')
274285
}
275286
environment {
276287
buildServer = 'distro.marklogic.com'
@@ -284,9 +295,9 @@ pipeline {
284295

285296
parameters {
286297
string(name: 'emailList', defaultValue: emailList, description: 'List of email for build notification', trim: true)
287-
string(name: 'dockerVersion', defaultValue: '1.0.0', description: 'ML Docker version. This version along with ML rpm package version will be the image tag as {ML_Version}_{dockerVersion}', trim: true)
298+
string(name: 'dockerVersion', defaultValue: '1.0.1', description: 'ML Docker version. This version along with ML rpm package version will be the image tag as {ML_Version}_{dockerVersion}', trim: true)
288299
string(name: 'platformString', defaultValue: 'centos', description: 'Platform string for Docker image version. Will be made part of the docker image tag', trim: true)
289-
choice(name: 'ML_SERVER_BRANCH', choices: 'develop-10.0\ndevelop\ndevelop-9.0', description: 'MarkLogic Server Branch. used to pick appropriate rpm')
300+
choice(name: 'ML_SERVER_BRANCH', choices: 'develop-11\ndevelop\ndevelop-10.0\ndevelop-9.0', description: 'MarkLogic Server Branch. used to pick appropriate rpm')
290301
string(name: 'ML_RPM', defaultValue: '', description: 'RPM to be used for Image creation. \n If left blank nightly ML rpm will be used.\n Please provide Jenkins accessible path e.g. /project/engineering or /project/qa', trim: true)
291302
string(name: 'ML_CONVERTERS', defaultValue: '', description: 'The Converters RPM to be included in the image creation \n If left blank the nightly ML Converters Package will be used.', trim: true)
292303
booleanParam(name: 'PUBLISH_IMAGE', defaultValue: false, description: 'Publish image to internal registry')

LICENSE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Copyright © 2022 MarkLogic Corporation.
1+
Copyright © 2023 MarkLogic Corporation.
22

33
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
44

NOTICE.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MarkLogic® Docker
22

3-
Copyright © 2022 MarkLogic Corporation.
3+
Copyright © 2023 MarkLogic Corporation.
44

55
This project is licensed under the Apache License, Version 2.0 (the "License"); you may not use this project except in compliance with the License. You may obtain a copy of the License at
66

0 commit comments

Comments
 (0)