about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-05-20 14:21:12 -0700
committerAlex Crichton <alex@alexcrichton.com>2019-05-20 14:34:37 -0700
commit12f370156ddcdff567e7b0acf83cdf871a997a0a (patch)
tree8a83ed50634e3c66a22ec40a9729e931efc1f2ea
parent9b8af0608f0817caabbe15ec25c9ebedbb670245 (diff)
downloadrust-12f370156ddcdff567e7b0acf83cdf871a997a0a.tar.gz
rust-12f370156ddcdff567e7b0acf83cdf871a997a0a.zip
Only execute conditional steps on success
Make sure `succeeded()` is in all the conditionals
-rw-r--r--.azure-pipelines/steps/install-clang.yml4
-rw-r--r--.azure-pipelines/steps/install-sccache.yml4
-rw-r--r--.azure-pipelines/steps/install-windows-build-deps.yml2
-rw-r--r--.azure-pipelines/steps/run.yml20
4 files changed, 18 insertions, 12 deletions
diff --git a/.azure-pipelines/steps/install-clang.yml b/.azure-pipelines/steps/install-clang.yml
index edb7679d4c5..26a223282cd 100644
--- a/.azure-pipelines/steps/install-clang.yml
+++ b/.azure-pipelines/steps/install-clang.yml
@@ -14,7 +14,7 @@ steps:
     # `clang-ar` by accident.
     echo "##vso[task.setvariable variable=AR]ar"
   displayName: Install clang (OSX)
-  condition: eq(variables['Agent.OS'], 'Darwin')
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
 
 # If we're compiling for MSVC then we, like most other distribution builders,
 # switch to clang as the compiler. This'll allow us eventually to enable LTO
@@ -32,7 +32,7 @@ steps:
     %TEMP%\LLVM-7.0.0-win64.exe /S /NCRC /D=%CLANG_DIR%
     set RUST_CONFIGURE_ARGS=%RUST_CONFIGURE_ARGS% --set llvm.clang-cl=%CLANG_DIR%\bin\clang-cl.exe
     echo ##vso[task.setvariable variable=RUST_CONFIGURE_ARGS]%RUST_CONFIGURE_ARGS%
-  condition: and(eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'), eq(variables['MINGW_URL'],''))
   displayName: Install clang (Windows)
 
 # Note that we don't install clang on Linux since its compiler story is just so
diff --git a/.azure-pipelines/steps/install-sccache.yml b/.azure-pipelines/steps/install-sccache.yml
index 6933f4e9f27..39f58002a73 100644
--- a/.azure-pipelines/steps/install-sccache.yml
+++ b/.azure-pipelines/steps/install-sccache.yml
@@ -5,14 +5,14 @@ steps:
     curl -fo /usr/local/bin/sccache https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-02-sccache-x86_64-apple-darwin
     chmod +x /usr/local/bin/sccache
   displayName: Install sccache (OSX)
-  condition: eq(variables['Agent.OS'], 'Darwin')
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'))
 
 - script: |
     md sccache
     powershell -Command "iwr -outf sccache\sccache.exe https://s3-us-west-1.amazonaws.com/rust-lang-ci2/rust-ci-mirror/2018-04-26-sccache-x86_64-pc-windows-msvc"
     echo ##vso[task.prependpath]%CD%\sccache
   displayName: Install sccache (Windows)
-  condition: eq(variables['Agent.OS'], 'Windows_NT')
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
 
 # Note that we don't install sccache on Linux since it's installed elsewhere
 # through all the containers.
diff --git a/.azure-pipelines/steps/install-windows-build-deps.yml b/.azure-pipelines/steps/install-windows-build-deps.yml
index 4eab460543b..45ce01fee75 100644
--- a/.azure-pipelines/steps/install-windows-build-deps.yml
+++ b/.azure-pipelines/steps/install-windows-build-deps.yml
@@ -29,7 +29,7 @@ steps:
     echo ##vso[task.setvariable variable=MSYS_PATH]%MSYS_PATH%
     echo ##vso[task.prependpath]%MSYS_PATH%\usr\bin
   displayName: Install msys2
-  condition: eq(variables['Agent.OS'], 'Windows_NT')
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
 
 # If we need to download a custom MinGW, do so here and set the path
 # appropriately.
diff --git a/.azure-pipelines/steps/run.yml b/.azure-pipelines/steps/run.yml
index fa1afd2d634..2d98efd586e 100644
--- a/.azure-pipelines/steps/run.yml
+++ b/.azure-pipelines/steps/run.yml
@@ -12,12 +12,18 @@ steps:
 # images, etc.
 - bash: |
     set -e
-    pip install setuptools
-    pip install awscli
-  displayName: Install awscli
+    sudo apt-get install -y python3-setuptools
+    pip3 install awscli --upgrade --user
+    echo "##vso[task.prependpath]$HOME/.local/bin"
+  displayName: Install awscli (Linux)
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
+- script: pip install awscli
+  displayName: Install awscli (non-Linux)
+  condition: and(succeeded(), ne(variables['Agent.OS'], 'Linux'))
 
 - bash: aws s3 help
 - bash: exit 1
+
 - checkout: self
   fetchDepth: 2
 
@@ -30,7 +36,7 @@ steps:
     du . | sort -nr | head -n100
   displayName: Show disk usage
   # FIXME: this hasn't been tested, but maybe it works on Windows? Should test!
-  condition: ne(variables['Agent.OS'], 'Windows_NT')
+  condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
 
 - template: install-sccache.yml
 - template: install-clang.yml
@@ -43,7 +49,7 @@ steps:
     brew install xz
     brew install swig
   displayName: Install build dependencies (OSX)
-  condition: and(eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Darwin'), eq(variables['RUST_CHECK_TARGET'],'dist'))
 
 - template: install-windows-build-deps.yml
 
@@ -53,12 +59,12 @@ steps:
     set -e
     mkdir -p $HOME/rustsrc
     $BUILD_SOURCESDIRECTORY/src/ci/init_repo.sh . $HOME/rustsrc
-  condition: ne(variables['Agent.OS'], 'Windows_NT')
+  condition: and(succeeded(), ne(variables['Agent.OS'], 'Windows_NT'))
   displayName: Check out submodules (Unix)
 - script: |
     if not exist D:\cache\rustsrc\NUL mkdir D:\cache\rustsrc
     sh src/ci/init_repo.sh . /d/cache/rustsrc
-  condition: eq(variables['Agent.OS'], 'Windows_NT')
+  condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT'))
   displayName: Check out submodules (Windows)
 
 # Configure our CI_JOB_NAME variable which log analyzers can use for the main