-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable daily runs with compliance (#3664)
- Loading branch information
1 parent
0d3c8dd
commit bdf8ad1
Showing
8 changed files
with
503 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
steps: | ||
- powershell: | | ||
Get-ChildItem Env:\ | ||
displayName: Capture environment | ||
|
||
#- powershell: | | ||
# if ((Get-Command pwsh -CommandType Application -ErrorAction Ignore) -eq $null) | ||
# { | ||
# Write-Verbose -Verbose "Installing pwsh" | ||
# $destPath = "${env:BUILD_ARTIFACTSTAGINGDIRECTORY}/install-powershell.ps1" | ||
# Invoke-WebRequest -Uri 'https://raw.githubusercontent.com/PowerShell/PowerShell/master/tools/install-powershell.ps1' -OutFile $destPath | ||
# Unblock-File $destPath | ||
# & $destPath -UseMSI -Quiet | ||
# } | ||
# displayName: Install pwsh if not available | ||
|
||
- powershell: | | ||
Install-Module -Name platyPS -Repository PSGallery -Force | ||
displayName: Install tools | ||
|
||
- powershell: | | ||
$(Build.SourcesDirectory)\build.ps1 | ||
displayName: Build | ||
|
||
- powershell: | | ||
Compress-Archive -Path "$(Build.SourcesDirectory)\updatablehelp\*" -DestinationPath "$(Build.ArtifactStagingDirectory)\updatablehelp-$(Build.BuildId).zip" | ||
Write-Host "##vso[artifact.upload containerfolder=artifacts;artifactname=artifacts]$(Build.ArtifactStagingDirectory)\updatablehelp-$(Build.BuildId).zip" | ||
displayName: Compress and upload updatable help content | ||
|
||
# We run tests on Windows PowerShell. Changing to PowerShell core would need changes to the tests | ||
- powershell: | | ||
Install-Module -Name Pester -Repository PSGallery -Force -SkipPublisherCheck | ||
Import-Module "$(Build.SourcesDirectory)/tests/PowerShellDocsTests.psm1" -Force | ||
Invoke-Test | ||
displayName: Test | ||
|
||
# Publish Test Results to Azure Pipelines/TFS | ||
- task: PublishTestResults@2 | ||
inputs: | ||
testResultsFormat: 'NUnit' | ||
testResultsFiles: '**/TestResults.xml' | ||
searchFolder: '$(Build.SourcesDirectory)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: PowerShell-Docs-Daily-$(Date:yyyyMMdd)$(Rev:.rr) | ||
trigger: | ||
branches: | ||
include: | ||
- live | ||
- staging | ||
paths: | ||
include: | ||
- reference/**/* | ||
- build.ps1 | ||
- ci.yml | ||
- ci-steps.yml | ||
- .openpublishing.build.ps1 | ||
- .openpublishing.publish.config.json | ||
- .openpublishing.redirection.json | ||
- tests/**/* | ||
- '**/docfx.json' | ||
- '**/TOC.yml' | ||
- '**/toc.yml' | ||
- '**/*.md' | ||
|
||
pr: | ||
branches: | ||
include: | ||
- staging | ||
- live | ||
paths: | ||
include: | ||
- reference/**/* | ||
- build.ps1 | ||
- ci.yml | ||
- ci-steps.yml | ||
- .openpublishing.build.ps1 | ||
- .openpublishing.publish.config.json | ||
- .openpublishing.redirection.json | ||
- tests/**/* | ||
- '**/docfx.json' | ||
- '**/TOC.yml' | ||
- '**/toc.yml' | ||
- '**/*.md' | ||
|
||
resources: | ||
- repo: self | ||
clean: true | ||
|
||
jobs: | ||
- job: build_and_test | ||
displayName: Build And Test | ||
pool: Package ES CodeHub Lab E | ||
|
||
steps: | ||
- template: ci-steps.yml | ||
|
||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-antimalware.AntiMalware@3 | ||
displayName: 'Run Defender Scan' | ||
|
||
- task: securedevelopmentteam.vss-secure-development-tools.build-task-policheck.PoliCheck@1 | ||
displayName: 'Run PoliCheck' | ||
inputs: | ||
targetType: F | ||
optionsFC: 0 | ||
optionsXS: 0 | ||
optionsPE: '1|2|3|4' | ||
optionsHMENABLE: 0 | ||
optionsRulesDBPath: '$(Build.SourcesDirectory)\tools\terms\PowerShell-Docs-Terms-Rules.mdb' | ||
optionsFTPATH: '$(Build.SourcesDirectory)\tools\terms\FileTypeSet.xml' | ||
continueOnError: true | ||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.