远程触发器来自BitBucket Server的Bamboo构建仅在PR上进行webhook?

问题描述 投票:3回答:2

我是竹子和webhooks的新手。当我打开来自我的仓库的PR分支PR时,我正在尝试自动启动竹子构建。

我按照this指南,但远程触发器根本没有启动。

竹: enter image description here

到位桶: enter image description here

我已经检查了以下内容:

  • 验证列入白名单的IP是否正确(如果我删除了bitbucket webhook失败)
  • 我的竹子计划已启用,并且在手动运行时正在建设中

我错过了什么?

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
...

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

EDIT 1:

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

目前的行为:

  1. 打开掌握的PR
  2. BitBucket webhook(在PR上)被解雇了
  3. Bamboo触发器设置为远程/ bitbucket服务器repo。因此,在提交更改/ PR实际合并之前,构建不会启动

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

  1. 签出PR代码(修订版)
  2. 针对PR修订版运行我的测试

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

  • bamboo - build my pull request
  • What's wrong with bamboo
  • bitbucket webhooks bamboo bitbucket-server
    2个回答
    2
    投票

    由于您使用的是Bamboo和Bitbucket Server(而不是Cloud),请按照此处的说明操作:

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

    您需要在Bamboo和BBS之间创建应用程序链接 - 应用程序链接位于Atlassian应用程序之间。


    1
    投票

    发现从Bamboo 6+开始支持此功能:Reference

    © www.soinside.com 2019 - 2024. All rights reserved.