Skip to content

Commit

Permalink
CNJR-2127: Use Docker Compose v2
Browse files Browse the repository at this point in the history
  • Loading branch information
john-odonnell committed Dec 15, 2023
1 parent 8f78dfe commit 782f00f
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ci/start_dev_environment
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ build_test_images
start_conjur

# Runs the cflinux4 image in interactive mode with the project files mounted
docker-compose \
docker compose \
-f "$DOCKER_COMPOSE_FILE" \
run --rm \
-e BUILDPACK_BUILD_DIR="/cyberark/cloudfoundry-conjur-buildpack/conjur_buildpack" \
Expand Down
2 changes: 1 addition & 1 deletion ci/test_e2e
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ popd

announce 'Running Cucumber tests...'
# Run tests against latest build of buildpack (including integration tests against remote foundation)
docker-compose \
docker compose \
-f "$DOCKER_COMPOSE_FILE" \
run --rm \
-w "$CONTAINER_FEATURES_DIR" \
Expand Down
2 changes: 1 addition & 1 deletion ci/test_integration
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ start_conjur
[[ -z $JENKINS_HOME ]] && package_and_unpack_buildpack

announce 'Running Cucumber tests...'
docker-compose \
docker compose \
-f "$DOCKER_COMPOSE_FILE" \
run --rm \
-w "$CONTAINER_FEATURES_DIR" \
Expand Down
8 changes: 4 additions & 4 deletions ci/utils
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ function announce {

function finish {
announce 'Removing environment...'
docker-compose -f "$DOCKER_COMPOSE_FILE" down -v
docker compose -f "$DOCKER_COMPOSE_FILE" down -v
}

function package_and_unpack_buildpack {
Expand All @@ -36,14 +36,14 @@ function setup_env {

function build_test_images {
announce 'Building test images...'
docker-compose -f "$DOCKER_COMPOSE_FILE" build
docker compose -f "$DOCKER_COMPOSE_FILE" build
}

function start_conjur {
announce 'Waiting for Conjur to start...'
docker-compose -f "$DOCKER_COMPOSE_FILE" up -d conjur
docker compose -f "$DOCKER_COMPOSE_FILE" up -d conjur

docker-compose -f "$DOCKER_COMPOSE_FILE" exec -T conjur conjurctl wait -r 45 -p 80
docker compose -f "$DOCKER_COMPOSE_FILE" exec -T conjur conjurctl wait -r 45 -p 80
}


Expand Down
4 changes: 2 additions & 2 deletions conjur-env/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ cd "$(dirname "$0")"

rm -rf ../vendor/conjur-env

docker-compose build
docker-compose run --rm conjur-env-builder
docker compose build
docker compose run --rm conjur-env-builder
2 changes: 1 addition & 1 deletion tests/retrieve-secrets/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ environment, then assert upon the output. BATS offers the `$output` variable, w
contains the output from the previous command executed using the `run` prefix.

### `stop`
Removes existing docker-compose containers
Removes existing Docker Compose environment

### Configuration

Expand Down
8 changes: 4 additions & 4 deletions tests/retrieve-secrets/start
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ mkdir -p temp_clone_dir
git clone https://github.com/ztombol/bats-support temp_clone_dir/bats-support
git clone https://github.com/ztombol/bats-assert temp_clone_dir/bats-assert

docker-compose build
docker-compose run --rm mock-conjur-env-builder
docker compose build
docker compose run --rm mock-conjur-env-builder

echo "Starting tests for 0001_retrieve-secrets.sh..."

# Uncomment when running locally
# docker-compose run --rm tester --formatter tap ./test
# docker compose run --rm tester --formatter tap ./test

# Comment out when running locally
docker-compose run --rm tester --formatter junit ./test
docker compose run --rm tester --formatter junit ./test
2 changes: 1 addition & 1 deletion tests/retrieve-secrets/stop
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function finish {
echo 'Removing environment...'

rm -rf temp_clone_dir
docker-compose down -v
docker compose down -v
}

finish

0 comments on commit 782f00f

Please sign in to comment.