From f109b9df6de92695407b48c50fd5130289394d26 Mon Sep 17 00:00:00 2001 From: RChis1 Date: Wed, 11 Aug 2021 09:38:11 +0300 Subject: [PATCH] ci: improve azure build time By moving the condition from the task to the entire job (PushToSWDownloads), build time will be shorter and unnecessary tasks will not be performed. Signed-off-by: Raluca Chis --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 109b3bfea..e3e4a4083 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -161,6 +161,7 @@ stages: dependsOn: Builds jobs: - job: PushToSWDownloads + condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) pool: vmImage: 'ubuntu-latest' steps: @@ -175,5 +176,4 @@ stages: - bash: chmod 600 $(key.secureFilePath) ; scp -2 -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -o HostKeyAlgorithms=+ssh-dss -vv -i $(key.secureFilePath) -r /home/vsts/work/1/a/* $MAPPED_VAR env: MAPPED_VAR: $(SERVER_ADDRESS) - condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')) displayName: "Push artifacts to SW Downloads"