SUSE-Cloud / automation

Automation scripts for development, testing, and CI
Apache License 2.0
69 stars 139 forks source link

jenkins/jenkins-job-trigger HTTP failure should not be silent #2681

Open JanZerebecki opened 6 years ago

JanZerebecki commented 6 years ago

After looking at https://github.com/SUSE-Cloud/automation/pull/2679 it seems to me from the logs that when https://github.com/SUSE-Cloud/automation/blob/acc5e2aec4cf458bff9ff1a9ce8ea54fe8cf040a/scripts/jenkins/jenkins-job-trigger#L63 fails to create a job when the HTTPS certificate is expired it doesn't print any output. But it should. Also I'm unsure whether it correctly sets a failure exit return value.

The request is made around here: https://github.com/openstack/python-jenkins/blob/1.2.1/jenkins/__init__.py#L543 I would expect an SSLError exception or something to be printed.

JanZerebecki commented 6 years ago

The same happens when running many jenkins-job-trigger after another, at some point Jenkins doesn't register the jobs and again this failure is silent.

ConsoleCatzirl commented 6 years ago

I haven't tested it, but I think that https://review.openstack.org/599868 may do the trick.