I am trying to use jenkins-job-trigger to trigger the scan Multibranch. It does work without the wait, but If I add a wait I get the error below. From my manual debugging it seems the error occurs because the POST request on the build endpoint gets redirected, which looses the location header.
It works fine for jobs inside the multibranch project.
I would like to wait for the scan to complete before I continue my pipeline. I have worked around it using some manual curl commands.
This is my usage of the pipe:
Digest: sha256:9a4c0aa1133e6a3058e2dce29b92a640ba3348f908edd9f22f12549e3325ef8dStatus: Downloaded newer image for bitbucketpipelines/jenkins-job-trigger:0.10.0DEBUG: Starting new HTTPS connection (1): bitbucket.org:443DEBUG: https://bitbucket.org:443 "GET /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json HTTP/11" 200 NoneINFO: NoneINFO: Submitting jenkins job...DEBUG: Starting new HTTPS connection (1): <my jenkins url>DEBUG: https://<my jenkins url> "POST /job/bitbucket_poc_kto/build HTTP/11" 302 0DEBUG: https://<my jenkins url> "GET /job/bitbucket_poc_kto/ HTTP/11" 200 NoneTraceback (most recent call last):File "/pipe.py", line 200, in <module>pipe.run()File "/pipe.py", line 191, in runself.wait_for_job(build_response.headers['Location'])File "/usr/local/lib/python3.10/site-packages/requests/structures.py", line 52, in __getitem__return self._store[key.lower()][1]keyError: 'location'