Re: Jenkins Environment Variable
On 14/03/16 16:44, Jayesh Iyer wrote: Hi, I am using jenkins environment variable, i am specifying property something like count=1 the same is present in my build file as I have specified a property file something as C:\Users\myname.i\workspace\Project\application.properties When i trigger the build, the property file gets updated as count=${env.count} and not the value which is 1 ( I am passing this as a parameter from jenkins) Can anyone say what wrong i am doing here Without more details, not really. You're right that a build parameter should be exported as an environment variable. It sounds possibly like you're using an Ant build file (perhaps?) to write a properties file. If so, have you included in your Ant build? Regards, Chris -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/56E9FEA2.10908%40orr.me.uk. For more options, visit https://groups.google.com/d/optout.
Jenkins Environment Variable
Hi, I am using jenkins environment variable, i am specifying property something like count=1 the same is present in my build file as I have specified a property file something as C:\Users\myname.i\workspace\Project\application.properties When i trigger the build, the property file gets updated as count=${env.count} and not the value which is 1 ( I am passing this as a parameter from jenkins) Can anyone say what wrong i am doing here -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/3de6491b-e95a-48d7-82d7-b9358eb05401%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Jenkins environment variable in "execute shell script on report host using ssh"
Hi, I am trying to do ssh to a linux machine and run some commands. I am using ssh agent plugin for this. I tried accessing Jenkins environment variable in "execute shell script on report host using ssh", but i am getting "command not found" error for that environment variable. Here is what i am trying: In execute shell script on report host using ssh: echo $BUILD_NUMBER In log: BUILD_NUMBER=163: Command not found. And echo is not printing anything. Please let me know how to access environment variable. Regards, Shambhu. -- If linux doesn't have a solution, then u have a wrong problem. Shambhu Kumar Sharma 91-98807 52962 -- 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 jenkinsci-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAFpzn_%3D9dF_3U5uWZ5FJKQqRXj-0mBf%2B5rkUaz1mKREk7pLf2w%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
Re: Use of Jenkins environment variable in directory path
Have you tried to use ${GIT_BUILD_NUMBER} instead of %GIT_BUILD_NUMBER%? If you do a SET command in the second Batch command block do you see the GIT_BUILD_NUMBER set? Is it possible to run the commands you need to in the first block where GIT_BUILD_NUMBER appears to be working fine? Thanks Mark On Thursday, August 29, 2013 6:44:52 AM UTC-6, TP wrote: > > I'm relatively new to the Jenkins world and I'm having issues with the use > of environment variables. > > I'm currently running builds from code I check out from a git repository. > I inject an environment variable called GIT_BUILD_NUMBER that I pull from > the checkout and use it successfully in a Windows Batch Command Block: > > ::Build Project > python buildProj.py --branch %Branch% --bin_src %WORKSPACE% --build_number > %GIT_BUILD_NUMBER% > > This executes successfully with the proper git build number. In the very > next "Execute Windows Batch command" block, I simply try to use that same > variable in a directory path and this causes the build to fail: > > J:\builds\%GIT_BUILD_NUMBER%\ > > I've also tried this: > > J:\\builds\\%GIT_BUILD_NUMBER%\\ > > When I echo this line, I just get: > > J:\builds\\ > > Any insight would be greatly appreciated. > -- 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Use of Jenkins environment variable in directory path
I'm relatively new to the Jenkins world and I'm having issues with the use of environment variables. I'm currently running builds from code I check out from a git repository. I inject an environment variable called GIT_BUILD_NUMBER that I pull from the checkout and use it successfully in a Windows Batch Command Block: ::Build Project python buildProj.py --branch %Branch% --bin_src %WORKSPACE% --build_number %GIT_BUILD_NUMBER% This executes successfully with the proper git build number. In the very next "Execute Windows Batch command" block, I simply try to use that same variable in a directory path and this causes the build to fail: J:\builds\%GIT_BUILD_NUMBER%\ I've also tried this: J:\\builds\\%GIT_BUILD_NUMBER%\\ When I echo this line, I just get: J:\builds\\ Any insight would be greatly appreciated. -- 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 jenkinsci-users+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: Possibility to get build_status using jenkins environment variable
Go to any Jenkins page. Click to place cursor in browser address bar. Add "/api" to the URL and hit enter. -- Sami Varghese Renny kirjoitti 25.7.2012 kello 15.02: > Can you explain about xml api, whether i needed to install some plugin? > my purpose is i am writing an task. Using env i can access build_number, > build_url but not build_status. > So Where i needed to $JENKINS_URL/job/JOB/BUILD/api/xml using GET? > > > > Thanks in Advance, > varghese
Re: Possibility to get build_status using jenkins environment variable
Can you explain about xml api, whether i needed to install some plugin? my purpose is i am writing an task. Using env i can access build_number, build_url but not build_status. So Where i needed to $JENKINS_URL/job/JOB/BUILD/api/xml using GET? Thanks in Advance, varghese
Re: Possibility to get build_status using jenkins environment variable
Where is the ant task running? In the same build or in a different build? If the ant task is running in the same build, you can assume the build is successful, as it should have aborted if an earlier build step failed. If the tas is running in a different build, you need to fetch the build status using XML API by GET $JENKINS_URL/job/JOB/BUILD/api/xml -- Sami Varghese Renny kirjoitti 24.7.2012 kello 13.56: > > Hi > i want to get build status for using in an ant task. But i am not able to > find an environment variable which contains the value of build status.. > Please help to get the value of build status? > > Any comment would be greatly appreciated. > > > > Regards, > varghese
Possibility to get build_status using jenkins environment variable
Hi i want to get build status for using in an ant task. But i am not able to find an environment variable which contains the value of build status.. Please help to get the value of build status? Any comment would be greatly appreciated. Regards, varghese