Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Gradle not found error

Edited

Hi, My name is Nasibulloh. I am configuring bitbucket-pipelines.yml. My project is using Java 11 and Gradle 6.2. When I push my changes to the bitbucket, pipelines are returning an error. Gradle was not found error. Could you help me to solve it, please?

image: openjdk:11

pipelines:
default: #this runs for any unspecified branches
- step:
name: Install dependencies
caches:
- gradle
script:
- echo 'Put any bash command here'
- java -version
- step:
name: Run tests
script:
- bash ./gradlew test
- step:
name: Build artifacts
script:
- bash ./gradlew clean build
artifacts:
- build/**

pull-requests:
'**': #this runs as default for any branch not elsewhere defined
- step:
name: Install dependencies
caches:
- gradle
script:
- echo 'Put any bash command here'
- java -version
- step:
name: Run tests
script:
- bash ./gradlew test
- step:
name: Build artifacts
script:
- bash ./gradlew clean build
artifacts:
- build/**

branches:
master: #this runs only 'master' branch
- step:
name: Install dependencies
caches:
- gradle
script:
- echo 'Put any bash command here'
- java -version
- step:
name: Run tests
script:
- bash ./gradlew test
- step:
name: Build artifacts
script:
- bash ./gradlew clean build
artifacts:
- build/**

- step:
name: Deploy artifacts to the server
deployment: production
script:
- pipe: atlassian/scp-deploy:0.3.3
variables:
USER: $SERVER_USER
SERVER: $SERVER_IP
VERSION: $BUILD_VERSION
REMOTE_PATH: '/var/autotrack'
LOCAL_PATH: 'build/libs/autotrack-$VERSION.jar'

 

Error: bash ./gradlew test bash

./gradlew test bash: ./gradlew: No such file or directory 

1 comment

Radek Antoniuk
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Apr 10, 2020

The image `openjdk:11` contains only JDK, not gradle.
To use Gradle with it, you need to commit the Gradle Wrapper into the git repository as described here. Having done so, when the pipeline runs, Gradle Wrapper (./gradlew) will download Gradle distribution.

Yes, you are right. I did not know about the openjdk:11 image does not contain Gradle. I already fixed it, I used another image for it. Thank you for your answer @Radek Antoniuk  

Like Radek Antoniuk likes this

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events