Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Pipe.py jenkins trigger from Bitbucket

Sarath Nagarajan February 22, 2022

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:

INFO: Jenkins job job/online-mymorrisons-automation/job/main is PENDING. Wait for build to be started...
Traceback (most recent call last):
File "/pipe.py", line 145, in <module>
pipe.run()
File "/pipe.py", line 136, in run
self.wait_for_job(build_response.headers['Location'])
File "/pipe.py", line 73, in wait_for_job
build_number = executable.get('number')
AttributeError: 'NoneType' object has no attribute 'get'
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.

 

1 answer

0 votes
Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 23, 2022

Hi, @Sarath Nagarajan, thank you for reaching out to Atlassian Community.

Could you please add Debug: "true" in the Pipe configuration and share the output with us? This will help us to get more logs that can help us to investigate the issue further.

Please feel free to share any additional information regarding this case.

Kind regards, 
Caroline 

Sarath Nagarajan February 24, 2022

Hello Caroline R

the issue got somehow fixed on its own. After multiple attempts of running the pipeline from BB. 

Thanks for your response. 

Caroline R
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 24, 2022

Hi, @Sarath Nagarajan

Thanks for the update! I'm glad to know everything is working now. Please let us know in case you face this problem again. 

Kind regards, 
Caroline 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events