Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-52485

Git step in Scripted Pipeline gets skipped if Git Plugin is not installed

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: pipeline
    • Labels:
      None
    • Similar Issues:

      Description

      1. Start a jenkins/jenkins Docker image. Skip plugin installation in the setup Wizard
      2. Go to Plugin Manager and install Pipeline Plugin (dependencies will be loded)
      3. Create a Pipeline job
      4. Configure the job with "GitHub + Maven" example
      5. Configure the M3 tool (maven 3.5.4 is fine)
      6. Run the job

      Expected result: demo passes if Git is installed, and fails on the checkout step if it is not

      Actual result: demo fails due to missing POM XML... because Git step didn't get executed. The step is skipped silently, no messages in build or system logs

       

      Started by user
      admin
      [Pipeline] node Running on
      Jenkins
      in /var/jenkins_home/workspace/Foo [Pipeline] { [Pipeline] stage [Pipeline] { (Preparation) [Pipeline] tool Unpacking
      https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.5.4/apache-maven-3.5.4-bin.zip
      to /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/M3 on Jenkins [Pipeline] } [Pipeline] // stage [Pipeline] stage [Pipeline] { (Build) [Pipeline] isUnix [Pipeline] sh [Foo] Running shell script + /var/jenkins_home/tools/hudson.tasks.Maven_MavenInstallation/M3/bin/mvn -Dmaven.test.failure.ignore clean package [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.166 s [INFO] Finished at: 2018-07-11T14:42:59Z [INFO] ------------------------------------------------------------------------ [ERROR] The goal you specified requires a project to execute but there is no POM in this directory (/var/jenkins_home/workspace/Foo). Please verify you invoked Maven from the correct directory. -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1]
      http://cwiki.apache.org/confluence/display/MAVEN/MissingProjectException
      [Pipeline] } [Pipeline] // stage [Pipeline] } [Pipeline] // node [Pipeline] End of Pipeline ERROR: script returned exit code 1 Finished: FAILURE
      

       

      Installing Git plugin solves the issue, but it seems that we have a serious diagnosability issue (steps are silently skipped)

       

        Attachments

          Activity

          Hide
          oleg_nenashev Oleg Nenashev added a comment -
          Show
          oleg_nenashev Oleg Nenashev added a comment - CC Pham Vu Tuan and Mark Waite

            People

            Assignee:
            svanoort Sam Van Oort
            Reporter:
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: