Unverified Commit 88405d63 authored by Russell Cohen's avatar Russell Cohen Committed by GitHub
Browse files

Upgrade CI to use docker-compose v2 (#3543)

## Motivation and Context
- https://github.com/actions/runner-images/issues/9557
- https://docs.docker.com/compose/migrate/

## Description
It seems like they should be drop-in compatible for our use case.

----

_By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice._
parent 31e7b1a9
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -10,7 +10,7 @@ if [[ $# -lt 1 ]]; then
    echo "Usage: ci <action> [args...]"
    echo
    echo "Runs a CI action from tools/ci-build/scripts within the Docker build image."
    echo "Requires Docker and docker-compose to both be installed."
    echo "Requires Docker and docker compose to both be installed."
    echo
    echo "Note: Some actions may require 'aws-sdk-rust' and/or 'aws-doc-sdk-examples'"
    echo "to be checked out in the same directory as 'smithy-rs'."
+4 −4
Original line number Diff line number Diff line
@@ -33,7 +33,7 @@ ACTION_PATH="$("${SCRIPT_PATH}"/ci-create-workspace)"
cd "${SCRIPT_PATH}"

function cleanup {
    docker-compose -f build.docker-compose.yml down
    docker compose -f build.docker-compose.yml down
    cd "${START_PATH}"
    mv "${ACTION_PATH}/workspace/artifacts" .
    if [[ -d "${ACTION_PATH}/workspace/smithy-rs/target" ]]; then
@@ -51,10 +51,10 @@ GROUP_ID="$(id -g)"
export USER_ID
export GROUP_ID
export GRADLE_CACHE_PATH="${START_PATH}/gradle"
docker-compose -f build.docker-compose.yml up -d
docker compose -f build.docker-compose.yml up -d
if [[ "${ACTION_NAME}" == "--shell" ]]; then
    docker-compose -f build.docker-compose.yml exec smithy-rs-build /bin/bash
    docker compose -f build.docker-compose.yml exec smithy-rs-build /bin/bash
else
    docker-compose -f build.docker-compose.yml exec -T smithy-rs-build bash -c "cd workspace; ./ci-scripts/${ACTION_NAME} ${ACTION_ARGS[*]}"
    docker compose -f build.docker-compose.yml exec -T smithy-rs-build bash -c "cd workspace; ./ci-scripts/${ACTION_NAME} ${ACTION_ARGS[*]}"
fi
exit $?