-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
49 lines (45 loc) · 1.44 KB
/
.gitlab-ci.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
stages:
- build
- deploy
include:
- project: 'service/devops'
ref: master
file: 'build/backend/.gitlab-ci.yml'
.deploy:
stage: deploy
before_script:
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
develop:
extends: .deploy
variables:
DOCKER_APP_INSTANCE: develop
environment:
name: develop
url: https://645-comboard.pixelplex-test.by/api
script:
- docker-compose pull
- MIGRATION_RESULT=$(docker-compose run migrate)
- export SIDECHAIN_ADDRESS=$(echo \"$MIGRATION_RESULT\" | perl -lne '/SideChain.*contract address:\s+(0x.{40})/ && print $1')
- sed -i "s/0xc87395b45C1c199F25a6c2Be43515C41d53751Af/$SIDECHAIN_ADDRESS/g" ./genesis.json
- docker-compose -p 645-comboard up -d ganache bitcoin echo influxdb redis web celery
only:
- develop
tags:
- pp-new-develop
master:
extends: .deploy
variables:
DOCKER_APP_INSTANCE: master
environment:
name: develop
url: https://645-comboard.pixelplexlabs.com/api
script:
- docker-compose pull
- MIGRATION_RESULT=$(docker-compose run migrate)
- export SIDECHAIN_ADDRESS=$(echo \"$MIGRATION_RESULT\" | perl -lne '/SideChain.*contract address:\s+(0x.{40})/ && print $1')
- sed -i "s/0xc87395b45C1c199F25a6c2Be43515C41d53751Af/$SIDECHAIN_ADDRESS/g" ./genesis.json
- docker-compose -p 645-comboard up -d ganache bitcoin echo influxdb redis web celery
only:
- master
tags:
- pp-stage