forked from Minds/front
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
52 lines (47 loc) · 1.23 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
image: markharding/minds-front-base
services:
- docker:dind
stages:
- test
- build
- deploy
test:
image: circleci/node:8-browsers
stage: test
script:
- npm install # Should be cached...
- npm run test -- --no-watch --no-progress --browsers=ChromeHeadlessCI
build:
stage: build
script:
- npm install # TODO: Why is this needed?
- npm run postinstall
- npm install -g gulp-cli
- gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en && gulp build.sass --deploy-url=https://cdn-assets.minds.com/front/dist/en ##weird build needs to be run twice for now
- sh build/base-locale.sh dist https://cdn-assets.minds.com/front/dist
- sh build/i18n-locales-all.sh dist https://cdn-assets.minds.com/front/dist
cache:
paths:
- dist
policy: push
only:
refs:
- master
- test/gitlab-ci
deploy:
stage: deploy
script:
- apk add --no-cache python py-pip
- pip install awscli
- aws s3 sync dist $REPOSITORY_URL
- aws ecs update-service --service=$SERVICE --force-new-deployment --region us-east-1 --cluster=$CLUSTER
cache:
paths:
- dist
policy: pull
only:
refs:
- master
- test/gitlab-ci
environment:
name: production