forked from nordicenergy/blockchain-explorer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bitbucket-pipelines.yml
executable file
·37 lines (35 loc) · 2.05 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
image: node:11.3.0
pipelines:
branches:
master:
- step:
name: Deploy
deployment: production
script:
- npm ci
- VUE_APP_NETWORK=78377 BASE_URL=/prod-explorer npm run build
- docker login bc1.nordicenergy.io:5000 -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker build -t prod-smart-contract-viewer .
- docker tag prod-smart-contract-viewer bc1.nordicenergy.io:5000/prod-smart-contract-viewer
- docker push bc1.nordicenergy.io:5000/prod-smart-contract-viewer
- ssh [email protected] "docker pull bc1.nordicenergy.io:5000/prod-smart-contract-viewer"
- ssh [email protected] "docker stop prod-smart-contract-viewer || true"
- ssh [email protected] "docker rm prod-smart-contract-viewer || true"
- ssh [email protected] "docker run --network nginx --network-alias prod-smart-contract-viewer --name prod-smart-contract-viewer -d bc1.nordicenergy.io:5000/prod-smart-contract-viewer"
staging:
- step:
name: Deploy
deployment: staging
script:
- npm ci
- VUE_APP_NETWORK=54084 BASE_URL=/explorer npm run build
- docker login bc1.nordicenergy.io:5000 -u $DOCKER_USER -p $DOCKER_PASSWORD
- docker build -t smart-contract-viewer .
- docker tag smart-contract-viewer bc1.nordicenergy.io:5000/smart-contract-viewer
- docker push bc1.nordicenergy.io:5000/smart-contract-viewer
- ssh [email protected] "docker pull bc1.nordicenergy.io:5000/smart-contract-viewer"
- ssh [email protected] "docker stop smart-contract-viewer || true"
- ssh [email protected] "docker rm smart-contract-viewer || true"
- ssh [email protected] "docker run --network nginx --network-alias smart-contract-viewer --name smart-contract-viewer -d bc1.nordicenergy.io:5000/smart-contract-viewer"
options:
docker: true