Skip to content

Commit

Permalink
Merge pull request #190 from CircleCI-Public/brentmmarks-patch-1
Browse files Browse the repository at this point in the history
update image versions

fixes #188
  • Loading branch information
otremblay authored Feb 27, 2024
2 parents 256a96f + c5a792e commit 8cb46da
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 38 deletions.
20 changes: 10 additions & 10 deletions .circleci/test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
aws --version
aws ec2 describe-images --profile << parameters.profile_name >> \
--owners amazon \
--filters "Name=platform,Values=windows" "Name=root-device-type,Values=ebs"
--filters "Name=platform,Values=windows" "Name=root-device-type,Values=ebs"
integration-test-role-arn-setup:
executor: docker-base
parameters:
Expand Down Expand Up @@ -131,7 +131,7 @@ workflows:
- run:
name: Checking ~/.aws/config for profile region
command: |
if grep "\[profile OIDC-User\]" ~/.aws/config && grep "us-west-2" ~/.aws/config;then
if grep "\[profile OIDC-User\]" ~/.aws/config && grep "us-west-2" ~/.aws/config;then
echo "Profile region properly configured"
exit 0
else
Expand All @@ -150,7 +150,7 @@ workflows:
- run:
name: Checking ~/.aws/config for default region
command: |
if grep "\[default\]" ~/.aws/config && grep "us-west-1" ~/.aws/config;then
if grep "\[default\]" ~/.aws/config && grep "us-west-1" ~/.aws/config;then
echo "Default region properly configured"
exit 0
else
Expand Down Expand Up @@ -219,11 +219,11 @@ workflows:
alias: test-install-version
parameters:
executor: ["docker-base", "macos", "alpine", "docker-nounset-shell" ]
version: "2.1.10"
version: "2.13.25"
filters: *filters
post-steps:
- check_aws_version:
version: "2.1.10"
version: "2.13.25"
# Test overriding existing version of AWS pre-installed
- integration-test-install:
name: integration-test-install-override-version-<<matrix.executor>>
Expand All @@ -232,14 +232,14 @@ workflows:
alias: test-install-override-version
parameters:
executor: ["linuxvm", "windows", "arm"]
version: "2.1.10"
version: "2.13.25"
install_dir: "/usr/local/aws-cli"
binary_dir: ""
override_installed: false
filters: *filters
post-steps:
- check_aws_version:
version: "2.1.10"
version: "2.13.25"
- integration-test-install:
name: integration-test-skip-install-matched-version
context: [CPE_ORBS_AWS]
Expand Down Expand Up @@ -301,14 +301,14 @@ executors:
xcode: 14.2.0
arm:
machine:
image: ubuntu-2004:202101-01
image: ubuntu-2004:current
resource_class: arm.medium
linuxvm:
machine:
image: ubuntu-2004:202101-01
image: ubuntu-2004:current
windows:
machine:
image: windows-server-2019-vs2019:2023.04.1
image: windows-server-2019-vs2019:current
shell: bash.exe
resource_class: windows.medium
commands:
Expand Down
32 changes: 8 additions & 24 deletions src/scripts/linux/install.sh
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
#!/bin/sh
#shellcheck disable=SC1090
Install_AWS_CLI() {
if [ "$1" = "latest" ]; then
version=""
else
version="-$1"
fi

echo "Installing AWS CLI v2"
cd /tmp || exit
if [ "$SYS_ENV_PLATFORM" = "linux_alpine" ]; then
apk update && apk upgrade && apk add -U curl
apk --no-cache add binutils
apk --no-cache add binutils
apk --no-cache add libcurl
apk --no-cache upgrade libcurl
curl -L https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub
curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-2.34-r0.apk
curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-bin-2.34-r0.apk
curl -LO https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.34-r0/glibc-i18n-2.34-r0.apk

apk add --force-overwrite --no-cache \
glibc-2.34-r0.apk \
glibc-bin-2.34-r0.apk \
glibc-i18n-2.34-r0.apk

/usr/glibc-compat/bin/localedef -i en_US -f UTF-8 en_US.UTF-8
curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-x86_64$version.zip" -o "awscliv2.zip"

echo "https://awscli.amazonaws.com/awscli-exe-linux-x86_64$version.zip"
unzip awscliv2.zip
aws/install
rm -r awscliv2.zip ./aws
apk --no-cache add aws-cli
else
if [ "$1" = "latest" ]; then
version=""
else
version="-$1"
fi

PLATFORM=$(uname -m)
curl -sSL "https://awscli.amazonaws.com/awscli-exe-linux-$PLATFORM$version.zip" -o "awscliv2.zip"
unzip -q -o awscliv2.zip
Expand Down
7 changes: 3 additions & 4 deletions src/scripts/windows/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ Install_AWS_CLI(){
fi
echo "Installing AWS CLI v2"
cd /tmp || exit

if ! command -v choco >/dev/null 2>&1; then
echo "Chocolatey is required to install AWS"
exit 1
fi

choco install awscli --version="$version"
yes "Yes" | choco install -y awscli --version="$version"
echo "Installing AWS CLI version $version"
if echo "$1" | grep -e "^2\." -e "latest"; then
echo "export PATH=\"\${PATH}:/c/Program Files/Amazon/AWSCLIV2\"" >> "$BASH_ENV"
Expand All @@ -28,5 +27,5 @@ Uninstall_AWS_CLI() {
echo "Chocolatey is required to uninstall AWS"
exit 1
fi
choco uninstall awscli
choco uninstall awscli
}

0 comments on commit 8cb46da

Please sign in to comment.