Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): docker-compose possibly causing issues #196

Merged
merged 1 commit into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,10 @@ If you are running more than one Pact Broker Docker container at a time for the
You can see a working example in the [docker-compose-clean.yml](./docker-compose-clean.yml) file. To run the example locally, run:

```
docker-compose -f docker-compose-clean.yml up pact-broker
docker compose -f docker-compose-clean.yml up pact-broker

# in another console
docker-compose -f docker-compose-clean.yml up clean
docker compose -f docker-compose-clean.yml up clean
```

### Known issues with the data clean up task
Expand All @@ -173,8 +173,8 @@ For a quick start with the Pact Broker and Postgres, we have an example
[Docker Compose][docker-compose] setup you can use:

1. Modify the `docker-compose.yml` file as required.
2. Run `docker-compose build` to build the pact_broker container locally.
3. Run `docker-compose up` to get a running Pact Broker and a clean Postgres database.
2. Run `docker compose build` to build the pact_broker container locally.
3. Run `docker compose up` to get a running Pact Broker and a clean Postgres database.

Now you can access your local broker:

Expand Down
2 changes: 1 addition & 1 deletion example-k8s-deployment/infrastructure/deploy_cfn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
stack=$1
env=$2

docker-compose run --rm stackup-"$env" pact-broker-"$stack" up \
docker compose run --rm stackup-"$env" pact-broker-"$stack" up \
-t infrastructure/"$stack"/template.yaml \
-p infrastructure/"$stack"/envs/common.yaml \
-p infrastructure/"$stack"/envs/"$env".yaml
10 changes: 5 additions & 5 deletions script/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,23 @@ for file in $docker_compose_files; do
done

cleanup() {
docker-compose -f docker-compose-tests.yml rm -fv || true
docker-compose -f docker-compose-test-different-env-var-names.yml rm -fv || true
docker compose -f docker-compose-tests.yml rm -fv || true
docker compose -f docker-compose-test-different-env-var-names.yml rm -fv || true
}
trap cleanup EXIT

cleanup

docker-compose -f docker-compose-tests.yml up --build --abort-on-container-exit --exit-code-from sut --remove-orphans
docker compose -f docker-compose-tests.yml up --build --abort-on-container-exit --exit-code-from sut --remove-orphans
cleanup

export PACT_BROKER_BASIC_AUTH_USERNAME=foo
export PACT_BROKER_BASIC_AUTH_PASSWORD=bar
export PACT_BROKER_PUBLIC_HEARTBEAT=true
docker-compose -f docker-compose-tests.yml up --build --abort-on-container-exit --exit-code-from sut --remove-orphans
docker compose -f docker-compose-tests.yml up --build --abort-on-container-exit --exit-code-from sut --remove-orphans

unset PACT_BROKER_BASIC_AUTH_USERNAME
unset PACT_BROKER_BASIC_AUTH_PASSWORD
unset PACT_BROKER_PUBLIC_HEARTBEAT

docker-compose -f docker-compose-test-different-env-var-names.yml up --build --abort-on-container-exit --exit-code-from sut --remove-orphans
docker compose -f docker-compose-test-different-env-var-names.yml up --build --abort-on-container-exit --exit-code-from sut --remove-orphans
Loading