簡體   English   中英

遠程觸發器來自BitBucket Server的Bamboo構建僅在PR上進行webhook?

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

我是竹子和webhooks的新手。 當我打開來自我的倉庫的PR分支PR時,我正在嘗試自動啟動竹子構建。

我按照指南操作,但遠程觸發器根本沒有啟動。

竹:
在此輸入圖像描述

到位桶:
在此輸入圖像描述

我已經檢查了以下內容:

  • 驗證列入白名單的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
...

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

編輯1:

好的,所以我意識到鈎子和觸發器實際上正在工作。 我誤解了竹子的觸發器設置。

目前的行為:

  1. 打開掌握的PR
  2. BitBucket webhook(在PR上)被解雇了
  3. Bamboo觸發器設置為遠程/ bitbucket服務器repo。 因此,在提交更改/ PR實際合並之前,構建不會啟動

問題:我想在PR打開后(合並前)觸發構建。 對於更多上下文,這是我構建的理想流程:

  1. 簽出PR代碼(修訂版)
  2. 針對PR修訂版運行我的測試

我正在查看以下鏈接,因為它似乎設法以某種方式完成它但我無法理解兩個鏈接中提供的信息位。

  • 竹子 - 建立我的拉動請求
  • 竹子有什么問題

  • 由於您使用的是Bamboo和Bitbucket Server(而不是Cloud),請按照此處的說明操作:

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

    您需要在Bamboo和BBS之間創建應用程序鏈接 - 應用程序鏈接位於Atlassian應用程序之間。

    發現從Bamboo 6+開始支持此功能: 參考

    暫無
    暫無

    聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

     
    粵ICP備18138465號  © 2020-2024 STACKOOM.COM