From 4e5d592b31b54698ff8edfaa14a4743c4ca4b8f6 Mon Sep 17 00:00:00 2001 From: John-Philip Johansson Date: Fri, 7 Aug 2015 13:55:31 +0200 Subject: [PATCH] chore(travis): move log files to /tmp MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Getting permission denied errors on Travis when trying to create `/logs` directory. Couldn’t find any detailed docs on this, but `/tmp` should be allowed. --- .travis.yml | 5 +++-- karma.conf.js | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 87e5f9a..f82a453 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,7 +4,7 @@ node_js: before_install: - 'npm install -g bower grunt-cli' before_script: - - mkdir -p '/logs' + - mkdir -p $LOGS_DIR - 'export DISPLAY=:99.0' - 'sh -e /etc/init.d/xvfb start' script: @@ -12,9 +12,10 @@ script: - 'npm run coveralls' - 'npm run saucelabs' after_script: - - 'cat /logs/karma.log' + - 'cat $LOGS_DIR/karma.log' env: global: + - LOGS_DIR=/tmp/logs - secure: L+EPka9O38GaLwg3xqr6p9rwvwy4MnQH0Fba8Qlt1M5QzLRz3e9JdVvxCQrQlETR5Guc5CN1dLOQFhVyYoCFNcOs3VkeD/mnegq16LwFE9vcmxySRqleUja3eCQ4HQJP99pSiCHYQVGvoZUf82nYNz6bh7JusbGapyyUF4Nl1TU= - secure: l7fKnvanXbaLGAhlwyFRgNsSy8H5O13nbAU1AujLy9sP5tHnjHjvNLklV+wHw929h2L3pLi0OCMthDQPyA+4LnTNix6UW2f7p1tOwAxOqEWUSitWHway1pNOR9CZbpGVfdcoML/RGNgt1iwtEC9TyhxhbFw1pGZj8GLfCOVdthk= addons: diff --git a/karma.conf.js b/karma.conf.js index b6bd929..4ca7384 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -133,7 +133,7 @@ module.exports = function(config) { // Debug logging into a file, that we print out at the end of the build. config.loggers.push({ type: 'file', - filename: '/logs/karma.log' + filename: (process.env.LOGS_DIR || '') + '/logs/karma.log' }); } };