added grunt tasks for jenkins and travis

This commit is contained in:
spalger 2015-07-28 08:23:56 -07:00
parent 6e03b58665
commit f9897a3773
6 changed files with 32 additions and 7 deletions

View file

@ -1,17 +1,17 @@
language: node_js
node_js: 'iojs-v2.4'
install: npm install
script: npm test
script: ./node_modules/.bin/grunt travis
sudo: false
cache:
directories:
- esvm
- node_modules
before_cache:
- rm -rf esvm/*/logs esvm/data_dir
- rm -rf esvm/*/logs esvm/data_dir
before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
notifications:
email:
- rashid.khan@elastic.co

View file

@ -13,7 +13,17 @@ module.exports = function (grunt) {
testUtilsDir: __dirname + '/src/testUtils',
configFile: __dirname + '/src/config/kibana.yml',
karmaBrowser: process.env.TRAVIS ? 'Firefox' : 'Chrome',
karmaBrowser: (function () {
switch (require('os').platform()) {
case 'win32':
return 'IE';
case 'darwin':
return 'Chrome';
default:
return 'Firefox';
}
}()),
nodeVersion: '0.10.35',
platforms: ['darwin-x64', 'linux-x64', 'linux-x86', 'windows'],
services: [ [ 'launchd', '10.9'], [ 'upstart', '1.5'], [ 'systemd', 'default'], [ 'sysv', 'lsb-3.1' ] ],

View file

@ -140,7 +140,7 @@
"load-grunt-config": "^0.7.0",
"marked-text-renderer": "^0.1.0",
"mocha": "^2.2.5",
"nock": "^2.7.0",
"nock": "2.7.*",
"npm": "^2.11.0",
"portscanner": "^1.0.0",
"simple-git": "^1.3.0",

8
tasks/jenkins.js Normal file
View file

@ -0,0 +1,8 @@
module.exports = function (grunt) {
grunt.registerTask('jenkins', 'Jenkins build script', [
'esvm:dev',
'test'
]);
};

View file

@ -7,7 +7,6 @@ module.exports = function (grunt) {
}
grunt.task.run(_.compact([
process.env.TRAVIS && 'esvm:dev',
'jshint:source',
'jscs:source',
'maybeStartKibana',

8
tasks/travis.js Normal file
View file

@ -0,0 +1,8 @@
module.exports = function (grunt) {
grunt.registerTask('travis', 'Travis CI build script', [
'esvm:dev',
'test'
]);
};