当有人在Bitbucket服务器上打开请求请求时,我将触发一个Jenkins作业。这是一个构建的日志:
commit notification 1606dd8
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/workspace/rad-test-1-pr
[WS-CLEANUP] Deleting project workspace...
[WS-CLEANUP] Deferred wipeout is used...
using credential jenkins-ssh
Cloning the remote Git repository
Cloning repository ssh://git@stash.example.com/my/repository.git
> git init /var/lib/jenkins/workspace/rad-test-1-pr # timeout=10
Fetching upstream changes from ssh://git@stash.example.com/my/repository.git
> git --version # timeout=10
using GIT_SSH to set credentials Jenkins User SSH Private Key
> git fetch --tags --progress ssh://git@stash.example.com/my/repository.git +refs/heads/*:refs/remotes/origin/*
> git config remote.origin.url ssh://git@stash.example.com/my/repository.git # timeout=10
> git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
> git config remote.origin.url ssh://git@stash.example.com/my/repository.git # timeout=10
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
No valid HEAD. Skipping the resetting
> git clean -fdx # timeout=10
Fetching upstream changes from ssh://git@stash.example.com/my/repository.git
using GIT_SSH to set credentials Jenkins User SSH Private Key
> git fetch --tags --progress ssh://git@stash.example.com/my/repository.git +refs/pull-requests/*/from:refs/remotes/*
> git rev-parse 1606dd8^{commit} # timeout=10
> git branch -a -v --no-abbrev --contains 1606dd8 # timeout=10
Merging Revision 1606dd8 (4, 3, 2, 1, origin/first-branch) to origin/master, UserMergeOptions{mergeRemote='origin', mergeTarget='master', mergeStrategy='default', fastForwardMode='--ff'}
> git rev-parse origin/master^{commit} # timeout=10
> git config core.sparsecheckout # timeout=10
> git checkout -f origin/master
> git merge --ff 1606dd8 # timeout=10
> git rev-parse HEAD^{commit} # timeout=10
Seen branch in repository 1
Seen branch in repository 2
Seen branch in repository 3
Seen branch in repository 4
Seen branch in repository origin/first-branch
Seen branch in repository origin/master
Seen 6 remote branches
> git show-ref --tags -d # timeout=10
Checking out Revision 663303d (origin/master)
> git config core.sparsecheckout # timeout=10
> git checkout -f 663303d
> git branch -a -v --no-abbrev # timeout=10
> git checkout -b master 663303d
Commit message: "Merge commit '1606dd8' into HEAD"
我很难读取此日志。例如,为什么Commit message: "Merge commit '1606dd8' into HEAD"
消息出现在所有结帐命令之后?只是因为种族问题吗?
最重要的是,所有这些Seen branch in repository X
是什么?它们何时以及如何创建?我该如何清洁它们? (我添加了preBuildCleanup
和wsCleanup
,但是什么也没发生。)