-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathdocker-compose-verify.yml
More file actions
31 lines (29 loc) · 1007 Bytes
/
docker-compose-verify.yml
File metadata and controls
31 lines (29 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
version: "3"
services:
api:
image: ruby:3.4-alpine
environment:
# Setting the response body as an environment variable is just a way
# to get around the multiple layers of nested quotes in the command!
RESPONSE_BODY: "{\"id\": \"1\", \"name\": \"Foo\"}"
command: sh -c "gem install webrick -v 1.8.1 && gem install rack -v 2.2.7 && rackup -o 0.0.0.0 -b \"run ->(env){ [200, {'Content-Type' => 'application/json'}, [ENV['RESPONSE_BODY']]] }\""
expose:
- "9292"
pact_verifier:
image: pactfoundation/pact-cli:0.56.0-pactcli0.56.0
depends_on:
- api
environment:
- PACT_BROKER_BASE_URL
- PACT_BROKER_USERNAME
- PACT_BROKER_PASSWORD
- PACT_BROKER_PUBLISH_VERIFICATION_RESULTS
- GIT_COMMIT
- GIT_BRANCH
command: >
verify
--provider-base-url http://api:9292
--provider docker-example-provider
--provider-app-version ${GIT_COMMIT}
--provider-version-tag ${GIT_BRANCH}
--wait 20