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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,457,880
Community Members
 
Community Events
176
Community Groups

Pipeline task fails to download gradle and run ./gradlew

I have standard minimal project with gradle.build and gradlew.

It runs perfectly on the local machine and in Jenkins.

Here's the console log from my build.

+ umask 000

+ GIT_LFS_SKIP_SMUDGE=1 git clone --branch="master" --depth 50 https://x-token-auth:$REPOSITORY_OAUTH_ACCESS_TOKEN@bitbucket.org/dt-team/dtms-api.git $BUILD_DIR ; git reset --hard b89e24b7519a1bb82a2775e40f33898640186c7d ; git remote set-url origin git@bitbucket.org:dt-team/dtms-api.git
Cloning into '/opt/atlassian/pipelines/agent/build'...
HEAD is now at b89e24b bitbucket-pipelines.yml edited online with Bitbucket

+ chmod 777 $BUILD_DIR

Cache "gradle": Downloading
Cache "gradle": Not found
Cache "gradlewrapper": Downloading
Cache "gradlewrapper": Not found
+ bash ./gradlew clean build
Error: Could not find or load main class org.gradle.wrapper.GradleWrapperMain

Skipping cache upload for failed step
Searching for test report files in directories named [test-results, failsafe-reports, test-reports, surefire-reports] down to a depth of 4
Finished scanning for test reports. Found 0 test report files.
Merged test suites, total number tests is 0, with 0 failures and 0 errors.

gradle.build:

plugins {
id 'java'
id 'io.franzbecker.gradle-lombok' version '1.14'
}

sourceCompatibility = 1.8

group = 'eu.dtms.api'
version = '0.0.1-SNAPSHOT'

repositories {
mavenCentral()
}

dependencies {
testCompile('org.junit.jupiter:junit-jupiter-api:5.2.0')
testRuntime('org.junit.jupiter:junit-jupiter-engine:5.2.0')

}

test {
useJUnitPlatform()

testLogging {
events "passed", "skipped", "failed"
}

reports {
html.enabled = true
}
}

 pipelines.yml

image: java:8

pipelines:
default:
- step:
caches:
- gradle
- gradlewrapper
script:
- bash ./gradlew clean build
definitions:
caches:
gradlewrapper: ~/.gradle/wrapper

1 answer

1 accepted

2 votes
Answer accepted

Commit ./gradle/gradle-wrapper.jar to the repository.

It is not downloaded or provided in the docker container.

Thanks!

I accidently added `*jar` to my .gitignore before first commit, so I didn't notice it was missing in the commit.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events