Skip to content

Commit

Permalink
migrate from docker-compose v1 to docker compose v2 (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
v1v authored Sep 2, 2024
1 parent da06319 commit 946e91d
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bin/dev
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,15 @@ def run(cmd)
end

unless options[:skip_build]
run 'docker-compose build ' \
run 'docker compose build ' \
" --build-arg RUBY_IMAGE=#{RUBY_IMAGE}" \
" --build-arg USER_ID_GROUP=#{USER_ID_GROUP}" \
" --build-arg FRAMEWORKS=#{FRAMEWORKS}" \
" --build-arg VENDOR_PATH=#{VENDOR_PATH}"
exit $?.exitstatus unless $?.success?
end

run 'docker-compose run' \
run 'docker compose run' \
" -u #{USER_ID_GROUP}" \
' --rm' \
" specs #{ARGV.join}"
2 changes: 1 addition & 1 deletion spec/scripts/benchmarks.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ IMAGE_NAME="${IMAGE_NAME}" \
LOCAL_GROUP_ID="$(id -g)" \
LOCAL_USER_ID="$(id -u)" \
RUBY_VERSION="${VERSION}" \
docker-compose -f ../docker-compose.yml run \
docker compose -f ../docker-compose.yml run \
-e REPORT_OUTPUT_NAME="${REPORT_OUTPUT_NAME}" \
-v "${BASE_PROJECT}:/opt/app" \
--rm ruby_rspec \
Expand Down
4 changes: 2 additions & 2 deletions spec/scripts/features.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ CLEAN_IMAGE_NAME=$(echo $IMAGE_NAME | sed s/:/-/ )
docker build --pull --force-rm --build-arg "RUBY_IMAGE=${IMAGE_NAME}" -t "apm-agent-ruby:${VERSION}" .

# Start mongodb
docker-compose up -d mongodb
docker compose up -d mongodb

# Run bdd tests
IMAGE_NAME="${IMAGE_NAME}" \
LOCAL_GROUP_ID="$(id -g)" \
LOCAL_USER_ID="$(id -u)" \
RUBY_VERSION="${VERSION}" \
docker-compose -f ../docker-compose.yml run \
docker compose -f ../docker-compose.yml run \
-e INCLUDE_SCHEMA_SPECS=1 \
-e JDK_JAVA_OPTIONS="${JDK_JAVA_OPTIONS}" \
-e JRUBY_OPTS="${JRUBY_OPTS}" \
Expand Down
4 changes: 2 additions & 2 deletions spec/scripts/spec.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,14 +47,14 @@ CLEAN_IMAGE_NAME=$(echo $IMAGE_NAME | sed s/:/-/ )
docker build --pull --force-rm --build-arg "RUBY_IMAGE=${IMAGE_NAME}" -t "apm-agent-ruby:${VERSION}" .

# Start mongodb
docker-compose up -d mongodb
docker compose up -d mongodb

# Run tests
IMAGE_NAME="${IMAGE_NAME}" \
LOCAL_GROUP_ID="$(id -g)" \
LOCAL_USER_ID="$(id -u)" \
RUBY_VERSION="${VERSION}" \
docker-compose -f ../docker-compose.yml run \
docker compose -f ../docker-compose.yml run \
-e FRAMEWORK="${FRAMEWORK}" \
-e TEST_MATRIX="${FRAMEWORK}-${CLEAN_IMAGE_NAME}" \
-e INCLUDE_SCHEMA_SPECS=1 \
Expand Down

0 comments on commit 946e91d

Please sign in to comment.