Reputation: 1059
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 :
And these are the lines that i have in my .travis.yml
file :
language: java
before_script:
- chmod +x gradlew
Upvotes: 4
Views: 1513
Reputation: 17208
I tried with this configuration:
language: java
jdk:
- oraclejdk7
sudo: required
before_install:
- chmod +x gradlew
script:
- ./gradlew clean build -i --continue
And everything is green now.
Upvotes: 2
Reputation: 2858
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
Upvotes: 3
Reputation: 50548
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.
Upvotes: 6