我的管道定期失败,这就是我所看到的:
...
[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
....
我看不到任何错误,只是失败了。然后,当这种情况发生时,我重试,它就可以了。当我查看失败和成功运行的输出时,我看到的唯一区别是,看来rev-list与后续工作不同:
> git rev-list --no-walk a18554725b671a53faf395a81883eb62ea637c36 # timeout=10
有关更多信息,这是我如何签出:
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
])