forked from the-distro/ofborg
Begin improving the target branch failure output, re #25
This commit is contained in:
parent
7ca5463991
commit
60bbed5901
|
@ -49,16 +49,16 @@ impl OutPathDiff {
|
|||
return result;
|
||||
}
|
||||
|
||||
pub fn find_before(&mut self) -> bool {
|
||||
pub fn find_before(&mut self) -> Result<bool, File> {
|
||||
let x = self.run();
|
||||
match x {
|
||||
Ok(f) => {
|
||||
self.original = Some(self.parse(f));
|
||||
return true;
|
||||
return Ok(true);
|
||||
}
|
||||
Err(_) => {
|
||||
Err(e) => {
|
||||
info!("Failed to find Before list");
|
||||
return false;
|
||||
return Err(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,11 +126,19 @@ impl worker::SimpleWorker for MassRebuildWorker {
|
|||
hubcaps::statuses::State::Pending
|
||||
);
|
||||
|
||||
if !rebuildsniff.find_before() {
|
||||
if let Err(mut output) = rebuildsniff.find_before() {
|
||||
overall_status.set_url(make_gist(
|
||||
&gists,
|
||||
"Output path comparison".to_owned(),
|
||||
Some("".to_owned()),
|
||||
file_to_str(&mut output),
|
||||
));
|
||||
|
||||
overall_status.set_with_description(
|
||||
format!("Failed to enumerate outputs of {}", &target_branch).as_ref(),
|
||||
format!("Target branch {} doesn't evaluate!", &target_branch).as_ref(),
|
||||
hubcaps::statuses::State::Failure
|
||||
);
|
||||
|
||||
return self.actions().skip(&job);
|
||||
}
|
||||
|
||||
|
@ -293,7 +301,6 @@ impl worker::SimpleWorker for MassRebuildWorker {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
status.set_url(gist_url);
|
||||
status.set(state.clone());
|
||||
|
||||
|
|
Loading…
Reference in a new issue