forked from SchweizerischeBundesbahnen/scion-workbench
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
173 lines (173 loc) · 8.08 KB
/
.travis.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
# This file contains instructions for the build server Travis
# The build is running on https://travis-ci.com/.
sudo: required
dist: trusty
language: node_js
node_js:
- '8'
env:
global:
- BETA_RC_TAG_REGEX="^[0-9]+.[0-9]+.[0-9]+-" # Matches 'next' versions x.x.x-beta and x.x.x-rc (npm tag: next)
- RELEASE_TAG_REGEX="^[0-9]+.[0-9]+.[0-9]+$" # Matches 'stable' versions x.x.x (npm tag: latest)
- secure: "W2MbFhPYKn4nBzW9uV5GlRBU7Bsml3CA2sGapskwHouAW/5KApc8OPirhlu37LdUKaPmJwacWOugK9SPU5Fh2kBEad4ktlyVpbwIbzt3R29EpdolnaeUX2cpGfqUWxSN3EA02mlKyExfTQL7AYJlrysgVc+5D1FyvZQ/Ej4sw8NvbUbuRxUXiOCP9FpZ3GYa3Tprl3cfQpgHPUqxO64kvym1kZZAYXkrLiidGA5riiWyY8b4waBv7cg+tpYzsqkPCSdlnTaisy1Lo5vMaAXsKroWnJHRH6ONPJr8qw1YmffSslpXYeENDKJQNKPdd9i5M56Vq7sV2jHb9vWP8CdOUxO9298pC6ymQ28EJFttEG/0CrLCZdkDbf9HcKy6ZygOyrow/FDOaOCJSilNzecfeNJmF5Av+tt7tg4zSLVK33mKFJSrrPvalG44iIHIgHHWd8LOGAy7k4pzquW1zbTVMqcqctYxUWYTy8s2r/7Nxy/f0bdb5XHwj91TOnp8+mSR1FI8UGgvmc8Y8BuXSwz9cdihX6nM7u+gVpEwgRpelej05dathtmUtuSTAZBdETBspFrCCjzSy7J/9M5/nVXArf875qzqWfj4/KNqqAeg/YNWdI2wlW90JQgt5msOe1awwuWttFVyO3mdT6gvkaPrkpxbDW/yHgr8pXiGIHm1iAE=" # $NOW_TOKEN
- secure: "S3fGMms92geqAHCJXPhN66iLGYh18NOXYHLjb7Jwg/ohLWhAUcFkn04NkeS0QXXmQGVPzqITddT20PMBcyEE8MJVRpY4s89VCLORxI8qeNcf3FiG/Rk5zGQ3hvf+kzjupWXutHKLXZLL+mWiKM9HNfvLqumDC71J+fYmOuDwGVXRKw4elscTmyVaqoPkqS7i4cfJCynbTPRDgB57vLxJCARuRt95m685MAezg/F8h1V4/9LK2Ko347Khn3KUNPl1f3L1puGiHYtEdtU9f+WzBgmKEgJIEjxuoJqEsWAuKu0aew5bl/pWwtDRc9z6PF1atyR64rrvTeKUrfKEsFgN41x7k7gs1hZmgVsYzpwN+PTeK3H+Egfp1kTjIix4MwpbT9Eyb+unRPmyxypIMeCLGHXb8JBFOSBjDpHG7NeySVfFkSu5po495W7wMVgE7GMdrDjQTBfTrja4oHKnfi4PmYzWEcVASYCrFKYnZPkb7NJhWz4gArS4F+juxfwbMSDL96dWTTbB9b+MXgkB0l14lYlLE8Xi0dXIwoRGVNc1eJ8yf3zeQgaLGbdkSAeJ45w9tnylRIQDf5roEHS//UQ1TGGuv4tvgwr4VC1jn+sE9U9sh/LuReL5/XF2YtfZClQsAmwOmxPN62hA+8JL8Zbo523Zbyi9fEXYIca5DdsRH6E=" # $NPM_TOKEN
install:
- npm install
jobs:
include:
- stage: "Lint stage"
name: "lints all libraries"
script:
- npm run lint
-
name: "lints all applications"
script:
- npm run app:workbench-application-platform:lint
- stage: "Build stage"
name: "builds all, tests all, deploys demo apps (if branch=master) to 'https://zeit.co/scion', publishes libraries to NPM (if branch=master AND if release tag)"
script:
- npm run build
- npm run test
- npm run app:workbench-application-platform:build-now
- npm run app:workbench-application-platform:e2e
deploy:
- provider: script
script: bash ./travis-scripts/now-deploy.sh $TRAVIS_BUILD_DIR dist/app/workbench-application-platform/host-app $NOW_TOKEN
skip_cleanup: true
on:
branch: master
- provider: script
script: bash ./travis-scripts/now-deploy.sh $TRAVIS_BUILD_DIR dist/app/workbench-application-platform/contact-app $NOW_TOKEN
skip_cleanup: true
on:
branch: master
- provider: script
script: bash ./travis-scripts/now-deploy.sh $TRAVIS_BUILD_DIR dist/app/workbench-application-platform/communication-app $NOW_TOKEN
skip_cleanup: true
on:
branch: master
- provider: script
script: bash ./travis-scripts/now-deploy.sh $TRAVIS_BUILD_DIR dist/app/workbench-application-platform/dev-tools-app $NOW_TOKEN
skip_cleanup: true
on:
branch: master
# Publish @scion/mouse-dispatcher
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/mouse-dispatcher $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/mouse-dispatcher $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/dimension
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/dimension $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/dimension $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/viewport
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/viewport $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/viewport $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/workbench
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/workbench-application-platform.api
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application-platform.api $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application-platform.api $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/workbench-application-platform
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application-platform $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application-platform $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/workbench-application.core
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application.core $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application.core $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"
# Publish @scion/workbench-application.angular
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application.angular $NPM_TOKEN "--tag next"
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $BETA_RC_TAG_REGEX"
- provider: script
script: bash ./travis-scripts/npm-publish.sh $TRAVIS_BUILD_DIR dist/scion/workbench-application.angular $NPM_TOKEN
skip_cleanup: true
on:
branch: master
tags: true
condition: "$TRAVIS_TAG =~ $RELEASE_TAG_REGEX"