Re: Passing environment variables using the parameterized trigger plugin
Hi I am calling parameterized build using below , where RELEASE_VERSION = 1.0 , DEV_BUILD = 1 and SVN_REVISON=227 PROD_VERSION=$RELEASE_VERSION.$DEV_BUILD_$SVN_REVISION the parameter used in called build as PROD_VERSION=1.0.$DEV_BUILD_227 am I need to do something different to get PROD_VERSION as 1.0.1_227 Thanks & Regards Prashant On Thursday, November 13, 2014 at 10:26:27 PM UTC, Adam Mercer wrote: > > On Thu, Nov 13, 2014 at 4:17 PM, Daniel Beck > wrote: > > > So it behaves correctly. The label part is only part of the sub-builds > (where the project name has the suffix with the active axis values), not > the overall build (which does not), and if the trigger is run once for the > overall build, the axes values are not part of that. > > Ok thanks. Looks like I've going to pass the parameters via a file. > > Cheers > > Adam > -- 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/7421ea76-da0a-4c36-97d8-961e3abd76f6%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
On Thu, Nov 13, 2014 at 4:17 PM, Daniel Beck wrote: > So it behaves correctly. The label part is only part of the sub-builds (where > the project name has the suffix with the active axis values), not the overall > build (which does not), and if the trigger is run once for the overall build, > the axes values are not part of that. Ok thanks. Looks like I've going to pass the parameters via a file. Cheers Adam -- 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/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
On 13.11.2014, at 22:21, Adam Mercer wrote: > The downstream build is triggered when all axes are finished. So it behaves correctly. The label part is only part of the sub-builds (where the project name has the suffix with the active axis values), not the overall build (which does not), and if the trigger is run once for the overall build, the axes values are not part of that. -- 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/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
On Fri, Nov 7, 2014 at 7:17 AM, Daniel Beck wrote: > Is the downstream build triggered for every matrix axis that finishes > building, or only once, when all axes finished? Sorry for the delay I've been busy with getting a release out of the door. The downstream build is triggered when all axes are finished. Cheers Adam -- 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/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
Is the downstream build triggered for every matrix axis that finishes building, or only once, when all axes finished? On 07.11.2014, at 05:46, Adam Mercer wrote: > On Thu, Nov 6, 2014 at 4:15 PM, Ginga, Dick > wrote: >> Change the jobname to labl:sl6? Or labl-sl6? > > I can't, that's what Jenkins assigns. The job itself is called LAL and > the matrix plugin adds /label=sl6, /label=wheezy, etc... depending on > which operating system I'm trying to build on. I build the software on > several different operating systems and use the Matrix plugin to run > builds on different systems. > > Cheers > > Adam > > -- > 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/d/optout. > -- 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/d/optout.
RE: Passing environment variables using the parameterized trigger plugin
Oops, did not know that. Sounds like a bug then. -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Adam Mercer Sent: Thursday, November 06, 2014 11:46 PM To: jenkinsci-users@googlegroups.com Subject: Re: Passing environment variables using the parameterized trigger plugin On Thu, Nov 6, 2014 at 4:15 PM, Ginga, Dick wrote: > Change the jobname to labl:sl6? Or labl-sl6? I can't, that's what Jenkins assigns. The job itself is called LAL and the matrix plugin adds /label=sl6, /label=wheezy, etc... depending on which operating system I'm trying to build on. I build the software on several different operating systems and use the Matrix plugin to run builds on different systems. Cheers Adam -- 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/d/optout. -- 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/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
On Thu, Nov 6, 2014 at 4:15 PM, Ginga, Dick wrote: > Change the jobname to labl:sl6? Or labl-sl6? I can't, that's what Jenkins assigns. The job itself is called LAL and the matrix plugin adds /label=sl6, /label=wheezy, etc... depending on which operating system I'm trying to build on. I build the software on several different operating systems and use the Matrix plugin to run builds on different systems. Cheers Adam -- 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/d/optout.
RE: Passing environment variables using the parameterized trigger plugin
Change the jobname to labl:sl6? Or labl-sl6? -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Adam Mercer Sent: Thursday, November 06, 2014 5:07 PM To: jenkinsci-users@googlegroups.com Subject: Re: Passing environment variables using the parameterized trigger plugin On Thu, Nov 6, 2014 at 7:15 AM, Ginga, Dick wrote: > Perhaps the label=sl6 is getting parsed as another parameter?? Try > \'ing it: label\=sl6 Interesting idea, that kind of makes sense. The problem is that there's nothing for me to escape, as label=sl6 is part of JOB_NAME itself. Cheers Adam -- 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/d/optout. -- 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/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
On Thu, Nov 6, 2014 at 7:15 AM, Ginga, Dick wrote: > Perhaps the label=sl6 is getting parsed as another parameter?? Try \'ing it: > label\=sl6 Interesting idea, that kind of makes sense. The problem is that there's nothing for me to escape, as label=sl6 is part of JOB_NAME itself. Cheers Adam -- 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/d/optout.
RE: Passing environment variables using the parameterized trigger plugin
Perhaps the label=sl6 is getting parsed as another parameter?? Try \'ing it: label\=sl6 -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Adam Mercer Sent: Wednesday, November 05, 2014 5:40 PM To: jenkinsci-users@googlegroups.com Subject: Re: Passing environment variables using the parameterized trigger plugin On Wed, Nov 5, 2014 at 4:30 PM, Dunnigan, Terrence J wrote: > Are you using a recent version of Jenkins and the parameterized plugin? The current LTS release and the latest parameterized plugin, at least Jenkins tells me that no updates are available for my plugins. > I suspect the problem is that you are defining $PREFIX locally on the > machine, and then trying to reference it via a Jenkins job configuration. > When I’ve encountered that situation I’ve worked around it by writing the > value to a .properties file and then passing that file to the downstream job > (using the ‘Parameters from a properties file’) option. That sounds like what I'm going to need to do. > As for the other environment variables, passing $JOB_NAME and $BUILD_NUMBER > work just fine for me. BUILD_NUMBER works without an issue, JOB_NAME is only partially passed. The value is Job1 is "LALSuite/LAL/label=sl6" but only "LALSuite/LAL" is passed to Job2, the label=sl6 part is dropped. Cheers Adam -- 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/d/optout. -- 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/d/optout.
Re: Passing environment variables using the parameterized trigger plugin
On Wed, Nov 5, 2014 at 4:30 PM, Dunnigan, Terrence J wrote: > Are you using a recent version of Jenkins and the parameterized plugin? The current LTS release and the latest parameterized plugin, at least Jenkins tells me that no updates are available for my plugins. > I suspect the problem is that you are defining $PREFIX locally on the > machine, and then trying to reference it via a Jenkins job configuration. > When I’ve encountered that situation I’ve worked around it by writing the > value to a .properties file and then passing that file to the downstream job > (using the ‘Parameters from a properties file’) option. That sounds like what I'm going to need to do. > As for the other environment variables, passing $JOB_NAME and $BUILD_NUMBER > work just fine for me. BUILD_NUMBER works without an issue, JOB_NAME is only partially passed. The value is Job1 is "LALSuite/LAL/label=sl6" but only "LALSuite/LAL" is passed to Job2, the label=sl6 part is dropped. Cheers Adam -- 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/d/optout.
RE: Passing environment variables using the parameterized trigger plugin
Hi, Are you using a recent version of Jenkins and the parameterized plugin? I suspect the problem is that you are defining $PREFIX locally on the machine, and then trying to reference it via a Jenkins job configuration. When I’ve encountered that situation I’ve worked around it by writing the value to a .properties file and then passing that file to the downstream job (using the ‘Parameters from a properties file’) option. As for the other environment variables, passing $JOB_NAME and $BUILD_NUMBER work just fine for me. Upstream job (entitled “zTest Parameters”) configuration: [cid:image003.png@01CFF915.BEF7BD10] Downstream job’s /parameters page: [cid:image004.png@01CFF915.BEF7BD10] Terry -Original Message- From: jenkinsci-users@googlegroups.com [mailto:jenkinsci-users@googlegroups.com] On Behalf Of Adam Mercer Sent: Wednesday, November 05, 2014 4:14 PM To: jenkinsci-users@googlegroups.com Subject: Passing environment variables using the parameterized trigger plugin Hi According to the documentation for the Parameterized Trigger plugin, specifically for 'Predefined parameters": """ KEY=value pairs, one per line (Java properties file format). Backslashes are used for escaping, so use "\\" for a single backslash. Current build parameters and/or environment variables can be used in form: ${PARAM} or $PARAM """ I'm trying to use this to pass the contents of an environment variable to the next job in line, but it is not passed. In Job1 is essentially the execution of the following script: #!/bin/bash # display job parameters echo "JOB_NAME = $JOB_NAME" echo "BUILD_NUMBER = $BUILD_NUMBER" export PREFIX=/build/$JOB_NAME/$BUILD_NUMBER/lal echo "Installing in $PREFIX" And in the "Predetermined parameters" section I have: LAL_JOB_NAME=$JOB_NAME LAL_BUILD_NUMBER=$BUILD_NUMBER LAL_PREFIX=$PREFIX When Job1 completes successfully and outputs: JOB_NAME = LALSuite/LAL/label=sl6 BUILD_NUMBER = 6 Installing in /build/LALSuite/LAL/label=sl6/6/lal Finished: SUCCESS It then triggers Job2 which is essentially the following script: #!/bin/bash # show parameters echo "LAL_JOB_NAME = $LAL_JOB_NAME" echo "LAL_BUILD_NUMBER = $LAL_BUILD_NUMBER" echo "LAL_PREFIX = $LAL_PREFIX" When executed Job2 displays: LAL_JOB_NAME = LALSuite/LAL LAL_BUILD_NUMBER = 6 LAL_PREFIX = ${PREFIX} So the contents of JOB_NAME isn't being passed correctly the value of the PREFIX environment variable is being completely ignored. How can I pass the contents of an environment variable to another job using the parameterized trigger plugin? Or is there another plugin that would be better in this situation? Cheers Adam -- 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<mailto:jenkinsci-users+unsubscr...@googlegroups.com>. For more options, visit https://groups.google.com/d/optout. -- 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/d/optout.
Passing environment variables using the parameterized trigger plugin
Hi According to the documentation for the Parameterized Trigger plugin, specifically for 'Predefined parameters": """ KEY=value pairs, one per line (Java properties file format). Backslashes are used for escaping, so use "\\" for a single backslash. Current build parameters and/or environment variables can be used in form: ${PARAM} or $PARAM """ I'm trying to use this to pass the contents of an environment variable to the next job in line, but it is not passed. In Job1 is essentially the execution of the following script: #!/bin/bash # display job parameters echo "JOB_NAME = $JOB_NAME" echo "BUILD_NUMBER = $BUILD_NUMBER" export PREFIX=/build/$JOB_NAME/$BUILD_NUMBER/lal echo "Installing in $PREFIX" And in the "Predetermined parameters" section I have: LAL_JOB_NAME=$JOB_NAME LAL_BUILD_NUMBER=$BUILD_NUMBER LAL_PREFIX=$PREFIX When Job1 completes successfully and outputs: JOB_NAME = LALSuite/LAL/label=sl6 BUILD_NUMBER = 6 Installing in /build/LALSuite/LAL/label=sl6/6/lal Finished: SUCCESS It then triggers Job2 which is essentially the following script: #!/bin/bash # show parameters echo "LAL_JOB_NAME = $LAL_JOB_NAME" echo "LAL_BUILD_NUMBER = $LAL_BUILD_NUMBER" echo "LAL_PREFIX = $LAL_PREFIX" When executed Job2 displays: LAL_JOB_NAME = LALSuite/LAL LAL_BUILD_NUMBER = 6 LAL_PREFIX = ${PREFIX} So the contents of JOB_NAME isn't being passed correctly the value of the PREFIX environment variable is being completely ignored. How can I pass the contents of an environment variable to another job using the parameterized trigger plugin? Or is there another plugin that would be better in this situation? Cheers Adam -- 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/d/optout.