How to not "fire and forget" when doing a remote trigger of a Jenkins build? I am attempting to trigger a parameterized Jenkins build from Bamboo, doing the below:


  POST - 
  http://jenkins-url.com/job/jobname/buildWithParameters?ENVIRONMENT=dev&amp;APPLICATION=hello-world


But I will get a 201 instantly which tells me that the build was created. How do I make this request wait and return the success status of the build instead of the fire and forget? 

It is apparently possible as per Parameterized-Remote-Trigger-Plugin:



Edit:
created this in the end if you need it.
https://github.com/owenmorgan/jenkins-remote-builder
I've created the jenkins-remote-builder script which will follow your remote build to completion.
Some more details about it (from its README.md):

Example
jenkins=https://user:pass@jenkins.mydomain.com:8080
jenkins_job=MyApp-Deploy

environment=dev
application=myapp
revision=9fd71f63b351b8208264daf86d292ced580a2f60

./jenkins_remote_trigger.sh \
            -h ${jenkins} \
            -j ${jenkins_job} \
            -p &quot;ENVIRONMENT=${environment}&amp;APPLICATION=${application}&amp;REVISION=${revision}&quot;

Usage:
-h HOST     | --host=HOST                       Jenkins host
-j JOBNAME  | --jobname=test-build-job          The name of the jenkins job to trigger
-p JOBPARAM | --jobparam=environment=uat&amp;test=1 Jenkins job paramiters
-q          | --quiet                           Don't output any status messages