@@ -216,16 +216,15 @@ def DockerRunTests() {
216
216
def defaultParams= ' -it -d -p 8000:8000 -p 8001:8001 -p 8002:8002 -p7997:7997'
217
217
def curlCommand= ' curl -sL'
218
218
def curlCommandAuth= ' curl -sL --anyauth -u test_admin:test_admin_pass'
219
- def composePath= ' ./docker-compose/'
220
219
def jUnitReport = " docker-test-results.xml"
221
220
def testCases = readJSON file : ' ./test/docker-test-cases.json'
222
221
223
222
// validate JSON data
224
223
assert testCases instanceof Map
225
224
226
225
// create credential files for compose
227
- writeFile(file : " ${ composePath } mldb_admin_username.txt" , text : " test_admin" )
228
- writeFile(file : " ${ composePath } mldb_admin_password.txt" , text : " test_admin_pass" )
226
+ writeFile(file : " ./docker-compose/ mldb_admin_username.txt" , text : " test_admin" )
227
+ writeFile(file : " ./docker-compose/ mldb_admin_password.txt" , text : " test_admin_pass" )
229
228
230
229
def testResults = ' '
231
230
def totalTests = 0
@@ -241,11 +240,11 @@ def DockerRunTests() {
241
240
// if .yaml config is provided in params, start compose. otherwise docker run is used
242
241
if ( value. params. toString(). contains(" .yaml" )) {
243
242
// update image label in yaml file
244
- composeFile = readFile(composePath + value. params)
243
+ composeFile = readFile(value. params)
245
244
composeFile = composeFile. replaceFirst(/ image: .*/ , " image: " + testImage)
246
- writeFile( file : composePath + value. params, text : composeFile)
245
+ writeFile( file : value. params, text : composeFile)
247
246
// start docker compose
248
- sh( returnStdout : true , script : " docker compose -f ${ composePath }${ value.params} up -d" )
247
+ sh( returnStdout : true , script : " docker compose -f ${ value.params} up -d" )
249
248
} else {
250
249
// insert valid license data in parameters
251
250
value. params = value. params. toString(). replaceAll(" LICENSE_PLACEHOLDER" , " LICENSEE='MarkLogic - Version 9 QA Test License' -e LICENSE_KEY=\" ${ env.QA_LICENSE_KEY} \" " )
@@ -300,7 +299,7 @@ def DockerRunTests() {
300
299
}
301
300
echo " -Deleting resources"
302
301
if ( value. params. toString(). contains(" .yaml" )) {
303
- sh( returnStdout : true , script : " docker compose -f ${ composePath }${ value.params} down" )
302
+ sh( returnStdout : true , script : " docker compose -f ${ value.params} down" )
304
303
} else {
305
304
sh( returnStdout : true , script : " docker rm -f ${ testCont} " )
306
305
}
0 commit comments