Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66668

developer提交代码至Gitlab仓库dev分支后。Jenkins多分支流水线dev及master分支同时构建并且构建后结果代码混乱

XMLWordPrintable

      近期在工作中遇到了比较奇怪的issue. 开发人员提交代码至dev分支后,竟然触发了dev及master的pipeline构建(同一时间发生)。并且构建完毕后的结果竟然是一摸一样(dev,master分支代码串行)。

      Recently, I encountered a strange issue in my work. After the developer submitted the code to the dev branch, it triggered the pipeline construction of Dev and Master (at the same time). And the built result is exactly the same (DEV, Master branch code serial).

      以下为issue流程图介绍。

      The following is an introduction to the issue flow chart.

       

      背景:

      Gitlab仓库中针对每个分支都配置了webhook并且在trigger列表勾选了Push events并指定了具体分支。

      Jenkins多分支流水线只是简单配置了gitlab地址,在Behaviours方面没有做任何高级配置。

      Background:

      Webhook is configured for each branch in gitlab repository, and push events is checked in the trigger list and specific branches are specified.

      Jenkins multi branch pipeline is simply configured with gitlab address, and there is no advanced configuration in behaviors.

      有以下疑问:

      1、Gitlab master分支的历史记录并未发生任何commit,为何会在dev分支代码发生变化后竟然也发生了构建?

      2、尽管master发生了构建,但是由于master分支代码未发生变化,构建出来的结果也应该跟上一次构建出来的一样。为何此次误构建会和dev的构建结果相同并且构建结果都不是dev和master本该期望的构建。

      Have the following questions:

      1. The history of the gitlab master branch does not have any new commit. Why is it that the dev branch code is also built after it changes?

      2. Although the master has been built, since the master branch code has not changed, the built results should be the same as those built last time. Why is this false build the same as the build result of dev, and the build result is not what Dev and master should have expected.

            aytuncbeken Aytunc BEKEN
            elevencityhost Guangyao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: