Skip to content

Commit 8143fec

Browse files
committed
Install awscli
1 parent 648300b commit 8143fec

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

.buildkite/pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ steps:
4949
steps:
5050
- label: "Unit tests - Ubuntu 22.04"
5151
key: "unit-tests-2204"
52-
command: ".buildkite/scripts/steps/unit-tests.sh"
52+
command: ".buildkite/scripts/install-awscli.sh && .buildkite/scripts/steps/unit-tests.sh"
5353
artifact_paths:
5454
- "build/TEST-*.html"
5555
- "build/TEST-*.xml"
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
echo "--- Install awscli"
5+
6+
DEFAULT_HOME="/usr/local"
7+
HOME=${HOME:?$DEFAULT_HOME}
8+
HOME_BIN="${HOME}/bin"
9+
AWSCLI_INSTALL_DIR="${HOME}/awscli"
10+
11+
if command -v aws
12+
then
13+
set +e
14+
echo "Found awscli."
15+
fi
16+
17+
echo "Installing awscli"
18+
19+
mkdir -p "${HOME_BIN}"
20+
mkdir -p "${AWSCLI_INSTALL_DIR}"
21+
22+
OS=$(uname -s| tr '[:upper:]' '[:lower:]')
23+
ARCH=$(uname -m| tr '[:upper:]' '[:lower:]')
24+
25+
curl "https://awscli.amazonaws.com/awscli-exe-linux-${ARCH}.zip" -o "awscliv2.zip"
26+
unzip awscliv2.zip
27+
./aws/install --bin-dir "${HOME_BIN}" --install-dir "${AWSCLI_INSTALL_DIR}"
28+

0 commit comments

Comments
 (0)