FFFF Fix publishing daily nupkg to MyGet by adityapatwardhan · Pull Request #9269 · PowerShell/PowerShell · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 4 additions & 27 deletions .vsts-ci/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,30 +77,7 @@ jobs:
parentJobs:
- linux_build

- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: Hosted Ubuntu 1604
dependsOn:
- linux_build
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'

- pwsh: |
Get-ChildItem "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true

- pwsh: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"

Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()
- template: templates/verify-xunit.yml
parameters:
pool: Hosted Ubuntu 1604
dependsOn: linux_build
31 changes: 4 additions & 27 deletions .vsts-ci/mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,30 +71,7 @@ jobs:
parentJobs:
- mac_build

- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: 'Hosted macOS'
dependsOn:
- mac_build
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'

- pwsh: |
Get-ChildItem "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true

- pwsh: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"

Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()
- template: templates/verify-xunit.yml
parameters:
pool: 'Hosted macOS'
dependsOn: mac_build
33 changes: 33 additions & 0 deletions .vsts-ci/templates/verify-xunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
parameters:
dependsOn: 'win_build'
pool: 'Hosted VS2017'
jobName: 'xunit_verify'

jobs:
- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: ${{ parameters.pool }}
dependsOn:
- ${{ parameters.dependsOn }}
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'

- powershell: |
dir "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true

- powershell: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"

Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()
1 change: 1 addition & 0 deletions .vsts-ci/templates/windows-packaging.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
parameters:
pool: 'Hosted VS2017'
jobName: 'win_packaging'
parentJobs: []

jobs:
- job: ${{ parameters.jobName }}
Expand Down
85 changes: 85 additions & 0 deletions .vsts-ci/windows-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: PR-$(System.PullRequest.PullRequestNumber)-$(Date:yyyyMMdd)$(Rev:.rr)
trigger:
# Batch merge builds together while a merge build is running
batch: true
branches:
include:
- master
- release*
paths:
include:
- '*'
exclude:
- /tools/releaseBuild/**/*
- /.vsts-ci/misc-analysis.yml
- /.github/ISSUE_TEMPLATE/*
pr:
branches:
include:
- master
- release*
paths:
include:
- '*'
exclude:
- /tools/releaseBuild/**/*
- /.vsts-ci/misc-analysis.yml
- /.github/ISSUE_TEMPLATE/*

variables:
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
POWERSHELL_TELEMETRY_OPTOUT: 1
# Avoid expensive initialization of dotnet cli, see: https://donovanbrown.com/post/Stop-wasting-time-during-NET-Core-builds
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1

resources:
- repo: self
clean: true

jobs:
- template: templates/ci-build.yml

- template: templates/windows-test.yml
parameters:
purpose: UnelevatedPesterTests
tagSet: CI
parentJobs:
- win_build

- template: templates/windows-test.yml
parameters:
purpose: ElevatedPesterTests
tagSet: CI
parentJobs:
- win_build

- template: templates/windows-test.yml
parameters:
purpose: UnelevatedPesterTests
tagSet: Others
parentJobs:
- win_build

- template: templates/windows-test.yml
parameters:
purpose: ElevatedPesterTests
tagSet: Others
parentJobs:
- win_build

- template: templates/windows-packaging.yml
parameters:
# we wait for all tests to finish as this phase uploads the daily nuget package to MyGet.
# we want to upload only if tests have passed.
dependsOn:
- win_test_UnelevatedPesterTests_CI
- win_test_ElevatedPesterTests_CI
- win_test_UnelevatedPesterTests_Others
- win_test_ElevatedPesterTests_Others
- verify_xunit

- template: templates/verify-xunit.yml
parameters:
pool: 'Hosted VS2017'
dependsOn: win_build
34 changes: 6 additions & 28 deletions .vsts-ci/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pr:
- /tools/releaseBuild/**/*
- /.vsts-ci/misc-analysis.yml
- /.github/ISSUE_TEMPLATE/*

variables:
GIT_CONFIG_PARAMETERS: "'core.autocrlf=false'"
DOTNET_CLI_TELEMETRY_OPTOUT: 1
Expand Down Expand Up @@ -68,32 +68,10 @@ jobs:
parentJobs:
- win_build

# Unlike daily builds, we do not upload nuget package to MyGet so we do not wait on tests to finish.
- template: templates/windows-packaging.yml

- job: verify_xunit
displayName: Verify xUnit Results
pool:
name: 'Hosted VS2017'
dependsOn:
- win_build
steps:
- task: DownloadBuildArtifacts@0
displayName: 'Download build artifacts'
inputs:
downloadType: specific
itemPattern: |
xunit/**/*
downloadPath: '$(System.ArtifactsDirectory)'

- powershell: |
dir "$(System.ArtifactsDirectory)\*" -Recurse
displayName: 'Capture artifacts directory'
continueOnError: true

- powershell: |
Import-Module .\tools\ci.psm1
$xUnitTestResultsFile = "$(System.ArtifactsDirectory)\xunit\xUnitTestResults.xml"

Test-XUnitTestResults -TestResultsFile $xUnitTestResultsFile
displayName: Test
condition: succeeded()
- template: templates/verify-xunit.yml
parameters:
pool: 'Hosted VS2017'
dependsOn: win_build
2 changes: 1 addition & 1 deletion tools/ci.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ function Invoke-CIFinish
}

# only publish assembly nuget packages if it is a daily build and tests passed
if((Test-DailyBuild) -and $env:TestPassed -eq 'True')
if(Test-DailyBuild)
{
Publish-NuGetFeed -OutputPath .\nuget-artifacts -ReleaseTag $preReleaseVersion
$nugetArtifacts = Get-ChildItem .\nuget-artifacts -ErrorAction SilentlyContinue | ForEach-Object { $_.FullName }
Expand Down
0