From 8c34cc29de733b672d86cc7896d69bb2d1a96512 Mon Sep 17 00:00:00 2001 From: adam Date: Mon, 2 Dec 2024 22:13:47 -0500 Subject: [PATCH] its having trouble curling, because its having trouble keeping track of the command... because the password has a backslash. :lolsob: --- scripts/1clickservice.groovy | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/scripts/1clickservice.groovy b/scripts/1clickservice.groovy index c1ed771..a535dfb 100644 --- a/scripts/1clickservice.groovy +++ b/scripts/1clickservice.groovy @@ -111,20 +111,16 @@ pipeline { sed -ie \"\${dbstartline}d;\${dbendline}d\" Jenkinsfile - echo "114" databasecredsid=\$(uuidgen) - echo "116: notice that -s won't happen until line 123" - urlGetData=\"crumbIssuer/api/xml\\?xpath=concat\\(//crumbRequestField,\\":\\",//crumb\\)\"\" - echo "118" + urlGetData=\"crumbIssuer/api/xml?xpath=concat\\(//crumbRequestField,\\":\\",//crumb\\)\" + echo "116" echo \"\${urlGetData}\" - echo "120" - sleep 1 + echo "118" + echo \'curl -s \"http://${env.JENKINS_USR}:\\\'${env.JENKINS_PSW}\\\'@alloces.lan:8080/\${urlGetData}\"\' echo "122" - echo \"curl -s \"http://${env.JENKINS_USR}:\'${env.JENKINS_PSW}\'@alloces.lan:8080/\${urlGetData}\" - echo "123" - curl -s \"http://${env.JENKINS_USR}:\'${env.JENKINS_PSW}\'@alloces.lan:8080/\${urlGetData}\" + curl -s \"http://${env.JENKINS_USR}:\\\'${env.JENKINS_PSW}\\\'@alloces.lan:8080/\${urlGetData}\" - CRUMB=\$(curl -s \"http://${env.JENKINS_USR}:\'${env.JENKINS_PSW}\'@alloces.lan:8080/\${urlGetData}\") + CRUMB=\$(curl -s \"http://${env.JENKINS_USR}:\\\'${env.JENKINS_PSW}\\\'@alloces.lan:8080/\${urlGetData}\") echo \$CRUMB curl -H \$CRUMB -X POST \"http://${env.JENKINS_USR}:'${env.JENKINS_PSW}'@alloces.lan:8080/job/gitea.arg.rip/job/${servicename}/credentials/store/folder/domain/greyn%20services/createCredentials\" \ --data-urlencode 'json={