Hello Guys,
Could someone help me with this? i started getting this error in pipe.py when i call a jenkins job from bitbucket using pipe in BB.yml
- step: &functionalTest
name: functional test
image: python:3.9
script:
- pipe: atlassian/jenkins-job-trigger:0.1.1
variables:
JENKINS_URL: 'myJenkinsURL
JENKINS_USER: 'myUser'
JENKINS_TOKEN: $JENKINS_USER_TOKEN
JOB_NAME: 'job/myJenkinsjob/job/main'
WAIT: 'true'
WAIT_MAX_TIMEOUT: 360
Error:
<span>INFO: Jenkins job job/online-mymorrisons-automation/job/main is PENDING. Wait for build to be started...</span>
<span>Traceback (most recent call last):</span>
<span>File "/pipe.py", line 145, in <module></span>
<span>pipe.run()</span>
<span>File "/pipe.py", line 136, in run</span>
<span>self.wait_for_job(build_response.headers['Location'])</span>
<span>File "/pipe.py", line 73, in wait_for_job</span>
<span>build_number = executable.get('number')</span>
<span>AttributeError: 'NoneType' object has no attribute 'get'</span>
Seems the job was triggered in Jenkins; however, BB is not waiting for the Job result back instead it failed the stage whilst the test is still running in Jenkins server.