mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 17:53:58 +08:00
c83bd87e4f
* Capture environment better * Capture env better
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
parameters:
|
|
pool: 'ubuntu-latest'
|
|
jobName: 'none'
|
|
scriptName: ''
|
|
container: ''
|
|
verification: ''
|
|
continueOnError: false
|
|
|
|
jobs:
|
|
|
|
- job: ${{ parameters.jobName }}
|
|
variables:
|
|
scriptName: ${{ parameters.scriptName }}
|
|
|
|
${{ if ne(parameters.container, '') }}:
|
|
container: ${{ parameters.container }}
|
|
|
|
pool:
|
|
vmImage: ${{ parameters.pool }}
|
|
|
|
displayName: ${{ parameters.jobName }}
|
|
|
|
steps:
|
|
- pwsh: |
|
|
Get-ChildItem -Path env: | Out-String -width 9999 -Stream | write-Verbose -Verbose
|
|
displayName: Capture Environment
|
|
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: |
|
|
$(scriptName)
|
|
displayName: Run Script - $(scriptName)
|
|
condition: succeededOrFailed()
|
|
continueOnError: ${{ parameters.continueOnError }}
|
|
|
|
- ${{ if ne(parameters.verification, '') }}:
|
|
- pwsh: ${{ parameters.verification }}
|
|
displayName: Verification
|
|
continueOnError: ${{ parameters.continueOnError }}
|