This repository has been archived by the owner on Oct 26, 2021. It is now read-only.
/
.travis.yml
98 lines (83 loc) · 2.59 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
language: node_js
sudo: required
matrix:
include:
- os: linux
env: KBOX_PKG_TYPE=rpm KBOX_SUDO_PASSWORD=
node_js: '4.2'
- os: linux
env: KBOX_PKG_TYPE=deb KBOX_SUDO_PASSWORD=
node_js: '4.2'
- os: osx
env: KBOX_PKG_TYPE=dmg KBOX_SUDO_PASSWORD=
node_js: '4.2'
services:
- docker
before_install:
# Install some node deps
- npm install -g grunt-cli bower
# We need sass to build the GUI
- gem install sass
before_script:
# Edit the package.json if this isn't an official release
- if [ -z "$TRAVIS_TAG" ]; then node ./scripts/dev-version.js; fi
# Nice dev helpers to verify our env
- ./scripts/travis-env.sh
# Sanity checks
- node --version
- npm --version
- grunt --version
- node_modules/jxcore/bin/jx --version
- node_modules/jxcore/bin/jx --jxversion
- ruby --version
- gem --version
- bower --version
- sass --version
- node bin/kbox.js version
script:
# Run code and styling
- grunt test:code
- grunt test:unit
# Run the build
- mkdir -p release
- grunt pkg
# Run a few tests on the installer
# - if [ $KBOX_PKG_TYPE == "deb" ]; then grunt func; fi
# @TODO: Looks like installing Docker.app is still a problem which prevents us
# from testing
# - if [ $KBOX_PKG_TYPE == "dmg" ]; then grunt func; fi
# Name the release depending on whether it is an official release or not
- if [ -z "$TRAVIS_TAG" ]; then cp -rf dist/kalabox.$KBOX_PKG_TYPE release/kalabox-latest-dev.$KBOX_PKG_TYPE; fi
- if [ ! -z "$TRAVIS_TAG" ]; then cp -rf dist/kalabox.$KBOX_PKG_TYPE release/kalabox-$TRAVIS_TAG.$KBOX_PKG_TYPE; fi
before_deploy:
# Do some basic tests of our build
- echo "Need to add tests still"
notifications:
irc:
- chat.freenode.net#kalabox
email:
recipients:
- mike@kalabox.io
- alec@kalabox.io
on_success: always
deploy:
- provider: releases
api_key:
secure: G21D0j6UGh/9LXzYCaHZ0pLFoBMZUe6dOCj2oDCZpcyjLeA0obPGlA1aMy+wSKojOroYqqkHVbV+Gg/G4KR7jjHyQZcjDDYH5gosdTE1FaQxins0GLRrIzrUjyMLwD8hyoarLD7yti3TIsVa4coqZA5qkNR9IdbxHLMF0dp4fHI=
file: release/kalabox-$TRAVIS_TAG.$KBOX_PKG_TYPE
skip_cleanup: true
on:
repo: kalabox/kalabox
tags: true
- provider: s3
access_key_id: AKIAJO2C7GYG5GL5G74A
secret_access_key:
secure: Sr0cMoJ6ZtRSh4H6xwu/CV1pj5xaYgtE5vup80r4fDygfi5C/mFqzCOODWN928nzZHOXWkG13myhLgTztMYDkIkN+TIVP9BmHXpIqWaZsHeytrdLUJMSNsL1Dc8Ixm4kqJBqla9mRgjZaWYceDhbHFvdUZNA7s9Mr1fUUmGyYyI=
bucket: installer.kalabox.io
local-dir: release
acl: public_read
region: us-west-2
skip_cleanup: true
on:
repo: kalabox/kalabox
branch: v2.1