Skip to content

Commit

Permalink
Fixed to check number key from jenkins response (apache#16963)
Browse files Browse the repository at this point in the history
Co-authored-by: 남상준/데이터솔루션팀 <sangjun.nam@musinsa.com>
  • Loading branch information
namjals and namjals committed Jul 13, 2021
1 parent 2cba553 commit 9ff781a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion airflow/providers/jenkins/operators/jenkins_job_trigger.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def poll_job_in_queue(self, location: str, jenkins_server: Jenkins) -> int:
)
if location_answer is not None:
json_response = json.loads(location_answer['body'])
if 'executable' in json_response:
if 'executable' in json_response and 'number' in json_response['executable']:
build_number = json_response['executable']['number']
self.log.info('Job executed on Jenkins side with the build number %s', build_number)
return build_number
Expand Down

0 comments on commit 9ff781a

Please sign in to comment.