0

I try to use Pipeline script and I arrive until last step.

enter image description here

The Pipeline script is the following code

node{
  stage ('Build') {

    git url: 'https://xxx@bitbucket.org/xxx/01-eureka.git'

    withMaven(
        // Maven installation declared in the Jenkins "Global Tool Configuration"
        maven: 'M3',
        // Maven settings.xml file defined with the Jenkins Config File Provider Plugin
        // Maven settings and global settings can also be defined in Jenkins Global Tools Configuration
        mavenSettingsConfig: 'my-maven-settings',
        mavenLocalRepo: '.repository') {

      // Run the maven build
      sh "mvn clean install"

    } // withMaven will discover the generated Maven artifacts, JUnit Surefire & FailSafe & FindBugs reports...
  }
}

I have already been configured the maven and Java.

I don't know the error of the last step , I update all code.

StephenKing
  • 36,187
  • 11
  • 83
  • 112
pepe
  • 335
  • 2
  • 11
  • Have you tried looking for similar errors, such as https://stackoverflow.com/questions/51906017/jenkins-build-fail-for-pr-from-github/51915362#51915362? – stay_frosty Mar 15 '19 at 00:23
  • Possible duplicate of [Git PullRequest job failed. Couldn't find any revision to build. Verify the repository and branch configuration for this job](https://stackoverflow.com/questions/23906352/git-pullrequest-job-failed-couldnt-find-any-revision-to-build-verify-the-repo) – einverne Mar 15 '19 at 10:18
  • How do you provide the password for you git user? Looks like jenkins wasn't properly configured. – hakamairi Mar 15 '19 at 13:38

1 Answers1

0

I don't exact ENV as your's, but first thing first, you should check the your Jenkins workspace folder Jenkins\workspace\docker-app, to see if the git clone works as expected

If the source code are there, manual run the maven command to see if Maven finds the pom.xml correctly

Calvin Zhou
  • 307
  • 2
  • 5