Auto merge of #110972 - ehuss:remove-awscli, r=pietroalbini

Remove aws cli install.

All runner images have the AWS CLI 2 installed, so there isn't a really strong reason to install our own version anymore.

The version we were installing was 1.27.122. The runner images currently have 2.11.x (the exact version varies by image).

I do not have the means to really test if the new version has any issues. I looked at all the `aws` commands, and none of them seem to be doing anything unusual. The page at https://docs.aws.amazon.com/cli/latest/userguide/cliv2-migration-changes.html contains a list of all the breaking changes, and I didn't see anything that looked important.
This commit is contained in:
bors 2023-05-06 21:15:25 +00:00
commit a77c552485
4 changed files with 6 additions and 51 deletions

View File

@ -98,9 +98,6 @@ jobs:
- name: show the current environment - name: show the current environment
run: src/ci/scripts/dump-environment.sh run: src/ci/scripts/dump-environment.sh
if: success() && !env.SKIP_JOB if: success() && !env.SKIP_JOB
- name: install awscli
run: src/ci/scripts/install-awscli.sh
if: success() && !env.SKIP_JOB
- name: install sccache - name: install sccache
run: src/ci/scripts/install-sccache.sh run: src/ci/scripts/install-sccache.sh
if: success() && !env.SKIP_JOB if: success() && !env.SKIP_JOB
@ -170,6 +167,7 @@ jobs:
TOOLSTATE_PUBLISH: 1 TOOLSTATE_PUBLISH: 1
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55 ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
AWS_REGION: us-west-1
CACHE_DOMAIN: ci-caches.rust-lang.org CACHE_DOMAIN: ci-caches.rust-lang.org
if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'" if: "github.event_name == 'push' && github.ref == 'refs/heads/auto' && github.repository == 'rust-lang-ci/rust'"
strategy: strategy:
@ -521,9 +519,6 @@ jobs:
- name: show the current environment - name: show the current environment
run: src/ci/scripts/dump-environment.sh run: src/ci/scripts/dump-environment.sh
if: success() && !env.SKIP_JOB if: success() && !env.SKIP_JOB
- name: install awscli
run: src/ci/scripts/install-awscli.sh
if: success() && !env.SKIP_JOB
- name: install sccache - name: install sccache
run: src/ci/scripts/install-sccache.sh run: src/ci/scripts/install-sccache.sh
if: success() && !env.SKIP_JOB if: success() && !env.SKIP_JOB
@ -593,6 +588,7 @@ jobs:
TOOLSTATE_PUBLISH: 1 TOOLSTATE_PUBLISH: 1
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55 ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
AWS_REGION: us-west-1
CACHE_DOMAIN: ci-caches.rust-lang.org CACHE_DOMAIN: ci-caches.rust-lang.org
if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'" if: "github.event_name == 'push' && (github.ref == 'refs/heads/try' || github.ref == 'refs/heads/try-perf') && github.repository == 'rust-lang-ci/rust'"
strategy: strategy:
@ -637,9 +633,6 @@ jobs:
- name: show the current environment - name: show the current environment
run: src/ci/scripts/dump-environment.sh run: src/ci/scripts/dump-environment.sh
if: success() && !env.SKIP_JOB if: success() && !env.SKIP_JOB
- name: install awscli
run: src/ci/scripts/install-awscli.sh
if: success() && !env.SKIP_JOB
- name: install sccache - name: install sccache
run: src/ci/scripts/install-sccache.sh run: src/ci/scripts/install-sccache.sh
if: success() && !env.SKIP_JOB if: success() && !env.SKIP_JOB
@ -706,6 +699,7 @@ jobs:
TOOLSTATE_PUBLISH: 1 TOOLSTATE_PUBLISH: 1
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55 ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
AWS_REGION: us-west-1
CACHE_DOMAIN: ci-caches.rust-lang.org CACHE_DOMAIN: ci-caches.rust-lang.org
if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'" if: "github.event_name == 'push' && github.ref == 'refs/heads/master' && github.repository == 'rust-lang-ci/rust'"
steps: steps:

View File

@ -169,6 +169,7 @@ if [ "$SCCACHE_BUCKET" != "" ]; then
args="$args --env SCCACHE_REGION" args="$args --env SCCACHE_REGION"
args="$args --env AWS_ACCESS_KEY_ID" args="$args --env AWS_ACCESS_KEY_ID"
args="$args --env AWS_SECRET_ACCESS_KEY" args="$args --env AWS_SECRET_ACCESS_KEY"
args="$args --env AWS_REGION"
else else
mkdir -p $HOME/.cache/sccache mkdir -p $HOME/.cache/sccache
args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache" args="$args --env SCCACHE_DIR=/sccache --volume $HOME/.cache/sccache:/sccache"

View File

@ -53,6 +53,7 @@ x--expand-yaml-anchors--remove:
# (caches, artifacts...). # (caches, artifacts...).
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZI5DHEBFL
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55 ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZN24CBO55
AWS_REGION: us-west-1
CACHE_DOMAIN: ci-caches.rust-lang.org CACHE_DOMAIN: ci-caches.rust-lang.org
- &dummy-variables - &dummy-variables
@ -68,6 +69,7 @@ x--expand-yaml-anchors--remove:
# (caches, artifacts...). # (caches, artifacts...).
CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5 CACHES_AWS_ACCESS_KEY_ID: AKIA46X5W6CZOMUQATD5
ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF ARTIFACTS_AWS_ACCESS_KEY_ID: AKIA46X5W6CZH5AYXDVF
AWS_REGION: us-west-1
CACHE_DOMAIN: ci-caches-gha.rust-lang.org CACHE_DOMAIN: ci-caches-gha.rust-lang.org
- &base-job - &base-job
@ -158,10 +160,6 @@ x--expand-yaml-anchors--remove:
run: src/ci/scripts/dump-environment.sh run: src/ci/scripts/dump-environment.sh
<<: *step <<: *step
- name: install awscli
run: src/ci/scripts/install-awscli.sh
<<: *step
- name: install sccache - name: install sccache
run: src/ci/scripts/install-sccache.sh run: src/ci/scripts/install-sccache.sh
<<: *step <<: *step

View File

@ -1,38 +0,0 @@
#!/bin/bash
# This script downloads and installs awscli from the packages mirrored in our
# own S3 bucket. This follows the recommendations at:
#
# https://packaging.python.org/guides/index-mirrors-and-caches/#caching-with-pip
#
# To create a new mirrored copy you can run the command:
#
# pip wheel awscli
#
# Before compressing please make sure all the wheels end with `-none-any.whl`.
# If that's not the case you'll need to remove the non-cross-platform ones and
# replace them with the .tar.gz downloaded from https://pypi.org.
set -euo pipefail
IFS=$'\n\t'
source "$(cd "$(dirname "$0")" && pwd)/../shared.sh"
MIRROR="${MIRRORS_BASE}/2023-04-28-awscli.tar"
DEPS_DIR="/tmp/awscli-deps"
pip="pip"
pipflags=""
if isLinux; then
pip="pip3"
pipflags="--user"
sudo apt-get install -y python3-setuptools python3-wheel
ciCommandAddPath "${HOME}/.local/bin"
elif isMacOS; then
pip="pip3"
fi
mkdir -p "${DEPS_DIR}"
curl "${MIRROR}" | tar xf - -C "${DEPS_DIR}"
"${pip}" install ${pipflags} --no-index "--find-links=${DEPS_DIR}" awscli
rm -rf "${DEPS_DIR}"