about summary refs log tree commit diff
path: root/src/ci/docker
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2019-05-24 19:22:13 +0000
committerbors <bors@rust-lang.org>2019-05-24 19:22:13 +0000
commitdec4c5201f88efbc3020b04ba96a5ee2c3b6cfcd (patch)
tree37d6545208e7ef8c6c5c783321c7384fffd8eff9 /src/ci/docker
parentfc45382c125d940822368e866588568d78551946 (diff)
parent2244ca3973fa4a43ef53a16826086e43eae86539 (diff)
downloadrust-dec4c5201f88efbc3020b04ba96a5ee2c3b6cfcd.tar.gz
rust-dec4c5201f88efbc3020b04ba96a5ee2c3b6cfcd.zip
Auto merge of #60777 - pietroalbini:azure-pipelines, r=alexcrichton
Add Azure Pipelines configuration

Huge thanks to @johnterickson and @willsmythe for writing the initial config! :heart:
I applied some changes to the initial config and disabled most of the builders since we're not going to run all of them during the initial step for the evaluation.

[More details about our plans for the Azure Pipelines evaluation.](https://internals.rust-lang.org/t/update-on-the-ci-investigation/10056)

r? @alexcrichton @kennytm
cc @rust-lang/infra @ethomson @rylev
Diffstat (limited to 'src/ci/docker')
-rw-r--r--src/ci/docker/dist-various-2/Dockerfile12
-rwxr-xr-xsrc/ci/docker/run.sh20
2 files changed, 20 insertions, 12 deletions
diff --git a/src/ci/docker/dist-various-2/Dockerfile b/src/ci/docker/dist-various-2/Dockerfile
index e7d6f201b44..bf449c83f12 100644
--- a/src/ci/docker/dist-various-2/Dockerfile
+++ b/src/ci/docker/dist-various-2/Dockerfile
@@ -32,9 +32,10 @@ COPY dist-various-2/build-cloudabi-toolchain.sh /tmp/
 RUN /tmp/build-cloudabi-toolchain.sh x86_64-unknown-cloudabi
 COPY dist-various-2/build-fuchsia-toolchain.sh /tmp/
 RUN /tmp/build-fuchsia-toolchain.sh
-COPY dist-various-2/build-solaris-toolchain.sh /tmp/
-RUN /tmp/build-solaris-toolchain.sh x86_64  amd64   solaris-i386
-RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc
+# FIXME(#61022) - reenable solaris
+# COPY dist-various-2/build-solaris-toolchain.sh /tmp/
+# RUN /tmp/build-solaris-toolchain.sh x86_64  amd64   solaris-i386
+# RUN /tmp/build-solaris-toolchain.sh sparcv9 sparcv9 solaris-sparc
 COPY dist-various-2/build-x86_64-fortanix-unknown-sgx-toolchain.sh /tmp/
 # We pass the commit id of the port of LLVM's libunwind to the build script.
 # Any update to the commit id here, should cause the container image to be re-built from this point on.
@@ -73,10 +74,11 @@ ENV CARGO_TARGET_AARCH64_FUCHSIA_RUSTFLAGS \
 
 ENV TARGETS=x86_64-fuchsia
 ENV TARGETS=$TARGETS,aarch64-fuchsia
-ENV TARGETS=$TARGETS,sparcv9-sun-solaris
 ENV TARGETS=$TARGETS,wasm32-unknown-unknown
 ENV TARGETS=$TARGETS,wasm32-wasi
-ENV TARGETS=$TARGETS,x86_64-sun-solaris
+# FIXME(#61022) - reenable solaris
+# ENV TARGETS=$TARGETS,sparcv9-sun-solaris
+# ENV TARGETS=$TARGETS,x86_64-sun-solaris
 ENV TARGETS=$TARGETS,x86_64-unknown-linux-gnux32
 ENV TARGETS=$TARGETS,x86_64-unknown-cloudabi
 ENV TARGETS=$TARGETS,x86_64-fortanix-unknown-sgx
diff --git a/src/ci/docker/run.sh b/src/ci/docker/run.sh
index 98a765e1cec..c9642dbf60c 100755
--- a/src/ci/docker/run.sh
+++ b/src/ci/docker/run.sh
@@ -40,9 +40,12 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       docker --version >> $hash_key
       cksum=$(sha512sum $hash_key | \
         awk '{print $1}')
+
       s3url="s3://$SCCACHE_BUCKET/docker/$cksum"
-      url="https://s3-us-west-1.amazonaws.com/$SCCACHE_BUCKET/docker/$cksum"
-      echo "Attempting to download $s3url"
+      url="https://$SCCACHE_BUCKET.s3.amazonaws.com/docker/$cksum"
+      upload="aws s3 cp - $s3url"
+
+      echo "Attempting to download $url"
       rm -f /tmp/rustci_docker_cache
       set +e
       retry curl -y 30 -Y 10 --connect-timeout 30 -f -L -C - -o /tmp/rustci_docker_cache "$url"
@@ -65,17 +68,17 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       -f "$dockerfile" \
       "$context"
 
-    if [ "$s3url" != "" ]; then
+    if [ "$upload" != "" ]; then
       digest=$(docker inspect rust-ci --format '{{.Id}}')
       echo "Built container $digest"
       if ! grep -q "$digest" <(echo "$loaded_images"); then
-        echo "Uploading finished image to $s3url"
+        echo "Uploading finished image to $url"
         set +e
         docker history -q rust-ci | \
           grep -v missing | \
           xargs docker save | \
           gzip | \
-          aws s3 cp - $s3url
+          $upload
         set -e
       else
         echo "Looks like docker image is the same as before, not uploading"
@@ -87,8 +90,8 @@ if [ -f "$docker_dir/$image/Dockerfile" ]; then
       echo "$digest" >>"$info"
     fi
 elif [ -f "$docker_dir/disabled/$image/Dockerfile" ]; then
-    if [ -n "$TRAVIS_OS_NAME" ]; then
-        echo Cannot run disabled images on travis!
+    if isCI; then
+        echo Cannot run disabled images on CI!
         exit 1
     fi
     # retry messes with the pipe from tar to docker. Not needed on non-travis
@@ -140,8 +143,11 @@ exec docker \
   --env DEPLOY \
   --env DEPLOY_ALT \
   --env LOCAL_USER_ID=`id -u` \
+  --env CI \
   --env TRAVIS \
   --env TRAVIS_BRANCH \
+  --env TF_BUILD \
+  --env BUILD_SOURCEBRANCHNAME \
   --env TOOLSTATE_REPO_ACCESS_TOKEN \
   --env CI_JOB_NAME="${CI_JOB_NAME-$IMAGE}" \
   --volume "$HOME/.cargo:/cargo" \