Skip to content

Commit

Permalink
Merge pull request #172 from ngan/fix-docker-compose
Browse files Browse the repository at this point in the history
Use "docker compose" for Ubuntu
  • Loading branch information
composerinteralia authored Apr 4, 2024
2 parents b11647a + 85fe081 commit 3fa8359
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions script/cibuild
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ output_fold() {

# Only echo the tags when in CI_MODE
if [ "$CI_MODE" ]; then
echo "%%%FOLD {$label}%%%"
echo "::group::{$label}"
fi

# run the remaining arguments. If the command exits non-0, the `||` will
Expand All @@ -25,7 +25,7 @@ output_fold() {

# Only echo the tags when in CI_MODE
if [ "$CI_MODE" ]; then
echo "%%%END FOLD%%%"
echo "::endgroup::"
fi

# preserve the exit code from the subcommand.
Expand All @@ -34,9 +34,9 @@ output_fold() {

function cleanup() {
echo
echo "%%%FOLD {Shutting down services...}%%%"
docker-compose down -v
echo "%%%END FOLD%%%"
echo "::group::{Shutting down services...}"
docker compose down -v
echo "::endgroup::"
}

trap cleanup EXIT
Expand All @@ -50,8 +50,8 @@ if [ -z "$RUBY_VERSION" ]; then export RUBY_VERSION=3.2 ; fi
DISTRIBUTION_SLUG="$(echo "$DISTRIBUTION" | awk '{ gsub(":", "_") ; print $0 }')"
export DISTRIBUTION_SLUG

docker-compose rm -s -f -v
output_fold "Pull cache image..." docker-compose pull app || true
output_fold "Bootstrapping container..." docker-compose build
output_fold "Running tests..." docker-compose run --rm app
output_fold "Pushing cache image..." docker-compose push app || true # Don't fail if push fails
docker compose rm -s -f -v
output_fold "Pull cache image..." docker compose pull app || true
output_fold "Bootstrapping container..." docker compose build
output_fold "Running tests..." docker compose run --rm app
output_fold "Pushing cache image..." docker compose push app || true # Don't fail if push fails

0 comments on commit 3fa8359

Please sign in to comment.