aboutsummaryrefslogtreecommitdiffstats
path: root/src/jenkins.rs
diff options
context:
space:
mode:
authorTeddy Wing2017-11-17 01:33:26 +0100
committerTeddy Wing2017-11-17 01:33:26 +0100
commitad9537963fe3eb6589ecdec0c6f9f001a483f5e2 (patch)
tree89d575f44d3e9d6d09a8409296d5c0f44ca98a3b /src/jenkins.rs
parent6a2f2232cb3bd26e512c1383a581544bc0aef731 (diff)
downloadkipper-ad9537963fe3eb6589ecdec0c6f9f001a483f5e2.tar.bz2
find_and_track_build_and_update_status(): Send Jenkins console URL
When adding a GitHub commit status, instead of using the job "home" URL, use the URL of its "Console" page. This page shows the build log and is much more useful than the other one. If there's a build failure in particular, you'd be going to this page anyway to see what the problem was, so using this `target_url` saves a click.
Diffstat (limited to 'src/jenkins.rs')
-rw-r--r--src/jenkins.rs8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/jenkins.rs b/src/jenkins.rs
index 67e6c20..72d375e 100644
--- a/src/jenkins.rs
+++ b/src/jenkins.rs
@@ -127,11 +127,13 @@ pub fn find_and_track_build_and_update_status(
let commit_status = job.result.commit_status();
+ let job_console_url = jenkins_console_url_path(&job_url);
+
github::update_commit_status(
&github_token,
&commit_ref,
&commit_status,
- job_url.clone(),
+ job_console_url.clone(),
None,
"continuous-integration/jenkins".to_owned()
).expect(
@@ -161,7 +163,7 @@ pub fn find_and_track_build_and_update_status(
&github_token,
&commit_ref,
&github::CommitStatus::Error,
- job_url.clone(),
+ job_console_url.clone(),
Some("The status checker timed out.".to_owned()),
"continuous-integration/jenkins".to_owned()
).expect(
@@ -191,7 +193,7 @@ pub fn find_and_track_build_and_update_status(
&github_token,
&commit_ref,
&updated_job.result.commit_status(),
- job_url.clone(),
+ job_console_url.clone(),
None,
"continuous-integration/jenkins".to_owned()
).expect(