X Tutup
The Wayback Machine - https://web.archive.org/web/20201219230921/https://github.com/PowerShell/PowerShell/pull/7536
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

Add VSTS CI for Windows #7536

Merged
merged 18 commits into from Aug 18, 2018
Merged

Add VSTS CI for Windows #7536

merged 18 commits into from Aug 18, 2018

Conversation

@TravisEz13
Copy link
Member

@TravisEz13 TravisEz13 commented Aug 16, 2018

PR Summary

  • Add VSTS CI for Windows
    • Disable Access-denied test for Get-Item C:\windows\appcompat\Programs\Install -ErrorAction Stop, because the path does not always exist
    • Disable Should give .sys file if the fullpath is specified with hidden and force parameter, because pagefile.sys doesn't always exist and other files don't meet test's requirement.
    • Disable some Test-Connection tests for same reasons they failed on VSTS Linux
    • Disable Test-FileCatalog should pass when catalog is in the same folder as files being tested, because the CmdLet does not work in that scenario
      • Also, give details needed to investigate when test fails
      • #7556
    • Update appveyor.psm1 to work with VSTS
    • Update HelpersRemoting.psm1 New-RemoteSession to work for CimSession (discovered an issue during the investigation)
    • Update Test wildcard with drive relative directory path to work when there are multiple drives
      • Disable on non-windows machines since the test is assuming drive letters
    • Update New-CimSession Tests to requireAdmin
      • Also, make sure session name is a string
    • Add functions to save and restore psoptions
    • update .gitatttributes so files clone like they do on appveyor

PR Checklist

@@ -161,7 +161,8 @@ Describe "Get-ChildItem" -Tags "CI" {
(Get-ChildItem -Path $searchRoot -Directory -Recurse).Count | Should -Be 1
}

It "Should give .sys file if the fullpath is specified with hidden and force parameter" -Skip:(!$IsWindows) {
# VSTS machines don't have a page file

This comment has been minimized.

@iSazonov

iSazonov Aug 16, 2018
Collaborator

at all or on system drive?

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 16, 2018
Author Member

They don't have a page file on the system drive

This comment has been minimized.

@iSazonov

iSazonov Aug 17, 2018
Collaborator

We could find the page file location:

			#Open the registry on multiple remote computers
			$reg = [Microsoft.Win32.RegistryKey]::OpenRemoteBaseKey('LocalMachine',$server )
			$RegKeyPath= "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management"
			$pageFileKey=$reg.OpenSubKey($RegKeyPath)
			$pageFileLocation=$pageFileKey.GetValue("ExistingPageFiles")

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 17, 2018
Author Member

I've updated #7554

@@ -79,7 +79,7 @@ Describe "Test-Connection" -tags "CI" {
}

# In VSTS, address is 0.0.0.0
It "Force IPv4 with implicit PingOptions" -Skip:(Test-IsVstsLinux) {
It "Force IPv4 with implicit PingOptions" -Skip:((Test-IsVstsLinux) -or (Test-IsVstsWindows)) {

This comment has been minimized.

@iSazonov

iSazonov Aug 16, 2018
Collaborator

I wonder how we'll do remoting tests if VSTS, address is 0.0.0.0?

What about web cmdlet tests? Seems we need add [Feature] to a commit title.

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 16, 2018
Author Member

remoting tests are working

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 16, 2018
Author Member

At this point, only CI has been ported, not Feature tests. We should have a later pull request to enable daily builds and [Feature] etc

@@ -2,3 +2,5 @@ CHANGELOG.md merge=union
* text=auto
*.png binary
*.rtf binary
testablescript.ps1 text eol=lf

This comment has been minimized.

@adityapatwardhan

adityapatwardhan Aug 18, 2018
Member

what are these two?

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 18, 2018
Author Member

just forcing the line endings to be LF which is what we expect

condition: succeededOrFailed()

- powershell: |
[Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12

This comment has been minimized.

@adityapatwardhan

adityapatwardhan Aug 18, 2018
Member

Re-evaluate if this is needed

build.psm1 Outdated
$environment += @{'nugetPackagesRoot' = "${env:HOMEDRIVE}${env:HOMEPATH}\.nuget\packages"}
if(!$env:HOMEPATH)
{
$environment += @{'nugetPackagesRoot' = "${env:USERPROFILE}\.nuget\packages"}

This comment has been minimized.

@adityapatwardhan

adityapatwardhan Aug 18, 2018
Member

We should just use USERPROFILE instead.

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 18, 2018
Author Member

done

build.psm1 Outdated
{
# Remove PSOptions.
# The file is only used to set the PSOptions.
Remove-Item -Path $psOptionsPath

This comment has been minimized.

@adityapatwardhan

adityapatwardhan Aug 18, 2018
Member

Maybe -force

This comment has been minimized.

@TravisEz13

TravisEz13 Aug 18, 2018
Author Member

Done

test/powershell/Modules/Microsoft.PowerShell.Security/FileCatalog.Tests.ps1 Outdated
# We will fail, Write why.
if($detailResult)
{
$detailResult | ConvertTo-Json | Write-Verbose -Verbose

This comment has been minimized.

@adityapatwardhan

adityapatwardhan Aug 18, 2018
Member

This can be moved to L#242

kalgiz and others added 18 commits May 18, 2018
make sure TestFileCatalog always uses lf endings
@TravisEz13 TravisEz13 force-pushed the TravisEz13:vsts_windows branch to 45c8fb2 Aug 18, 2018
@TravisEz13 TravisEz13 merged commit 40532d9 into PowerShell:master Aug 18, 2018
7 checks passed
7 checks passed
CodeFactor No issues found.
Details
VSTS: PowerShell-CI-linux PR-7536-20180818.01 succeeded with issues
Details
VSTS: PowerShell-CI-macos PR-7536-20180818.01 succeeded with issues
Details
WIP ready for review
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla All CLA requirements met.
Details
@TravisEz13 TravisEz13 deleted the TravisEz13:vsts_windows branch Aug 18, 2018
@TravisEz13 TravisEz13 added this to the v6.1.0 milestone Aug 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants
You can’t perform that action at this time.
X Tutup