From 6ced65a18bd7175b7fae8b765c464ee74a7511d8 Mon Sep 17 00:00:00 2001 From: Nick Lincoln Date: Tue, 5 Jan 2021 13:21:08 +0000 Subject: [PATCH] update conditionals (#1112) Signed-off-by: nkl199@yahoo.co.uk --- azure-pipelines.yml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6cac0ff34..35968a971 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,12 +1,19 @@ trigger: -- main + branches: + include: + - master pr: -- master + branches: + include: + - master pool: vmImage: 'ubuntu-latest' +variables: +- group: credentials + stages: - stage: UnitTests displayName: Run unit tests @@ -38,6 +45,7 @@ stages: - stage: IntegrationTests displayName: Run integration tests + condition: and(succeeded(), (variables['Build.Reason'], 'PullRequest')) dependsOn: UnitTests jobs: - job: fabricIntegration @@ -97,7 +105,7 @@ stages: - stage: Publish displayName: Publish Caliper - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'), eq(variables['Build.Reason'], 'IndividualCI')) + condition: and(succeeded(), ne(variables['Build.Reason'], 'PullRequest')) jobs: - job: PublishNPM displayName: 'Publish Caliper NPM packages'