仅在 PR 上从 BitBucket Server webhook 远程触发 Bamboo 构建?

Remote Trigger Bamboo build from BitBucket Server webhook only on PR?

我是 bamboo 和 webhook 的新手。当从我的仓库打开 master 分支的 PR 时,我正在尝试自动启动 bamboo 构建。

我遵循了 this 指南,但远程触发器根本没有启动。

竹子:

BitBucket:

我已经检查了以下内容:

我错过了什么?

YAML 中的 Bamboo 构建计划:

---
oid: 7818389690603565060
key: XT
name: XXX - TEMP
project:
  oid: 7819374853022025730
  key: DIGQA
repositories:
- oid: 7818811903068661169
  parentRepository: 7818811903068661168
triggers:
- name: Bitbucket Server repository triggered
  description: ''
  pluginKey: com.atlassian.bamboo.plugins.stash.atlassian-bamboo-plugin-stash:stashTrigger
  enabled: true
  configuration: {}
  triggerConditions:
    com.atlassian.bamboo.triggercondition.internal:plansGreenCondition:
      enabled: 'false'
  triggeringRepositories:
  - 7818811903068661169
- name: Remote trigger
  description: Master PR Trigger
  pluginKey: com.atlassian.bamboo.triggers.atlassian-bamboo-triggers:remote
  enabled: true
  configuration:
    repository.change.trigger.triggerIpAddress: 10.40.1.120
  triggerConditions:
    com.atlassian.bamboo.triggercondition.internal:plansGreenCondition:
      enabled: 'false'
  triggeringRepositories:
  - 7818811903068661169
branchConfiguration:
  planBranchCreation:
    enabled: false
  removedBranchCleanup:
    enabled: false
  inactiveBranchesCleanup:
    enabled: false
  merging:
    enabled: false
  notificationStrategy: notifyCommitters
  triggers: inherited
  issueLinking: enabled
dependencies:
  configuration:
    enabledForBranches: 'true'
    requireAllStagesPassing: null
    blockingStrategy: none
  childPlans: []
permissions:
  users:
    xxxxxxxx:
    - administration
    - build
    - clone
    - read
    - write
  groups: {}
  roles:
    user:
    - read
    anonymous:
    - read
plugins:
- pluginKey: com.atlassian.bamboo.plugin.system.additionalBuildConfiguration:concurrentBuild
  configuration:
    custom.concurrentBuilds.overrideNumberOfConcurrentBuilds: 'true'
    custom.concurrentBuilds.numberOfConcurrentBuilds: '1'
- pluginKey: com.atlassian.bamboo.plugin.system.additionalBuildConfiguration:buildExpiry
  configuration:
    custom.buildExpiryConfig.enabled: 'false'
- pluginKey: com.atlassian.bamboo.plugin.artifact.handler.local:artifactHandlersConfiguration
  configuration:
    custom.artifactHandlers.useCustomArtifactHandlers: 'false'
buildDefinition:
  custom.predefinedVariables: '{"variableSetList":[]}'
stages:
- oid: 7818530428091950756
  name: Default Stage
  jobs:
  - oid: 7818671165580276746
    key: JOB1
    name: Default Job
    tasks:
    - oid: 7819234115533708305
      description: Checkout Default Repository
      pluginKey: com.atlassian.bamboo.plugins.vcs:task.vcs.checkout
      configuration:
        repositories:
        - ref: defaultRepository
    buildDefinition:
      cleanWorkingDirectory: false
      repositoryDefiningWorkingDirectory: -1
...

====================================== ===================================

编辑 1:

好的,所以我意识到挂钩和触发器实际上正在工作。我误解了 bamboo 上的触发器设置。

当前行为:

  1. 向 master 的 PR 已打开
  2. BitBucket webhook(在 PR 上)被触发
  3. Bamboo 触发器设置为远程/bitbucket 服务器回购。因此,在提交更改/实际合并 PR 之前,构建不会开始

问题: 我希望在 PR 打开后(合并之前)触发构建。在更多上下文中,这是我构建的理想流程:

  1. 检查 PR 代码(修订版)
  2. 运行 我对 PR 修订的测试

我正在查看以下链接,因为它们似乎以某种方式做到了,但我无法理解这两个链接中提供的信息位。

  • bamboo - build my pull request
  • What's wrong with bamboo

  • 由于您使用的是 Bamboo 和 Bitbucket 服务器(不是 Cloud),请按照此处的说明进行操作:

    https://confluence.atlassian.com/bamboo/integrating-bamboo-with-bitbucket-server-779302772.html

    您需要在 Bamboo 和 BBS 之间创建一个应用程序 link - 应用程序 link 在 Atlassian 应用程序之间。

    发现 Bamboo 6+ 开箱即用地支持此功能:Reference