PowerShell/.vsts-ci/templates/install-ps-phase.yml
Travis Plunk c83bd87e4f
Capture environment better (#24148)
* Capture environment better

* Capture env better
2024-09-05 14:49:23 -07:00

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 }}