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
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.