From c43897e88f612638df587d20e00fd01fa04bb04f Mon Sep 17 00:00:00 2001 From: Jason Prickett Date: Tue, 13 Jun 2017 14:20:35 -0400 Subject: [PATCH] Fixing bug where JenkinsQueueJob task waits even when the capture console checkbox is not checked Bug #1017420 --- Tasks/JenkinsQueueJob/job.ts | 6 ++++++ Tasks/JenkinsQueueJob/task.json | 2 +- Tasks/JenkinsQueueJob/task.loc.json | 2 +- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Tasks/JenkinsQueueJob/job.ts b/Tasks/JenkinsQueueJob/job.ts index 78e7fa1aefaf..adc458dff1a6 100644 --- a/Tasks/JenkinsQueueJob/job.ts +++ b/Tasks/JenkinsQueueJob/job.ts @@ -167,6 +167,12 @@ export class Job { } setStreaming(executableNumber: number): void { + // If we aren't waiting for the job to finish then we should end it now + if (!this.queue.taskOptions.captureConsole) { // transition to Finishing + this.changeState(JobState.Streaming); + this.changeState(JobState.Finishing); + return; + } if (this.state == JobState.New || this.state == JobState.Locating) { this.executableNumber = executableNumber; this.executableUrl = Util.addUrlSegment(this.taskUrl, this.executableNumber.toString()); diff --git a/Tasks/JenkinsQueueJob/task.json b/Tasks/JenkinsQueueJob/task.json index df5d4d469f7e..f73004a25a7a 100644 --- a/Tasks/JenkinsQueueJob/task.json +++ b/Tasks/JenkinsQueueJob/task.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 119, - "Patch": 0 + "Patch": 2 }, "groups": [ { diff --git a/Tasks/JenkinsQueueJob/task.loc.json b/Tasks/JenkinsQueueJob/task.loc.json index 2c339339e6d3..d39a1025b511 100644 --- a/Tasks/JenkinsQueueJob/task.loc.json +++ b/Tasks/JenkinsQueueJob/task.loc.json @@ -14,7 +14,7 @@ "version": { "Major": 1, "Minor": 119, - "Patch": 0 + "Patch": 2 }, "groups": [ {