Skip to content

Scripts for building and testing PowerShell repository code on Linux on VSTS. - #6953

Closed
Klaudia Algiz (kalgiz) wants to merge 8 commits into
PowerShell:masterfrom
kalgiz:linux-builds-on-vsts
Closed

Klaudia Algiz (kalgiz) wants to merge 8 commits into
PowerShell:masterfrom
kalgiz:linux-builds-on-vsts

Conversation

@kalgiz

@kalgiz Klaudia Algiz (kalgiz) commented May 28, 2018 •

Copy link
Copy Markdown
Contributor

PR Summary

Scripts for building and testing PowerShell repository code on Linux on VSTS.

PR Checklist


This change is Reviewable

@bergmeister

Christoph Bergmeister (bergmeister) commented May 30, 2018 •

Copy link
Copy Markdown
Contributor

Klaudia Algiz (@kalgiz) Is this YAML file for the Hosted Linux agent in VSTS or do you use your own agents? A comment in the yaml about the targeted platforms/agents would be good. Is this only for internal usage or will there be VSTS PR integration apart from the daily build?

Comment thread tools/linux_vsts.ps1 Outdated
$repoRoot = Join-Path $PSScriptRoot '..'
Import-Module (Join-Path $repoRoot 'build.psm1') -Scope Global
$isPR = $env:BUILD_REASON -eq "PullRequest"
$commitMessage = git log --format=%B -n 1 $env:BUILD_SOURCEVERSION

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

$env:BUILD_SOURCEVERSIONMESSAGE would be an easier way of retrieving the commit message.

Comment thread tools/linux_vsts.ps1
# more info: https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/put-blob
$sb = [text.stringbuilder]::new()
# can't use AppendLine because the `r`n causes the command to fail, it must be `n and only `n
$null = $sb.Append("$method`n")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[System.Environment]::NewLine might be better than n. But if stringbuilder uses r`n on Linux, this sounds more like a bug in .Net Core (or maybe I misunderstood its usage)

Comment thread tools/linux_vsts.ps1 Outdated
# If there are failures, Test-XUnitTestResults throws
$SequentialXUnitTestResultsFile, $ParallelXUnitTestResultsFile | ForEach-Object { Test-XUnitTestResults -TestResultsFile $_ }
}
catch {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why the empty catch block? If it is needed, therere should be a comment or the exception being logged.

@TravisEz13

Copy link
Copy Markdown
Member

We plan to use the hosted agents

@stale

stale Bot commented Jul 12, 2018

Copy link
Copy Markdown

This PR has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed if no further activity occurs within 10 days.
Thank you for your contributions.
Community members are welcome to grab these works.

@rjmholt

Copy link
Copy Markdown
Collaborator

Travis Plunk (@TravisEz13) any way I can salvage this PR?

@TravisEz13

Copy link
Copy Markdown
Member

Rob Holt (@rjmholt) I don't think this can be salvaged at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants