Skip to content
Merged
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
63 changes: 48 additions & 15 deletions .vsts-ci/misc-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,54 @@ pr:
- feature*

resources:
- repo: self
clean: true
repositories:
- repository: ComplianceRepo
type: github
endpoint: PowerShell
name: PowerShell/compliance
ref: master

variables:
- name: repoFolder
value: PowerShell

jobs:
- template: templates/credscan.yml
- job: CI_Compliance
displayName: CI Compliance

- job: Linux_CI
pool:
vmImage: windows-latest

variables:
- name: repoPath
value: $(Agent.BuildDirectory)\$(repoFolder)

steps:
- checkout: self
clean: true
path: $(repoFolder)

- checkout: ComplianceRepo

- template: ci-compliance.yml@ComplianceRepo

- job: Linux_CI
displayName: Markdown and Common Tests

pool:
name: Hosted Ubuntu 1604
vmImage: ubuntu-16.04

variables:
- name: repoPath
value: $(Agent.BuildDirectory)/$(repoFolder)

steps:
- checkout: self
clean: true
path: $(repoFolder)

- checkout: ComplianceRepo

- powershell: |
Get-ChildItem -Path env:
displayName: Capture Environment
Expand All @@ -48,16 +84,13 @@ jobs:
displayName: Install mdspell
condition: succeededOrFailed()

- powershell: Write-Host "##vso[build.updatebuildnumber]$env:BUILD_SOURCEBRANCHNAME-$env:BUILD_SOURCEVERSION-$((get-date).ToString("yyyyMMddhhmmss"))"
displayName: Set Build Name for Non-PR
condition: ne(variables['Build.Reason'], 'PullRequest')

- bash: |
mdspell '**/*.md' '!**/Pester/**/*.md' --ignore-numbers --ignore-acronyms --report --en-us;
displayName: Test Spelling in Markdown
condition: succeededOrFailed()
workingDirectory: '$(repoPath)'

- powershell: |
- pwsh: |
Import-module ./build.psm1
$path = Join-Path -Path $pwd -ChildPath './commonTestResults.xml'
$results = invoke-pester -Script ./test/common -OutputFile $path -OutputFormat NUnitXml -PassThru
Expand All @@ -68,8 +101,8 @@ jobs:
}
displayName: Run Common Tests
condition: succeededOrFailed()
- task: ms.vss-governance-buildtask.governance-build-task-component-detection.ComponentGovernanceComponentDetection@0
displayName: 'Component Detection'
inputs:
sourceScanPath: '$(Build.SourcesDirectory)'
snapshotForceEnabled: true
workingDirectory: '$(repoPath)'

- template: dailyBuildCompliance.yml@ComplianceRepo
parameters:
sourceScanPath: '$(repoPath)'