-
Notifications
You must be signed in to change notification settings - Fork 41
/
wercker.yml
95 lines (86 loc) · 2.79 KB
/
wercker.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
# This references the default nodejs container from
# the Docker Hub: https://registry.hub.docker.com/_/node/
# If you want Nodesource's container you would reference nodesource/node
# Read more about containers on our dev center
# http://devcenter.wercker.com/docs/containers/index.html
box: garthk/node-for-headless-webgl
# This is the build pipeline. Pipelines are the core of wercker
# Read more about pipelines on our dev center
# http://devcenter.wercker.com/docs/pipelines/index.html
# You can also use services such as databases. Read more on our dev center:
# http://devcenter.wercker.com/docs/services/index.html
# services:
# - postgres
# http://devcenter.wercker.com/docs/services/postgresql.html
# - mongodb
# http://devcenter.wercker.com/docs/services/mongodb.html
build:
# The steps that will be executed on build
# Steps make up the actions in your pipeline
# Read more about steps on our dev center:
# http://devcenter.wercker.com/docs/steps/index.html
steps:
# A custom script step, name value is used in the UI
# and the code value contains the command that get executed
# Install system dependencies
- script:
name: install system dependencies
code: |
sudo apt-get -y install build-essential libxi-dev libglu1-mesa-dev libglew-dev
# Output our Node.js and npm versions
- script:
name: echo nodejs information
code: |
echo "node version $(node -v) running"
echo "npm version $(npm -v) running"
# Configure npm to allow root scripts
- script:
name: enable root/sudo for npm
code: |
# https://docs.npmjs.com/misc/config#unsafe-perm
npm config set unsafe-perm true
# A step that builds everything
- script:
name: build everything
code: |
./build.sh
# Generate relevant artifacts
- script:
name: build release code
code: |
cd client
./build.sh
NODE_ENV=prod npm run build -- --out=build-min
cd ..
# Copy STK to dist directory
- script:
name: create distribution
code: |
mkdir dist
cp client/build/STK.bundle.js dist/STK.bundle.js
cp client/build-min/STK.bundle.js dist/STK.bundle.min.js
test-client:
steps:
# A step that executes `npm test` command in client
- npm-test:
cwd: client/
test-server:
steps:
# A step that executes `npm test` command in server
- npm-test:
cwd: server/
lint:
steps:
- script:
name: run linter on code
code: |
npm run lint
cwd: client/
deploy:
steps:
# Deploy to github as 'latest' release
- tcnksm/ghr:
token: $GITHUB_TOKEN
input: $WERCKER_SOURCE_DIR/dist/
version: latest
replace: true