Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specific Build: Get latest successful buildID #6753

Closed
wants to merge 4 commits into from
Closed

Specific Build: Get latest successful buildID #6753

wants to merge 4 commits into from

Conversation

fruby
Copy link
Contributor

@fruby fruby commented Mar 21, 2018

If the user selects to download a specific build allow them to use the word latest to get the latest buildID

buildId = parseInt(tl.getInput("buildId", true));
var buildIdInput: string = tl.getInput("buildId", true);
if (buildIdInput.toUpperCase() == "LATEST") {
var buildIds = await executeWithRetries("getBuilds", () => buildApi.getBuilds(projectId, [parseInt(definitionId)], undefined, undefined, undefined, undefined, undefined, undefined, undefined, BuildResult.Succeeded, undefined, undefined, 1, undefined, 1), 4).catch((reason) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If there is a way to avoid all the undefined let me know

@GitHubSriramB
Copy link
Contributor

@fruby - there is now support in the task to specify latest build as a first class option.

Pl. refer to this PR for more details:
#6356

Don't see a need to support "Latest" value for build.

@fruby fruby closed this Mar 26, 2018
@fruby fruby deleted the fruby-LatestBuild branch March 26, 2018 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants