-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (49 loc) · 1.42 KB
/
docker-compose.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
version: '3.8'
services:
publish_pacts:
image: pactfoundation/pact-cli:latest
working_dir: /app
environment:
- PACT_BROKER_BASE_URL=${PACT_BROKER_BASE_URL}
- PACT_BROKER_TOKEN=${PACT_BROKER_TOKEN}
- PACTICIPANT=${PACTICIPANT}
- VERSION=${VERSION}
- GIT_BRANCH=${GIT_BRANCH}
volumes:
- ./:/app
command: >
/bin/sh -c "pact publish /app/pacts
--consumer-app-version $${VERSION}
--branch $${GIT_BRANCH}"
can_i_deploy:
image: pactfoundation/pact-cli:latest
working_dir: /app
environment:
- PACT_BROKER_BASE_URL=${PACT_BROKER_BASE_URL}
- PACT_BROKER_TOKEN=${PACT_BROKER_TOKEN}
- PACTICIPANT=${PACTICIPANT}
- VERSION=${VERSION}
volumes:
- ./:/app
command: >
/bin/sh -c "pact broker can-i-deploy
--pacticipant $${PACTICIPANT}
--version $${VERSION}
--to-environment ${DEPLOYMENT_TARGET}
--retry-while-unknown 6
--retry-interval 10"
record_deployment:
image: pactfoundation/pact-cli:latest
working_dir: /app
environment:
- PACT_BROKER_BASE_URL=${PACT_BROKER_BASE_URL}
- PACT_BROKER_TOKEN=${PACT_BROKER_TOKEN}
- PACTICIPANT=${PACTICIPANT}
- VERSION=${VERSION}
volumes:
- ./:/app
command: >
/bin/sh -c "pact broker record-deployment
--pacticipant $${PACTICIPANT}
--version $${VERSION}
--environment ${DEPLOYMENT_TARGET}"