-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
42 lines (42 loc) · 1.37 KB
/
bitbucket-pipelines.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
image: docker:stable
options:
docker: true
pipelines:
default:
- parallel:
- step:
name: API Tests
script:
- apk add --no-cache py-pip bash
- pip install --no-cache-dir docker-compose
- docker-compose run api_test
- step:
name: Client Tests
script:
- apk add --no-cache py-pip bash
- pip install --no-cache-dir docker-compose
- docker-compose run cli
branches:
master:
- parallel:
- step:
name: API Tests
script:
- apk add --no-cache py-pip bash
- pip install --no-cache-dir docker-compose
- docker-compose run api_test
- step:
name: Client Tests
script:
- apk add --no-cache py-pip bash
- pip install --no-cache-dir docker-compose
- docker-compose run cli
- step:
name: Push to Docker Hub
script:
- export RELEASE=$(cat version.txt)
- docker login -u $DOCKER_USERNAME -p "$DOCKER_PASSWORD"
- docker build --target production -t pingaling/server:$RELEASE.$BITBUCKET_BUILD_NUMBER -f api/Dockerfile .
- docker tag pingaling/server:$RELEASE.$BITBUCKET_BUILD_NUMBER pingaling/server:$RELEASE
- docker push pingaling/server:$RELEASE.$BITBUCKET_BUILD_NUMBER
- docker push pingaling/server:$RELEASE