Jenkins声明性管道正在接收来自主服务器的请求请求,而不是来自开发人员的最新提交

时间:2018-10-16 18:04:38

标签: git jenkins

我有一条与GIT回购挂钩的Jenkins多分支管道,每当发生提交或拉取请求时,就可以通过master和dev分支进行构建。我是第一次从开发人员到主机的拉取请求,并正确触发了构建。现在我在dev分支中执行了快照提交,但是当通过Jenkins触发自动构建时,它将从master分支中获取pom工件版本,而不是我在dev分支中更新的快照。

我的管道如下:

checkout([
$class: 'GitSCM', 
branches: [[name: '**']], 
doGenerateSubmoduleConfigurations: false, 
extensions: [[$class: 'CleanCheckout']],  
userRemoteConfigs: [[credentialsId: "xxx", 
url: 'ssh://somerepo/scm/anycomponent.git']]])

Jenkins的日志文件:

    [Pipeline] checkout
> git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
> git config remote.origin.url ssh://somerepo/scm/anycomponent.git # timeout=10
Fetching upstream changes from ssh://somerepo/scm/anycomponent.git
> git --version # timeout=10
using GIT_ASKPASS to set credentials 
> git fetch --tags --progress ssh://somerepo/scm/anycomponent.git +refs/heads/*:refs/remotes/origin/*
Seen branch in repository origin/development
Seen branch in repository origin/master
Seen 2 remote branches
> git show-ref --tags -d # timeout=10
Multiple candidate revisions
Checking out Revision 01t34567h9d94f3d1f99cb3e438n6789a5d17d2i (origin/master, refs/tags/SOME_TAG)
> git config core.sparsecheckout # timeout=10
> git checkout -f 01t34567h9d94f3d1f99cb3e438n6789a5d17d2i
Commit message: "Merge pull request #1 in REPO from development to master"
First time build. Skipping changelog.
Cleaning workspace
> git rev-parse --verify HEAD # timeout=10
Resetting working tree

在日志中,我可以看到Jenkins正在使用主请求请求版本,而不是我最近在Dev分支中提交的版本。

这里有什么问题的建议吗?

0 个答案:

没有答案