-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
executable file
·110 lines (105 loc) · 3.13 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
stages:
- build
- deploy
build_dev:
image: node:latest
stage: build
only:
- dev
environment:
name: dev
variables:
APP_NAME: '"Seeds Simulation Dev"'
NETWORK_BLOCKCHAIN: '"eos"'
NETWORK_CHAIN_ID: '"1eaa0824707c8c16bd25145493bf062aecddfeb56c736f6ba6397f3195f33c9f"'
NETWORK_HOST: '"testnet.telos.caleos.io"'
NETWORK_PORT: '443'
NETWORK_PROTOCOL: '"https"'
WEBSERVICES_URL: '"https://fqbkgjgig0.execute-api.eu-west-1.amazonaws.com/dev"'
WEBSERVICES_API_KEY: '"Zo3L4h85H4TxltCRRrJR70SIfVSWQJW15MbwsTzg"'
BASE_REPOSITORY_URL: '"https://seeds-simulations-dev.s3-eu-west-1.amazonaws.com"'
RETRY_DELAY: '5000'
WAKE_DB_TIME: '15'
cache:
paths:
- node_modules/
script:
# Install vuecli
- yarn global add @quasar/cli
# Install dependencies
- yarn install
# Deploy chain manifests config file based on env
- mv src/statics/chain-manifests-dev.json src/statics/chain-manifests.json
# Build App
- yarn build
artifacts:
paths:
# Build folder
- dist/
expire_in: 1 hour
build_prod:
image: node:latest
stage: build
only:
- master
environment:
name: production
variables:
APP_NAME: '"Seeds Simulation"'
NETWORK_BLOCKCHAIN: '"eos"'
NETWORK_CHAIN_ID: '"4667b205c6838ef70ff7988f6e8257e8be0e1284a2f59699054a018f743b1d11"'
NETWORK_HOST: '"telos.caleos.io"'
NETWORK_PORT: '443'
NETWORK_PROTOCOL: '"https"'
WEBSERVICES_URL: '"https://fqbkgjgig0.execute-api.eu-west-1.amazonaws.com/dev"'
WEBSERVICES_API_KEY: '"Zo3L4h85H4TxltCRRrJR70SIfVSWQJW15MbwsTzg"'
BASE_REPOSITORY_URL: '"https://seeds-simulations-dev.s3-eu-west-1.amazonaws.com"'
RETRY_DELAY: '5000'
WAKE_DB_TIME: '15'
cache:
paths:
- node_modules/
script:
# Install vuecli
- yarn global add @quasar/cli
# Install dependencies
- yarn install
# Deploy chain manifests config file based on env
- mv src/statics/chain-manifests-prod.json src/statics/chain-manifests.json
# Build App
- yarn build
artifacts:
paths:
# Build folder
- dist/
expire_in: 1 hour
deploy_dev:
image: python:latest
stage: deploy
only:
- dev
environment:
name: dev
script:
- echo $CI_ENVIRONMENT_NAME
- pip install awscli
- aws configure set aws_access_key_id $AWS_KEY
- aws configure set aws_secret_access_key $AWS_SECRET
- aws s3 rm s3://seeds-simulation-dev
- aws s3 sync ./dist/spa s3://seeds-simulation-dev
- aws cloudfront create-invalidation --distribution-id $AWS_DIST_ID --paths "/*"
deploy_prod:
image: python:latest
stage: deploy
only:
- master
environment:
name: production
script:
- echo $CI_ENVIRONMENT_NAME
- pip install awscli
- aws configure set aws_access_key_id $AWS_KEY
- aws configure set aws_secret_access_key $AWS_SECRET
- aws s3 rm s3://seeds-simulation-prod
- aws s3 sync ./dist/spa s3://seeds-simulation-prod
- aws cloudfront create-invalidation --distribution-id $AWS_DIST_ID --paths "/*"