forked from realiotech/big-dipper-2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbitbucket-pipelines.yml
34 lines (33 loc) · 1.69 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
image: node:14.5.0
pipelines:
branches:
staging:
- step:
script:
- docker login $DOCKER_REGISTRY -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD
- docker build --build-arg=GIT_COMMIT=$BITBUCKET_COMMIT -t $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT -f Dockerfile-bitbucket .
- docker tag $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:latest
- docker push $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:latest
- docker push $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT
- git remote add sync [email protected]:realiotech/big-dipper-2.git
- git checkout -b chains/realionetwork/testnet
- git push sync chains/realionetwork/testnet
services:
- docker
caches:
- docker
master:
- step:
script:
- docker login $DOCKER_REGISTRY -u $DOCKER_REGISTRY_USER -p $DOCKER_REGISTRY_PASSWORD
- docker build --build-arg=GIT_COMMIT=$BITBUCKET_COMMIT -t $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT -f Dockerfile-bitbucket .
- docker tag $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:prod
- docker push $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:prod
- docker push $DOCKER_REGISTRY/$BITBUCKET_REPO_SLUG:$BITBUCKET_COMMIT
- git remote add sync [email protected]:realiotech/big-dipper-2.git
- git checkout -b chains/realionetwork/mainnet
- git push sync chains/realionetwork/mainnet
services:
- docker
caches:
- docker