-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
56 lines (46 loc) · 1.07 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
stages:
- install
- build
# - test
- deploy
services:
- docker:dind
# Cache modules in between jobs
cache:
key: ${CI_PROJECT_NAME}
paths:
- .npm/
build:code:
stage: install
image: decentraland/ci-node:latest
variables:
PULUMI_STACK: "website-dao"
only:
- master
- staging
- release
script:
# install dependencies
- npm ci --cache .npm --prefer-offline
# setup dcl environment
- export PATH="$PATH:$HOME/.pulumi/bin"
- source dcl-env
# setup project environment
- pulumi login -c "s3://$STATE_BUCKET/"
- >
if pulumi stack select "$PULUMI_STACK-$ENVIRONMENT"; then
echo "[stack $stack] Stack exists ✅";
else
pulumi stack init "$PULUMI_STACK-$ENVIRONMENT"
echo "[stack $stack] Stack created ✅";
fi
- source ./node_modules/.bin/setup-environment
# build source
- npm run build
# push server
- dcl-lock-sync
- dcl-up $PULUMI_STACK
- dcl-sync-release
# push static
- ./node_modules/.bin/setup-bucket public
- dcl-cache-invalidation