Description

      GitUserContentTest is failing in the ATH if executed on a system without the user.email and user.name git properties configured. This can happen for example when run inside a docker container that is acting as slave.

      Expected: Build result SUCCESS
           but: was FAILURE. Console output:
      Started by user anonymous
      [Pipeline] node
      Running on master in /jenkins/workspace/ATH/oss-ath/jenkins6438430226677463518home/workspace/single_method
      [Pipeline] {
      [Pipeline] git
      Cloning the remote Git repository
      Cloning repository http://172.17.0.4:58964/userContent.git/
       > git init /jenkins/workspace/ATH/oss-ath/jenkins6438430226677463518home/workspace/single_method # timeout=10
      Fetching upstream changes from http://172.17.0.4:58964/userContent.git/
       > git --version # timeout=10
       > git fetch --tags --progress http://172.17.0.4:58964/userContent.git/ +refs/heads/*:refs/remotes/origin/*
       > git config remote.origin.url http://172.17.0.4:58964/userContent.git/ # timeout=10
       > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
       > git config remote.origin.url http://172.17.0.4:58964/userContent.git/ # timeout=10
      Fetching upstream changes from http://172.17.0.4:58964/userContent.git/
       > git fetch --tags --progress http://172.17.0.4:58964/userContent.git/ +refs/heads/*:refs/remotes/origin/*
       > git rev-parse refs/remotes/origin/master^{commit} # timeout=10
       > git rev-parse refs/remotes/origin/origin/master^{commit} # timeout=10
      Checking out Revision 2e227019bc941956e8b1eb7a7c58c4ffc4e6af29 (refs/remotes/origin/master)
       > git config core.sparsecheckout # timeout=10
       > git checkout -f 2e227019bc941956e8b1eb7a7c58c4ffc4e6af29
       > git branch -a -v --no-abbrev # timeout=10
       > git checkout -b master 2e227019bc941956e8b1eb7a7c58c4ffc4e6af29
      First time build. Skipping changelog.
      [Pipeline] writeFile
      [Pipeline] sh
      [single_method] Running shell script
      + git add text.txt
      [Pipeline] sh
      [single_method] Running shell script
      + git commit -m Including new file
      
      *** Please tell me who you are.
      
      Run
      
        git config --global user.email "you@example.com"
        git config --global user.name "Your Name"
      
      to set your account's default identity.
      Omit --global to set the identity only in this repository.
      
      fatal: unable to auto-detect email address (got 'root@26308e89aa5f.(none)')
      [Pipeline] }
      [Pipeline] // node
      [Pipeline] End of Pipeline
      ERROR: script returned exit code 128
      Finished: FAILURE
      
      

      How to reproduce

      Run the test in a system without a previously configured git user.name and user.email properties

          [JENKINS-44508] git-userContent ATH test is failing

          Code changed in jenkins
          User: Raul Arabaolaza
          Path:
          src/test/java/plugins/GitUserContentTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/99f6aee522b9015937ed00fb5f78c6545467673f
          Log:
          JENKINS-44508 Set user.name and user.email before trying to commit

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Raul Arabaolaza Path: src/test/java/plugins/GitUserContentTest.java http://jenkins-ci.org/commit/acceptance-test-harness/99f6aee522b9015937ed00fb5f78c6545467673f Log: JENKINS-44508 Set user.name and user.email before trying to commit

          Code changed in jenkins
          User: Oliver Gondža
          Path:
          src/test/java/plugins/GitUserContentTest.java
          http://jenkins-ci.org/commit/acceptance-test-harness/841546dd8da9986fb5f1551db13b872961b8eed1
          Log:
          Merge pull request #314 from raul-arabaolaza/JENKINS-44508

          JENKINS-44508 git-userContent ATH test is failing

          Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/dec3d815bdd7...841546dd8da9

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Oliver Gondža Path: src/test/java/plugins/GitUserContentTest.java http://jenkins-ci.org/commit/acceptance-test-harness/841546dd8da9986fb5f1551db13b872961b8eed1 Log: Merge pull request #314 from raul-arabaolaza/ JENKINS-44508 JENKINS-44508 git-userContent ATH test is failing Compare: https://github.com/jenkinsci/acceptance-test-harness/compare/dec3d815bdd7...841546dd8da9

            rarabaolaza Raul Arabaolaza
            rarabaolaza Raul Arabaolaza
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: