1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-01-18 05:18:24 +02:00

Merge pull request #22 from marcusholl/pr/fixQuotationInsideNeoDeploy

fix quotation inside neo deploy
This commit is contained in:
Marcus Holl 2017-12-04 12:12:08 +01:00 committed by GitHub
commit 1245528cfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 9 deletions

View File

@ -60,7 +60,7 @@ class NeoDeploymentTest extends PiperTestBase {
withPipeline(defaultPipeline()).execute(archivePath, 'myCredentialsId')
assert shellCalls[0] =~ /#!\/bin\/bash \/opt\/neo\/tools\/neo\.sh deploy-mta --user anonymous --host test\.deploy\.host\.com --source ".*" --account trialuser123 --password \*\*\*\*\*\*\*\* --synchronous/
assert shellCalls[0] =~ /#!\/bin\/bash "\/opt\/neo\/tools\/neo\.sh" deploy-mta --user 'anonymous' --host 'test\.deploy\.host\.com' --source ".*" --account 'trialuser123' --password '\*\*\*\*\*\*\*\*' --synchronous/
assert messages[1] == "[neoDeploy] Neo executable \"/opt/neo/tools/neo.sh\" retrieved from environment."
@ -90,7 +90,7 @@ class NeoDeploymentTest extends PiperTestBase {
withPipeline(noCredentialsIdPipeline()).execute(archivePath)
assert shellCalls[0] =~ /#!\/bin\/bash \/opt\/neo\/tools\/neo\.sh deploy-mta --user defaultUser --host test\.deploy\.host\.com --source ".*" --account trialuser123 --password \*\*\*\*\*\*\*\* --synchronous/
assert shellCalls[0] =~ /#!\/bin\/bash "\/opt\/neo\/tools\/neo\.sh" deploy-mta --user 'defaultUser' --host 'test\.deploy\.host\.com' --source ".*" --account 'trialuser123' --password '\*\*\*\*\*\*\*\*' --synchronous/
assert messages[1] == "[neoDeploy] Neo executable \"/opt/neo/tools/neo.sh\" retrieved from environment."
}
@ -103,7 +103,7 @@ class NeoDeploymentTest extends PiperTestBase {
withPipeline(noCredentialsIdPipeline()).execute(archivePath)
assert shellCalls[0] =~ /#!\/bin\/bash neo deploy-mta --user defaultUser --host test\.deploy\.host\.com --source ".*" --account trialuser123 --password \*\*\*\*\*\*\*\* --synchronous/
assert shellCalls[0] =~ /#!\/bin\/bash "neo" deploy-mta --user 'defaultUser' --host 'test\.deploy\.host\.com' --source ".*" --account 'trialuser123' --password '\*\*\*\*\*\*\*\*' --synchronous/
assert messages[1] == "Using Neo executable from PATH."
}
@ -116,7 +116,7 @@ class NeoDeploymentTest extends PiperTestBase {
withPipeline(neoHomeParameterPipeline()).execute(archivePath, 'myCredentialsId')
assert shellCalls[0] =~ /#!\/bin\/bash \/etc\/neo\/tools\/neo\.sh deploy-mta --user anonymous --host test\.deploy\.host\.com --source ".*" --account trialuser123 --password \*\*\*\*\*\*\*\* --synchronous/
assert shellCalls[0] =~ /#!\/bin\/bash "\/etc\/neo\/tools\/neo\.sh" deploy-mta --user 'anonymous' --host 'test\.deploy\.host\.com' --source ".*" --account 'trialuser123' --password '\*\*\*\*\*\*\*\*' --synchronous.*/
assert messages[1] == "[neoDeploy] Neo executable \"/etc/neo/tools/neo.sh\" retrieved from parameters."

View File

@ -45,12 +45,12 @@ def call(parameters = [:]) {
usernameVariable: 'username'
)]) {
sh """#!/bin/bash
${neoExecutable} deploy-mta \
--user ${username} \
--host ${deployHost} \
"${neoExecutable}" deploy-mta \
--user '${username}' \
--host '${deployHost}' \
--source "${archivePath.getAbsolutePath()}" \
--account ${deployAccount} \
--password ${password} \
--account '${deployAccount}' \
--password '${password}' \
--synchronous
"""
}