can't send ' on groovy sh command

2019-08-22 10:29发布

Hi all I have pipeline on jenkins and I try to execute some sh command

sh script: "cd /home/jenkins/workspace/automation-pipeline/ConvertedJSfiles/ && protractor conf.js -suite ${suiteTestss} --params.data='${data2}'  --params.description='${params.description}' --params.jenkins_build_number=${currentBuild.number}"

from some reason the ' erase on execute command and I can not successfully send strings with spaces as parameters on the operation example of wrong output

cd /home/jenkins/workspace/automation-pipeline/ConvertedJSfiles/ + protractor conf.js -suite User_story_xx --params.data={"User_Story_UI_xx": {"Env":"Staging","UserName":"somemail@gmail.com", "Password": "somepass","TrustedSupplier":"xxx xxx", "HowManySuppliers":16, "ErrorMessage":"xxx"}} --params.description=dsg --params.jenkins_build_number=144

0条回答
登录 后发表回答