I have the below script to iterate the the properties file and invoke a
another job through REST API call.
!/bin/bash
IFS=$'\n'
for file in `ls -1 *.config`; do
for val in `cat $file`;do
url+="\&"${val}
done
url=${url// /"%20"}
echo curl -su "abcl:32423423fssd"
http://jenkins.com/job/abc/buildWithParameters?token=stop${url}
curl -su
"abcl:32423423fssd"
http://jenkins.com/job/abc/buildWithParameters?token=stop${url}
url=""
sleep 1
done
This script when executes throws some garbage like below and doesn't work.
!DOCTYPE html><html><head>
<title>Jenkins</title><link rel="stylesheet" type="text/css"
href="/static/d27551cd/css/style.css" /><link rel="stylesheet"
type="text/css" href="/static/d27551cd/css/color.css" /><link rel="shortcut
icon" type="image/vnd.microsoft.icon" href="/static/d27551cd/favicon.ico"
/><script>var isRunAsTest=false; var rootURL=""; var
resURL="/static/d27551cd";</script><script
src="/static/d27551cd/scripts/prototype.js"
type="text/javascript"></script><script src="/static/d27551cd/scripts/b
But the line I am echoing, If i copy paste the line from console and
execute in the command line, it works just fine and triggers the job.
Can anyone give me any pointer about what is happening here ?
Thanks,
Maneesh
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/629d6a3c-c947-436e-afe7-f85047aa92eb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.