From fbca91fdfbdbc4cced5d8a7eb2193710e3eb27e5 Mon Sep 17 00:00:00 2001 From: Andrew Arnott Date: Tue, 7 Apr 2020 18:57:50 -0600 Subject: [PATCH] Simplify syntax of Powershell tasks --- azure-pipelines/dotnet.yml | 12 ++++-------- azure-pipelines/install-dependencies.yml | 6 ++---- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/azure-pipelines/dotnet.yml b/azure-pipelines/dotnet.yml index 0d837acbb..71bd42e13 100644 --- a/azure-pipelines/dotnet.yml +++ b/azure-pipelines/dotnet.yml @@ -33,17 +33,13 @@ steps: testRunTitle: netcoreapp3.1-$(Agent.JobName) workingDirectory: src -- task: PowerShell@2 - inputs: - filePath: azure-pipelines/variables/_pipelines.ps1 - failOnStderr: true +- powershell: azure-pipelines/variables/_pipelines.ps1 + failOnStderr: true displayName: Update pipeline variables based on build outputs condition: succeededOrFailed() -- task: PowerShell@2 - inputs: - filePath: azure-pipelines/artifacts/_pipelines.ps1 - arguments: -ArtifactNameSuffix "-$(Agent.JobName)" +- powershell: azure-pipelines/artifacts/_pipelines.ps1 -ArtifactNameSuffix "-$(Agent.JobName)" + failOnStderr: true displayName: Publish artifacts condition: succeededOrFailed() diff --git a/azure-pipelines/install-dependencies.yml b/azure-pipelines/install-dependencies.yml index a778022a0..ec9c3f56a 100644 --- a/azure-pipelines/install-dependencies.yml +++ b/azure-pipelines/install-dependencies.yml @@ -15,8 +15,6 @@ steps: displayName: Install procdump condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) -- task: PowerShell@2 - inputs: - filePath: azure-pipelines/variables/_pipelines.ps1 - failOnStderr: true +- powershell: azure-pipelines/variables/_pipelines.ps1 + failOnStderr: true displayName: Set pipeline variables based on source