Pipelines java gradle default build - permission denied

Hi,

i am trying to build with java gradle, with the default pipelines build script. 

I have two repositories, same deafult pipelines build script. One is working nicely, other gets an error:

+ ./gradlew build
bash: ./gradlew: Permission denied

 

How can i debug my issue? Or what could be the cause?

1 answer

You are building under linux, so you should give the necessary execute rights for the file to the system. Use "- chmod a+x gradlew" before calling the build command.

@Galya Bogdanova, Here is my script to create EAR of my project :-

# This is a sample build configuration for Gradle.
# Check our guides at https://confluence.atlassian.com/x/VYk8Lw for more examples.
# Only use spaces to indent your .yml configuration.
# -----
# You can specify a custom docker image from Docker Hub as your build environment.
image: qlik/gradle
 
pipelines:
  default:
    - step:
        script:
          - ls
          - gradle clean
          - gradle test
          - gradle ear
        

 

 

but when i run my script, build fails on command "gradle clean" by saying..
gradle clean/tmp/bashScript8951005165638245468.sh: line 22: gradle: command not found


will you please help ? Whats wrong here.

previously (1 week before) same code was working perfect. but now what happened ? 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

30,932 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you