Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Travis CI build failed

I'm trying to integrate Travis CI with my GitHub project. I managed to configure Travis plugin successfully with my repository by following Travis getting Started Guide

But when i pushed my first commit after integrating Travis ,it is giving me this error when it auto builds.

/home/travis/build.sh: line 179: ./gradlew: Permission denied
The command "eval ./gradlew assemble" failed. Retrying, 2 of 3.

Below is a screenshot of the Travis build : enter image description here

And these are the lines that i have in my .travis.yml file :

language: java
before_script:
 - chmod +x gradlew
like image 597
zulkarnain shah Avatar asked Dec 19 '22 20:12

zulkarnain shah


2 Answers

In your .travis.yml add these lines:

before_script:
 - chmod +x gradlew

Travis instances are linux and require write permissions for executables that output artifacts.

like image 106
Nikola Despotoski Avatar answered Dec 21 '22 10:12

Nikola Despotoski


I tried that "before_script"-version, but it didn't work for me.

After changing before_script to before_install it worked as expected (and no sudo was required)

before_install:
  - chmod +x gradlew
like image 40
FibreFoX Avatar answered Dec 21 '22 10:12

FibreFoX