0

我有两个发布分支用于下一个版本中的当前版本。我没有要求我所有的开发人员提交到 Relase1,然后将其合并到 Release2,而是配置了 cloudbees 以使用预构建合并来完成工作。这适用于几个构建,但最近的更新打破了它。现在 cloudbees 构建不会尝试进行预构建合并

失败构建日志中的相关部分:

commit notification c9f044eafa09e517d074d7a00f02cfced59bf6e0
commit notification c9f044eafa09e517d074d7a00f02cfced59bf6e0
commit notification c9f044eafa09e517d074d7a00f02cfced59bf6e0
Building remotely on 93ca72d3 in workspace /scratch/jenkins/workspace/da/b2.potter
Fetching changes from the remote Git repository
Fetching upstream changes from git@bitbucket.org:elosystemsteam/paypoint-potter.git
Checking out Revision c9f044eafa09e517d074d7a00f02cfced59bf6e0 (detached)

相关的构建配置部分:

<scm class="hudson.plugins.git.GitSCM" plugin="git@2.2.1">
    <configVersion>2</configVersion>
    <userRemoteConfigs>
        <hudson.plugins.git.UserRemoteConfig>
            <url>
                git@bitbucket.org:elosystemsteam/paypoint-potter.git
            </url>
        </hudson.plugins.git.UserRemoteConfig>
    </userRemoteConfigs>
    <branches>
        <hudson.plugins.git.BranchSpec>
            <name>*/B1-Bisque</name>
        </hudson.plugins.git.BranchSpec>
    </branches>
    <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
    <browser class="hudson.plugins.git.browser.BitbucketWeb">
        <url>
            https://bitbucket.org/elosystemsteam/paypoint-potter
        </url>
    </browser>
    <submoduleCfg class="list"/>
    <extensions>
        <hudson.plugins.git.extensions.impl.PreBuildMerge>
            <options>
                <mergeRemote/>
                <mergeTarget>B2-Bisque</mergeTarget>
                <mergeStrategy>default</mergeStrategy>
            </options>
        </hudson.plugins.git.extensions.impl.PreBuildMerge>
    </extensions>
</scm>

构建日志从来没有说它对 B2-Bisque 进行了合并,你可以告诉它没有,因为构建后 git push 失败:

Pushing HEAD to branch B2-Bisque of origin repository
        ERROR: Failed to push merge to origin repository
        hudson.plugins.git.GitException: Command "git push git@bitbucket.org:elosystemsteam/paypoint-potter.git HEAD:B2-Bisque" returned status code 1:
        stdout:
        stderr: To git@bitbucket.org:elosystemsteam/paypoint-potter.git
        ! [rejected]        HEAD -> B2-Bisque (non-fast-forward)
        error: failed to push some refs to 'git@bitbucket.org:elosystemsteam/paypoint-potter.git'
        hint: Updates were rejected because a pushed branch tip is behind its remote
        hint: counterpart. Check out this branch and merge the remote changes
        hint: (e.g. 'git pull') before pushing again.
        hint: See the 'Note about fast-forwards' in 'git push --help' for details.

        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1276)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1146)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$200(CliGitAPIImpl.java:87)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$7.execute(CliGitAPIImpl.java:1331)
        at org.jenkinsci.plugins.gitclient.LegacyCompatibleGitAPIImpl.push(LegacyCompatibleGitAPIImpl.java:98)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:87)
        at org.jenkinsci.plugins.gitclient.LegacyCompatibleGitAPIImpl.push(LegacyCompatibleGitAPIImpl.java:109)
        at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.push(CliGitAPIImpl.java:87)
        at hudson.plugins.git.GitAPI.push(GitAPI.java:66)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:299)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:280)
        at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:239)
        at hudson.remoting.UserRequest.perform(UserRequest.java:118)
        at hudson.remoting.UserRequest.perform(UserRequest.java:48)
        at hudson.remoting.Request$2.run(Request.java:328)
        at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:744)
        Build step 'Git Publisher' marked build as failure

似乎在构建之前合并不再与 SCM 触发的构建集成

bitbucket 插件允许您在 bitbucket 更新时触发构建。然而,每当 bitbucket 开始构建时,我得到了这个:

commit notification 6ed77b52aa95a563a0052404ca72e4afdccc4d6c
commit notification 6ed77b52aa95a563a0052404ca72e4afdccc4d6c
commit notification 6ed77b52aa95a563a0052404ca72e4afdccc4d6c
Building remotely on 1b68e1c7 in workspace /scratch/jenkins/workspace/da/b2.potter
Fetching changes from the remote Git repository
Fetching upstream changes from git@bitbucket.org:elosystemsteam/paypoint-potter.git
Checking out Revision 6ed77b52aa95a563a0052404ca72e4afdccc4d6c (detached)

但是当我手动开始构建时,我得到了这个:

Started by user Michael Power
Building remotely on fef3883c in workspace /scratch/jenkins/workspace/da/b2.potter
Fetching changes from the remote Git repository
Fetching upstream changes from git@bitbucket.org:elosystemsteam/paypoint-potter.git
Seen branch in repository origin/###
...
Seen 191 remote branches
Merging Revision 6ed77b52aa95a563a0052404ca72e4afdccc4d6c (origin/B1-Bisque) onto origin/B2-Bisque using default strategy
4

0 回答 0