@@ -55,6 +55,7 @@ token = "33333333333333333333333333333333"
job = "linux-build-manual"
remote = "GIT_REPO_TO_USE"
branch = "GIT_REF_TO_BUILD"
+ artifact = "snowpatch.txt"
USER_EMAIL = "username"
DEFCONFIG_TO_USE = "pseries_le_defconfig"
@@ -62,5 +63,6 @@ token = "33333333333333333333333333333333"
job = "linux-build-manual"
remote = "GIT_REPO_TO_USE"
branch = "GIT_REF_TO_BUILD"
+ artifact = "snowpatch.txt"
USER_EMAIL = "username"
DEFCONFIG_TO_USE = "ppc64le_defconfig"
@@ -28,6 +28,7 @@ use std::io::Read;
use std::time::Duration;
use std::thread::sleep;
use std::sync::Arc;
+use std::collections::BTreeMap;
use hyper::Client;
use hyper::client::{IntoUrl, RequestBuilder};
@@ -154,6 +155,13 @@ impl JenkinsBackend {
}
}
+ pub fn get_results_url(&self, build_url: &str, job: &BTreeMap<String, String>) -> String {
+ match job.get("artifact") {
+ Some(artifact) => format!("{}/artifact/{}", build_url, artifact),
+ None => format!("{}/consoleText/", build_url)
+ }
+ }
+
pub fn wait_build(&self, build_url: &str) -> JenkinsBuildStatus {
// TODO: Implement a timeout?
while self.get_build_status(build_url) != JenkinsBuildStatus::Done {
@@ -136,7 +136,7 @@ fn run_tests(settings: &Config, client: Arc<Client>, project: &Project, tag: &st
results.push(TestResult {
test_name: format!("{}/{}", branch_name.to_string(), job_name.to_string()),
state: test_result,
- url: None, // TODO: link to Jenkins job log
+ url: Some(jenkins.get_results_url(&build_url_real, job_params)),
summary: Some("TODO: get this summary from Jenkins".to_string()),
});
}