Re: Jenkins talking to another Jenkins instance
Has anyone seen an issue where when you go to add the post-build action in your job the option for "trigger a remote parameterized job" is not in the list even though the plugin is installed? On Monday, July 14, 2014 1:01:06 PM UTC-4, pcampbell wrote: > > That looks like it would do the job. Our jobs predate this plugin so we > had to use what was available at the time. > > From the number of installations for this plugin, it seems that we are not > alone in needing this capability... ;-) > > > On Mon, Jul 14, 2014 at 9:49 AM, Jeff > > wrote: > >> Have you tried >> https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin >> >> to trigger the remote job? >> >> I haven't used it yet so it may not work for your needs, but it is >> configured as a build step so I believe it blocks until the step completes >> which would allow you to wait before proceeding to the next step/job for >> testing. >> >> >> >> >> On Mon, Jul 14, 2014 at 10:36 AM, Phillip Campbell > > wrote: >> >>> Just to clarify, by "Status" in this case, I am checking to see when the >>> remote job has completed, not the actual end result of the job >>> (success/failure/unstable). >>> >>> >>> On Mon, Jul 14, 2014 at 9:30 AM, Seth Floyd >> > wrote: >>> Awesome! Thanks. Ill try that out and see how that works. On Mon, Jul 14, 2014 at 12:28 PM, Phillip Campbell < phillip@gmail.com > wrote: > This is something that we need to do as well. We have Jenkins > instances distributed globally and in one case, we need to trigger jobs > remotely on other Jenkins instances. > > What we do is have the remote job trigger set to "Trigger builds > remotely" with a specific authentication token. On the local machine, we > execute a "curl" command to the remote job's URL, passing the > authentication token and an additional parameter. > > # Start the build > curl $JOB_URL/buildWithParameters?token=AUTH_TOKEN\&myParm=abcd > if [ ! "$?" = "0" ]; then > exit 1 > fi > > We then use curl with json to poll the remote job for status. If you > only care about triggering the job and not the status, you can skip this > part. > > # Poll every sixty seconds until the build is finished > JOB_STATUS_URL=${JOB_URL}/lastBuild/api/json > while [ $GREP_RETURN_CODE -eq 0 ] > do > sleep 60 > # Grep will return 0 while the build is running: > curl --silent $JOB_STATUS_URL | grep result\":null > /dev/null > GREP_RETURN_CODE=$? > done > > > > On Mon, Jul 14, 2014 at 7:25 AM, Seth Floyd > wrote: > >> I currently have 2 Jenkins instances. One does our deployments and >> the other does automated testing. Is there a way to send a notice from >> Jenkins1 to Jenkins2 once a build has completed successfully to >> automatically kick off automated testing jobs? >> (Before im berated with questions about why we are setup this way...I >> didn't do it, im just fixing and working with what I was brought in to >> deal >> with) >> >> Thanks. >> >> -- >> 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-use...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > -- > You received this message because you are subscribed to a topic in the > Google Groups "Jenkins Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-users/bIcTx9yZhZY/unsubscribe > . > To unsubscribe from this group and all its topics, send an email to > jenkinsci-use...@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-use...@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-use...@googlegroups.com . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Jeff Vincent >> See my LinkedIn profile at: >> http://www.linkedin.com/in/rjeffreyvincent >> >> -- >> 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-use...@googlegroups.com . >> For more options, v
Re: Jenkins talking to another Jenkins instance
That looks like it would do the job. Our jobs predate this plugin so we had to use what was available at the time. >From the number of installations for this plugin, it seems that we are not alone in needing this capability... ;-) On Mon, Jul 14, 2014 at 9:49 AM, Jeff wrote: > Have you tried > https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin > to trigger the remote job? > > I haven't used it yet so it may not work for your needs, but it is > configured as a build step so I believe it blocks until the step completes > which would allow you to wait before proceeding to the next step/job for > testing. > > > > > On Mon, Jul 14, 2014 at 10:36 AM, Phillip Campbell < > phillip.campb...@gmail.com> wrote: > >> Just to clarify, by "Status" in this case, I am checking to see when the >> remote job has completed, not the actual end result of the job >> (success/failure/unstable). >> >> >> On Mon, Jul 14, 2014 at 9:30 AM, Seth Floyd wrote: >> >>> Awesome! Thanks. Ill try that out and see how that works. >>> >>> >>> On Mon, Jul 14, 2014 at 12:28 PM, Phillip Campbell < >>> phillip.campb...@gmail.com> wrote: >>> This is something that we need to do as well. We have Jenkins instances distributed globally and in one case, we need to trigger jobs remotely on other Jenkins instances. What we do is have the remote job trigger set to "Trigger builds remotely" with a specific authentication token. On the local machine, we execute a "curl" command to the remote job's URL, passing the authentication token and an additional parameter. # Start the build curl $JOB_URL/buildWithParameters?token=AUTH_TOKEN\&myParm=abcd if [ ! "$?" = "0" ]; then exit 1 fi We then use curl with json to poll the remote job for status. If you only care about triggering the job and not the status, you can skip this part. # Poll every sixty seconds until the build is finished JOB_STATUS_URL=${JOB_URL}/lastBuild/api/json while [ $GREP_RETURN_CODE -eq 0 ] do sleep 60 # Grep will return 0 while the build is running: curl --silent $JOB_STATUS_URL | grep result\":null > /dev/null GREP_RETURN_CODE=$? done On Mon, Jul 14, 2014 at 7:25 AM, Seth Floyd wrote: > I currently have 2 Jenkins instances. One does our deployments and the > other does automated testing. Is there a way to send a notice from > Jenkins1 > to Jenkins2 once a build has completed successfully to automatically kick > off automated testing jobs? > (Before im berated with questions about why we are setup this way...I > didn't do it, im just fixing and working with what I was brought in to > deal > with) > > Thanks. > > -- > 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 a topic in the Google Groups "Jenkins Users" group. To unsubscribe from this topic, visit https://groups.google.com/d/topic/jenkinsci-users/bIcTx9yZhZY/unsubscribe . To unsubscribe from this group and all its topics, 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. >>> >> >> -- >> 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. >> > > > > -- > Jeff Vincent > See my LinkedIn profile at: > http://www.linkedin.com/in/rjeffreyvincent > > -- > 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: Jenkins talking to another Jenkins instance
Have you tried https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin to trigger the remote job? I haven't used it yet so it may not work for your needs, but it is configured as a build step so I believe it blocks until the step completes which would allow you to wait before proceeding to the next step/job for testing. On Mon, Jul 14, 2014 at 10:36 AM, Phillip Campbell < phillip.campb...@gmail.com> wrote: > Just to clarify, by "Status" in this case, I am checking to see when the > remote job has completed, not the actual end result of the job > (success/failure/unstable). > > > On Mon, Jul 14, 2014 at 9:30 AM, Seth Floyd wrote: > >> Awesome! Thanks. Ill try that out and see how that works. >> >> >> On Mon, Jul 14, 2014 at 12:28 PM, Phillip Campbell < >> phillip.campb...@gmail.com> wrote: >> >>> This is something that we need to do as well. We have Jenkins instances >>> distributed globally and in one case, we need to trigger jobs remotely on >>> other Jenkins instances. >>> >>> What we do is have the remote job trigger set to "Trigger builds >>> remotely" with a specific authentication token. On the local machine, we >>> execute a "curl" command to the remote job's URL, passing the >>> authentication token and an additional parameter. >>> >>> # Start the build >>> curl $JOB_URL/buildWithParameters?token=AUTH_TOKEN\&myParm=abcd >>> if [ ! "$?" = "0" ]; then >>> exit 1 >>> fi >>> >>> We then use curl with json to poll the remote job for status. If you >>> only care about triggering the job and not the status, you can skip this >>> part. >>> >>> # Poll every sixty seconds until the build is finished >>> JOB_STATUS_URL=${JOB_URL}/lastBuild/api/json >>> while [ $GREP_RETURN_CODE -eq 0 ] >>> do >>> sleep 60 >>> # Grep will return 0 while the build is running: >>> curl --silent $JOB_STATUS_URL | grep result\":null > /dev/null >>> GREP_RETURN_CODE=$? >>> done >>> >>> >>> >>> On Mon, Jul 14, 2014 at 7:25 AM, Seth Floyd >>> wrote: >>> I currently have 2 Jenkins instances. One does our deployments and the other does automated testing. Is there a way to send a notice from Jenkins1 to Jenkins2 once a build has completed successfully to automatically kick off automated testing jobs? (Before im berated with questions about why we are setup this way...I didn't do it, im just fixing and working with what I was brought in to deal with) Thanks. -- 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 a topic in the >>> Google Groups "Jenkins Users" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/jenkinsci-users/bIcTx9yZhZY/unsubscribe >>> . >>> To unsubscribe from this group and all its topics, 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. >> > > -- > 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. > -- Jeff Vincent See my LinkedIn profile at: http://www.linkedin.com/in/rjeffreyvincent -- 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: Jenkins talking to another Jenkins instance
Just to clarify, by "Status" in this case, I am checking to see when the remote job has completed, not the actual end result of the job (success/failure/unstable). On Mon, Jul 14, 2014 at 9:30 AM, Seth Floyd wrote: > Awesome! Thanks. Ill try that out and see how that works. > > > On Mon, Jul 14, 2014 at 12:28 PM, Phillip Campbell < > phillip.campb...@gmail.com> wrote: > >> This is something that we need to do as well. We have Jenkins instances >> distributed globally and in one case, we need to trigger jobs remotely on >> other Jenkins instances. >> >> What we do is have the remote job trigger set to "Trigger builds >> remotely" with a specific authentication token. On the local machine, we >> execute a "curl" command to the remote job's URL, passing the >> authentication token and an additional parameter. >> >> # Start the build >> curl $JOB_URL/buildWithParameters?token=AUTH_TOKEN\&myParm=abcd >> if [ ! "$?" = "0" ]; then >> exit 1 >> fi >> >> We then use curl with json to poll the remote job for status. If you >> only care about triggering the job and not the status, you can skip this >> part. >> >> # Poll every sixty seconds until the build is finished >> JOB_STATUS_URL=${JOB_URL}/lastBuild/api/json >> while [ $GREP_RETURN_CODE -eq 0 ] >> do >> sleep 60 >> # Grep will return 0 while the build is running: >> curl --silent $JOB_STATUS_URL | grep result\":null > /dev/null >> GREP_RETURN_CODE=$? >> done >> >> >> >> On Mon, Jul 14, 2014 at 7:25 AM, Seth Floyd >> wrote: >> >>> I currently have 2 Jenkins instances. One does our deployments and the >>> other does automated testing. Is there a way to send a notice from Jenkins1 >>> to Jenkins2 once a build has completed successfully to automatically kick >>> off automated testing jobs? >>> (Before im berated with questions about why we are setup this way...I >>> didn't do it, im just fixing and working with what I was brought in to deal >>> with) >>> >>> Thanks. >>> >>> -- >>> 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 a topic in the >> Google Groups "Jenkins Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/jenkinsci-users/bIcTx9yZhZY/unsubscribe >> . >> To unsubscribe from this group and all its topics, 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. > -- 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: Jenkins talking to another Jenkins instance
Awesome! Thanks. Ill try that out and see how that works. On Mon, Jul 14, 2014 at 12:28 PM, Phillip Campbell < phillip.campb...@gmail.com> wrote: > This is something that we need to do as well. We have Jenkins instances > distributed globally and in one case, we need to trigger jobs remotely on > other Jenkins instances. > > What we do is have the remote job trigger set to "Trigger builds remotely" > with a specific authentication token. On the local machine, we execute a > "curl" command to the remote job's URL, passing the authentication token > and an additional parameter. > > # Start the build > curl $JOB_URL/buildWithParameters?token=AUTH_TOKEN\&myParm=abcd > if [ ! "$?" = "0" ]; then > exit 1 > fi > > We then use curl with json to poll the remote job for status. If you only > care about triggering the job and not the status, you can skip this part. > > # Poll every sixty seconds until the build is finished > JOB_STATUS_URL=${JOB_URL}/lastBuild/api/json > while [ $GREP_RETURN_CODE -eq 0 ] > do > sleep 60 > # Grep will return 0 while the build is running: > curl --silent $JOB_STATUS_URL | grep result\":null > /dev/null > GREP_RETURN_CODE=$? > done > > > > On Mon, Jul 14, 2014 at 7:25 AM, Seth Floyd wrote: > >> I currently have 2 Jenkins instances. One does our deployments and the >> other does automated testing. Is there a way to send a notice from Jenkins1 >> to Jenkins2 once a build has completed successfully to automatically kick >> off automated testing jobs? >> (Before im berated with questions about why we are setup this way...I >> didn't do it, im just fixing and working with what I was brought in to deal >> with) >> >> Thanks. >> >> -- >> 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 a topic in the > Google Groups "Jenkins Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/jenkinsci-users/bIcTx9yZhZY/unsubscribe. > To unsubscribe from this group and all its topics, 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: Jenkins talking to another Jenkins instance
This is something that we need to do as well. We have Jenkins instances distributed globally and in one case, we need to trigger jobs remotely on other Jenkins instances. What we do is have the remote job trigger set to "Trigger builds remotely" with a specific authentication token. On the local machine, we execute a "curl" command to the remote job's URL, passing the authentication token and an additional parameter. # Start the build curl $JOB_URL/buildWithParameters?token=AUTH_TOKEN\&myParm=abcd if [ ! "$?" = "0" ]; then exit 1 fi We then use curl with json to poll the remote job for status. If you only care about triggering the job and not the status, you can skip this part. # Poll every sixty seconds until the build is finished JOB_STATUS_URL=${JOB_URL}/lastBuild/api/json while [ $GREP_RETURN_CODE -eq 0 ] do sleep 60 # Grep will return 0 while the build is running: curl --silent $JOB_STATUS_URL | grep result\":null > /dev/null GREP_RETURN_CODE=$? done On Mon, Jul 14, 2014 at 7:25 AM, Seth Floyd wrote: > I currently have 2 Jenkins instances. One does our deployments and the > other does automated testing. Is there a way to send a notice from Jenkins1 > to Jenkins2 once a build has completed successfully to automatically kick > off automated testing jobs? > (Before im berated with questions about why we are setup this way...I > didn't do it, im just fixing and working with what I was brought in to deal > with) > > Thanks. > > -- > 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.