forked from RocketChat/Rocket.Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
61 lines (57 loc) · 1.57 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
---
# image: node:8
# NOTE: this script is specifically authored for runner at naudb 196 server
# EXECUTOR: shell
cache:
untracked: false
key: "GOALIFY-CHAT-SERVER-V2"
paths:
- node_modules
stages:
- test
- build
test:
stage: test
except:
- master
before_script:
- node -v
- npm -v
script:
- npm install
- npm run lint
- npm run testunit
- npm run stylelint
build:
# variables: AWS_ACCESS_KEY_ID & AWS_SECRET_ACCESS_KEY set in gitlab CI settings
stage: build
only:
- master
before_script:
- export ROOT=`pwd`
- export OUTPUT=$ROOT/build/
# This flag is a MUST to fix out-of-memory issue when building in docker / gitlab ci
- export TOOL_NODE_FLAGS="--max-old-space-size=3063"
# prepare needed software (not applicable for shell executor)
# - sudo apt-get update -y
# - sudo apt-get install -y python git openssh-client curl build-essential
# - sudo npm i -g npm
- node -v
- npm -v
# Remove previous output
- rm -rf $OUTPUT || true
script:
# Install meteor VM (not applicable for shell executor)
# - if [ ! -e "/usr/local/bin/meteor" ]; then curl https://install.meteor.com | sed s/--progress-bar/-sL/g | /bin/sh; fi
# install aws CLI to do S3 deploy
- pip install awscli --upgrade --user
- meteor --version
- meteor npm install
- mkdir -p $OUTPUT
- meteor build --server-only $OUTPUT
- cd $OUTPUT
- mv Goalify.Chat.tar.gz goalify-chat-server.tar.gz
- aws s3 cp *.gz s3://goalify.chat/downloads/beta/
artifacts:
paths:
- build/*.gz