jenkins fails after checkout with no error

北城以北 提交于 2020-01-01 15:07:42

问题


My pipeline fails periodically and this is all I see:

...
[Pipeline] cleanWs
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
[WS-CLEANUP] done
[Pipeline] checkout
Cloning the remote Git repository
Cloning repository https://bitbucket.org/myteam/myrepo.git
 > git init C:\WS\master_sdfsdfsdf # timeout=10
Fetching upstream changes from https://bitbucket.org/myteam/myrepo.git
 > git --version # timeout=10
using GIT_ASKPASS to set credentials mycreds
 > git fetch --tags --progress https://bitbucket.org/myteam/myrepo.git +refs/heads/*:refs/remotes/origin/* # timeout=45
 > git config remote.origin.url https://bitbucket.org/myteam/myrepo.git # timeout=10
 > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
 > git config remote.origin.url https://bitbucket.org/myteam/myrepo.git # timeout=10
Fetching upstream changes from https://bitbucket.org/myteam/myrepo.git
using GIT_ASKPASS to set credentials mycreds
 > git fetch --tags --progress https://bitbucket.org/myteam/myrepo.git +refs/heads/master:refs/remotes/origin/master # timeout=45
 > git rev-parse "origin/master^{commit}" # timeout=10
Checking out Revision a18554725b671a53faf395a81883eb62ea637c36 (origin/master)
Enabling Git LFS pull
 > git config core.sparsecheckout # timeout=10
 > git checkout -f a18554725b671a53faf395a81883eb62ea637c36 # timeout=45
 > git config --get remote.origin.url # timeout=10
using GIT_ASKPASS to set credentials mycreds
 > git lfs pull origin # timeout=45
Commit message: "committt messaggge"
 > git rev-list --no-walk 8aca85c063dc44d6271278a197e38c12fef68659 # timeout=10
[Bitbucket] Notifying commit build result
[Pipeline] }
[Pipeline] // script
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (The next stage)
Stage "The next stage" skipped due to earlier failure(s)
[Pipeline] }
[Pipeline] // stage
....

Im not seeing any error it just fails. Then when this happens I retry and it just works. When I look at the output from the failed and successful runs the only difference I see is it seems the rev-list is different from the succeeding job:

 > git rev-list --no-walk a18554725b671a53faf395a81883eb62ea637c36 # timeout=10

For more info this is how im checking out:

checkout([$class                           : 'GitSCM',
          branches                         : [[name: "${env.BRANCH_NAME}"]],
          doGenerateSubmoduleConfigurations: false,
          extensions                       : [
              [$class: 'SubmoduleOption',
               disableSubmodules: false,
               parentCredentials: true,
               recursiveSubmodules: true,
               reference: '',
               trackingSubmodules: true],

              [$class: 'CloneOption', timeout: 20],
              [$class: 'CheckoutOption', timeout: 20],
              [$class: 'GitLFSPull']
          ],
          submoduleCfg                     : [], userRemoteConfigs: scm.userRemoteConfigs
])

来源:https://stackoverflow.com/questions/53085656/jenkins-fails-after-checkout-with-no-error

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!