forked from lando/lando
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
229 lines (225 loc) · 13.1 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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
language: node_js
node_js: 12
dist: xenial
cache:
yarn: true
directories:
- node_modules
stages:
- test
- name: build
if: |
type = push AND \
tag IS blank AND \
branch != "master"
- name: deploy
if: |
type = push AND \
branch == "master" OR \
tag IS present
# Set some immportant things to help maximize our CI performance
before_install:
# Get list of files that have changed
- export LANDO_CHANGED_FILES=$(git diff --name-only $TRAVIS_COMMIT_RANGE | cat)
# Assess whether our web props have changed
- export LANDO_DOCS_CHANGED=$(echo $LANDO_CHANGED_FILES | grep -e docs/ &>/dev/null && echo true || echo false)
- export LANDO_METRICS_CHANGED=$(echo $LANDO_CHANGED_FILES | grep -e metrics/ &>/dev/null && echo true || echo false)
# Assess what parts of lando have changed
- export LANDO_CODE_CHANGED=$(echo $LANDO_CHANGED_FILES | grep -e yarn.lock -e package.json -e config.yml -e bin/ -e lib/ -e plugins/ &>/dev/null && echo true || echo false)
- export LANDO_TESTS_CHANGED=$(echo $LANDO_CHANGED_FILES | grep -e examples/ -e test/ &>/dev/null && echo true || echo false)
# Assess devops changes
- export LANDO_BUILD_CHANGED=$(echo $LANDO_CHANGED_FILES | grep -e .travis.yml -e /scripts &>/dev/null && echo true || echo false)
- export LANDO_INSTALLER_CHANGED=$(echo $LANDO_CHANGED_FILES | grep -e /installer -e /scripts &>/dev/null && echo true || echo false)
# Check the status of the important things
- env | grep LANDO_
- ./scripts/travis-env.sh
- mkdir -p release
# Run some sanity checks
before_script:
- node --version
- yarn --version
install: yarn
jobs:
include:
# Tests
- name: Linting and Unit Tests - macOS
os: osx
osx_image: xcode11.2
before_script: node bin/lando.js version
script:
- yarn lint
- yarn lint:sites
- yarn test:unit
- name: Linting and Unit Tests - Windoze
os: windows
env: YARN_GPG=no GRADLE_OPTS=-Dorg.gradle.daemon=false
before_script: node bin/lando.js version
script:
- yarn lint
- yarn lint:sites
- yarn test:unit
- stage: test
name: Linting and Unit Tests - Linux
before_script: node bin/lando.js version
script:
- yarn lint
- yarn lint:sites
- yarn test:unit
# Build tests
- stage: build
name: Test Build - macOS packages
os: osx
osx_image: xcode11.2
env: APPLE_NO_NOTARIZE=notgonnadoit
script:
- if [[ "$LANDO_CODE_CHANGED" == "true" ]] ; then yarn pkg:cli; fi
- if [[ "$LANDO_CODE_CHANGED" == "true" ]] ; then ./dist/cli/lando-* version; fi
- if [[ "$LANDO_INSTALLER_CHANGED" == "true" ]] ; then yarn pkg:full; fi
- name: Test Build - Windoze packages
os: windows
env: YARN_GPG=no GRADLE_OPTS=-Dorg.gradle.daemon=false
before_script: |
if [[ "$LANDO_INSTALLER_CHANGED" == "true" ]] ; then
git config --global core.autocrlf true
choco install -y innosetup --version=6.0.3 --allow-empty-checksums
choco install -y windows-sdk-10.1
fi
script:
- if [[ "$LANDO_CODE_CHANGED" == "true" ]] ; then yarn pkg:cli; fi
- if [[ "$LANDO_CODE_CHANGED" == "true" ]] ; then ./dist/cli/lando-* version; fi
- if [[ "$LANDO_INSTALLER_CHANGED" == "true" ]] ; then yarn pkg:full; fi
- name: Test Build - Linux packages
script:
- if [[ "$LANDO_CODE_CHANGED" == "true" ]] ; then yarn pkg:cli; fi
- if [[ "$LANDO_CODE_CHANGED" == "true" ]] ; then ./dist/cli/lando-* version; fi
- if [[ "$LANDO_INSTALLER_CHANGED" == "true" ]] ; then yarn pkg:full; fi
- name: Test Build - Documentation
# get below compatible with node 12?
node_js: 10
script: if [[ "$LANDO_DOCS_CHANGED" == "true" ]] ; then yarn build:docs; fi
- name: Test Build - Metrics server
script: if [[ "$LANDO_METRICS_CHANGED" == "true" ]] ; then true; fi
- name: Test Deploy - S3
install: skip
script: touch release/test
deploy:
provider: s3
access_key_id: AKIAJXCGUYNMSXQPAKYQ
secret_access_key:
secure: HstC04mBeuucF2PseyrNLXGZlt5WQ23iwWRrkh4rWTuqq2F4tKkTc+pCB6+Kx64ZE3OGx5T2KdyPOPhLYJOPmYhtTtE0RFI4oF2kEUxvLjTRLrXqDNHKL47PZ5Vel4Z/MTTfWka0M7wCxslBsbomPhO3ljUxlcqChqsh+VT+3JEFYJw4JmEbWHGQ/GnIdTkAksvMfiOFbZHGK+14NjKic9BOwqeBiItSLcydAzURKZOUmcp+u5dNGhHuM+fb98zenhxFIMp75ErwiENv5ER1ja42C+Hyveu3wWc/QIlZHarMULRlH+Zq3yDUCOeOoFjIgeb+H7MGVots8igGIZ4h17/eU8lAO6uRYLLKup/T87CH82VjMDYEDbwsr3XM6f20q/5Fk2dr1XLo+xwhFadIlpJgsbPpmGHu+QuuYczlqdGzw3Qn1IAzU9L7aitjmNQ1ReSGySjlD8sN0nNT7OJYW/4cdy9+RcoYpH4+dbNzjq9DXubJe1EeYQagd/7ebnHvazg5/5Av2whn/F5YjObwno+JrEDzgD2H0pOWfEVBjGT1uOaDIO7Itn1KTJl+gV9Uv+QJ0G/1wP3fnL3KOzMqqFATubtgBUqe12VQ39jUALmgfBKEdXMF2tojwtHkP4b+vQUszpkGxpNih4JmyJYEgc0CZTSNxQP0m+j+3HH/jDc=
bucket: files.devwithlando.io
local-dir: release
acl: public_read
region: us-west-2
skip_cleanup: true
# Build and deploy macOS
- stage: Deploy
name: macOS Packages
os: osx
osx_image: xcode11.2
script:
- if [ -z "$TRAVIS_TAG" ]; then node ./scripts/dev-version.js; fi
- yarn pkg:full
- cp -rf dist/lando.dmg release/lando-latest-dev.dmg
- cp -rf dist/lando.dmg release/lando-$TRAVIS_COMMIT-dev.dmg
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.dmg release/lando-$TRAVIS_TAG.dmg; fi
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.dmg release/lando-stable.dmg; fi
deploy:
- provider: s3
access_key_id: AKIAJXCGUYNMSXQPAKYQ
secret_access_key:
secure: HstC04mBeuucF2PseyrNLXGZlt5WQ23iwWRrkh4rWTuqq2F4tKkTc+pCB6+Kx64ZE3OGx5T2KdyPOPhLYJOPmYhtTtE0RFI4oF2kEUxvLjTRLrXqDNHKL47PZ5Vel4Z/MTTfWka0M7wCxslBsbomPhO3ljUxlcqChqsh+VT+3JEFYJw4JmEbWHGQ/GnIdTkAksvMfiOFbZHGK+14NjKic9BOwqeBiItSLcydAzURKZOUmcp+u5dNGhHuM+fb98zenhxFIMp75ErwiENv5ER1ja42C+Hyveu3wWc/QIlZHarMULRlH+Zq3yDUCOeOoFjIgeb+H7MGVots8igGIZ4h17/eU8lAO6uRYLLKup/T87CH82VjMDYEDbwsr3XM6f20q/5Fk2dr1XLo+xwhFadIlpJgsbPpmGHu+QuuYczlqdGzw3Qn1IAzU9L7aitjmNQ1ReSGySjlD8sN0nNT7OJYW/4cdy9+RcoYpH4+dbNzjq9DXubJe1EeYQagd/7ebnHvazg5/5Av2whn/F5YjObwno+JrEDzgD2H0pOWfEVBjGT1uOaDIO7Itn1KTJl+gV9Uv+QJ0G/1wP3fnL3KOzMqqFATubtgBUqe12VQ39jUALmgfBKEdXMF2tojwtHkP4b+vQUszpkGxpNih4JmyJYEgc0CZTSNxQP0m+j+3HH/jDc=
bucket: files.devwithlando.io
local-dir: release
acl: public_read
region: us-west-2
skip_cleanup: true
on:
repo: lando/lando
all_branches: true
- provider: releases
api_key:
secure: UXDea6KLTOOiUaUfhYqE7stUY74VE2gOdi3No5NscD0Lg3xB/EMf1wzpVe2nuTpjn1CbDBsGXXHqRRpy2IZj6qp21D39+Wygznv9PpSGPgTAB2ZHRYhpux1Qf/HxD8R/NhvISNMXukNLyd66OyiJlz5RWoLWQvLIiJgT1Uczc3Sj8iOJOmYaxQZku/3/q/LmjKKHVJ9vq7ail4l4SoNmLqh6sdDt9utJtavWHMa0hN5kF+CwoV5Vk/z2RFzYNInGwlJggwV7Y/Kf3TmOQv0CiKgxdEQqR8LfTDGIvkxFwpPSf7JnQYnsZWcOWW08oousN7tjc1L1ow2dzPnT2zRYNyx73FwkjWtZ7SLQCkU95pq6FgSy31+w6iWU6Rvwd9mgdX4sfxgdwxLwiF38Rki5TxXtMRGWW1qYRYvnCcc7gpPUPFv0PzsQYZiFSGxMF3uKdKxmKzYd+tfCMvE5YhfkDtCM+LeJBlSL5hZspMUezXEFtiKSv7fDmBKtGGFUsEruNqMphKEbH1kY1UT9SXUu+uxWN40ciJTXfQXJAGMSh34WkZFAgEP/r61+SZDlpuyYPQ8l8fOOcX2uaJYD0LJBSERVmVAX00SNxWSVdTTGibadRXWWuJ4gd4PGCXUhSJI9r1QLfMLyZtt5P3i9SUL2X4cO9isKysBjOq/5DZXjqq0=
file: release/lando-$TRAVIS_TAG.dmg
skip_cleanup: true
on:
repo: lando/lando
tags: true
- name: Windoze Packages
os: windows
env: YARN_GPG=no GRADLE_OPTS=-Dorg.gradle.daemon=false
before_script:
- git config --global core.autocrlf true
- choco install -y innosetup --version=6.0.3 --allow-empty-checksums
- choco install -y windows-sdk-10.1
script:
- if [ -z "$TRAVIS_TAG" ]; then node ./scripts/dev-version.js; fi
- yarn pkg:full
- cp -rf dist/lando.exe release/lando-latest-dev.exe
- cp -rf dist/lando.exe release/lando-$TRAVIS_COMMIT-dev.exe
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.exe release/lando-$TRAVIS_TAG.exe; fi
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.exe release/lando-stable.exe; fi
deploy:
- provider: s3
access_key_id: AKIAJXCGUYNMSXQPAKYQ
secret_access_key:
secure: HstC04mBeuucF2PseyrNLXGZlt5WQ23iwWRrkh4rWTuqq2F4tKkTc+pCB6+Kx64ZE3OGx5T2KdyPOPhLYJOPmYhtTtE0RFI4oF2kEUxvLjTRLrXqDNHKL47PZ5Vel4Z/MTTfWka0M7wCxslBsbomPhO3ljUxlcqChqsh+VT+3JEFYJw4JmEbWHGQ/GnIdTkAksvMfiOFbZHGK+14NjKic9BOwqeBiItSLcydAzURKZOUmcp+u5dNGhHuM+fb98zenhxFIMp75ErwiENv5ER1ja42C+Hyveu3wWc/QIlZHarMULRlH+Zq3yDUCOeOoFjIgeb+H7MGVots8igGIZ4h17/eU8lAO6uRYLLKup/T87CH82VjMDYEDbwsr3XM6f20q/5Fk2dr1XLo+xwhFadIlpJgsbPpmGHu+QuuYczlqdGzw3Qn1IAzU9L7aitjmNQ1ReSGySjlD8sN0nNT7OJYW/4cdy9+RcoYpH4+dbNzjq9DXubJe1EeYQagd/7ebnHvazg5/5Av2whn/F5YjObwno+JrEDzgD2H0pOWfEVBjGT1uOaDIO7Itn1KTJl+gV9Uv+QJ0G/1wP3fnL3KOzMqqFATubtgBUqe12VQ39jUALmgfBKEdXMF2tojwtHkP4b+vQUszpkGxpNih4JmyJYEgc0CZTSNxQP0m+j+3HH/jDc=
bucket: files.devwithlando.io
local-dir: release
acl: public_read
region: us-west-2
skip_cleanup: true
on:
repo: lando/lando
all_branches: true
- provider: releases
api_key:
secure: UXDea6KLTOOiUaUfhYqE7stUY74VE2gOdi3No5NscD0Lg3xB/EMf1wzpVe2nuTpjn1CbDBsGXXHqRRpy2IZj6qp21D39+Wygznv9PpSGPgTAB2ZHRYhpux1Qf/HxD8R/NhvISNMXukNLyd66OyiJlz5RWoLWQvLIiJgT1Uczc3Sj8iOJOmYaxQZku/3/q/LmjKKHVJ9vq7ail4l4SoNmLqh6sdDt9utJtavWHMa0hN5kF+CwoV5Vk/z2RFzYNInGwlJggwV7Y/Kf3TmOQv0CiKgxdEQqR8LfTDGIvkxFwpPSf7JnQYnsZWcOWW08oousN7tjc1L1ow2dzPnT2zRYNyx73FwkjWtZ7SLQCkU95pq6FgSy31+w6iWU6Rvwd9mgdX4sfxgdwxLwiF38Rki5TxXtMRGWW1qYRYvnCcc7gpPUPFv0PzsQYZiFSGxMF3uKdKxmKzYd+tfCMvE5YhfkDtCM+LeJBlSL5hZspMUezXEFtiKSv7fDmBKtGGFUsEruNqMphKEbH1kY1UT9SXUu+uxWN40ciJTXfQXJAGMSh34WkZFAgEP/r61+SZDlpuyYPQ8l8fOOcX2uaJYD0LJBSERVmVAX00SNxWSVdTTGibadRXWWuJ4gd4PGCXUhSJI9r1QLfMLyZtt5P3i9SUL2X4cO9isKysBjOq/5DZXjqq0=
file: release/lando-$TRAVIS_TAG.exe
skip_cleanup: true
on:
repo: lando/lando
tags: true
- name: Linux Packages
script:
- if [ -z "$TRAVIS_TAG" ]; then node ./scripts/dev-version.js; fi
- yarn pkg:full
# debian
- cp -rf dist/lando.deb release/lando-latest-dev.deb
- cp -rf dist/lando.deb release/lando-$TRAVIS_COMMIT-dev.deb
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.deb release/lando-$TRAVIS_TAG.deb; fi
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.deb release/lando-stable.deb; fi
# pacman
- cp -rf dist/lando.pacman release/lando-latest-dev.pacman
- cp -rf dist/lando.pacman release/lando-$TRAVIS_COMMIT-dev.pacman
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.pacman release/lando-$TRAVIS_TAG.pacman; fi
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.pacman release/lando-stable.pacman; fi
# rpm
- cp -rf dist/lando.rpm release/lando-latest-dev.rpm
- cp -rf dist/lando.rpm release/lando-$TRAVIS_COMMIT-dev.rpm
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.rpm release/lando-$TRAVIS_TAG.rpm; fi
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/lando.rpm release/lando-stable.rpm; fi
deploy:
- provider: s3
access_key_id: AKIAJXCGUYNMSXQPAKYQ
secret_access_key:
secure: HstC04mBeuucF2PseyrNLXGZlt5WQ23iwWRrkh4rWTuqq2F4tKkTc+pCB6+Kx64ZE3OGx5T2KdyPOPhLYJOPmYhtTtE0RFI4oF2kEUxvLjTRLrXqDNHKL47PZ5Vel4Z/MTTfWka0M7wCxslBsbomPhO3ljUxlcqChqsh+VT+3JEFYJw4JmEbWHGQ/GnIdTkAksvMfiOFbZHGK+14NjKic9BOwqeBiItSLcydAzURKZOUmcp+u5dNGhHuM+fb98zenhxFIMp75ErwiENv5ER1ja42C+Hyveu3wWc/QIlZHarMULRlH+Zq3yDUCOeOoFjIgeb+H7MGVots8igGIZ4h17/eU8lAO6uRYLLKup/T87CH82VjMDYEDbwsr3XM6f20q/5Fk2dr1XLo+xwhFadIlpJgsbPpmGHu+QuuYczlqdGzw3Qn1IAzU9L7aitjmNQ1ReSGySjlD8sN0nNT7OJYW/4cdy9+RcoYpH4+dbNzjq9DXubJe1EeYQagd/7ebnHvazg5/5Av2whn/F5YjObwno+JrEDzgD2H0pOWfEVBjGT1uOaDIO7Itn1KTJl+gV9Uv+QJ0G/1wP3fnL3KOzMqqFATubtgBUqe12VQ39jUALmgfBKEdXMF2tojwtHkP4b+vQUszpkGxpNih4JmyJYEgc0CZTSNxQP0m+j+3HH/jDc=
bucket: files.devwithlando.io
local-dir: release
acl: public_read
region: us-west-2
skip_cleanup: true
on:
repo: lando/lando
all_branches: true
- provider: releases
api_key:
secure: UXDea6KLTOOiUaUfhYqE7stUY74VE2gOdi3No5NscD0Lg3xB/EMf1wzpVe2nuTpjn1CbDBsGXXHqRRpy2IZj6qp21D39+Wygznv9PpSGPgTAB2ZHRYhpux1Qf/HxD8R/NhvISNMXukNLyd66OyiJlz5RWoLWQvLIiJgT1Uczc3Sj8iOJOmYaxQZku/3/q/LmjKKHVJ9vq7ail4l4SoNmLqh6sdDt9utJtavWHMa0hN5kF+CwoV5Vk/z2RFzYNInGwlJggwV7Y/Kf3TmOQv0CiKgxdEQqR8LfTDGIvkxFwpPSf7JnQYnsZWcOWW08oousN7tjc1L1ow2dzPnT2zRYNyx73FwkjWtZ7SLQCkU95pq6FgSy31+w6iWU6Rvwd9mgdX4sfxgdwxLwiF38Rki5TxXtMRGWW1qYRYvnCcc7gpPUPFv0PzsQYZiFSGxMF3uKdKxmKzYd+tfCMvE5YhfkDtCM+LeJBlSL5hZspMUezXEFtiKSv7fDmBKtGGFUsEruNqMphKEbH1kY1UT9SXUu+uxWN40ciJTXfQXJAGMSh34WkZFAgEP/r61+SZDlpuyYPQ8l8fOOcX2uaJYD0LJBSERVmVAX00SNxWSVdTTGibadRXWWuJ4gd4PGCXUhSJI9r1QLfMLyZtt5P3i9SUL2X4cO9isKysBjOq/5DZXjqq0=
file:
- release/lando-$TRAVIS_TAG.deb
- release/lando-$TRAVIS_TAG.pacman
- release/lando-$TRAVIS_TAG.rpm
skip_cleanup: true
on:
repo: lando/lando
tags: true