Bamboo is not getting build variables from path variables

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

プラットフォームについて: Data Center のみ - この記事は、Data Center プラットフォームのアトラシアン製品にのみ適用されます。

この KB は Data Center バージョンの製品用に作成されています。Data Center 固有ではない機能の Data Center KB は、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

要約

Bamboo extends functionality to integrate with third-party services, one of which is Service Now. Such integrations are able to automate the running of builds. Bamboo queue API allows Services to pass Bamboo variables as URL path variables, and if these variables are incorrectly formatted Bamboo will not consume them therefore causing the build to fail.

環境

Bamboo Datacenter

診断

  1. Confirm that your build-required environmental variables are defined based on Bamboo variable definition i.e. bamboo.variable.{VARIABLE_NAME}.
  2. Add the first task called Dump variables to log
  3. Run a new build using the API endpoint

    # /rest/api/latest/queue/{PROJECT_KEY}-{PLAN_KEY}
    
    curl --location --request POST 'http://localhost:8085/rest/api/latest/queue/BP-TPFPRV?bamboo.variable.BUILD_SEQ_NUMBER=350i424&bamboo.variable.BUILD_MARKER=3400984&bamboo.variable.BUILD_STARTEDBY=admin_user' \
    --header 'Authorization: Bearer YWRtaW46ZWVlZWVlMjI=' \
    
    
    • Bamboo build log shows the variables dumped as part of Bamboo variables for that build. If the variables were added correctly as path variables, the variables will be logged in the dump log.

      simple	24-Nov-2023 02:29:14	---- DUMPING VARIABLES TO LOG --- 
      simple	24-Nov-2023 02:29:14	key: [BUILD_MARKER] value: [3400984] type: MANUAL
      simple	24-Nov-2023 02:29:14	key: [BUILD_SEQ_NUMBER] value: [350i424] type: MANUAL
      simple	24-Nov-2023 02:29:14	key: [BUILD_STARTEDBY] value: [admin_user] type: MANUAL
      simple	24-Nov-2023 02:29:14	key: [ManualBuildTriggerReason.userName] value: [admin] type: CUSTOM
      simple	24-Nov-2023 02:29:14	key: [agentId] value: [1703937] type: CUSTOM
    • You can also find them on the build summary page;


ソリューション

When using Bamboo variables, follow the instructions on how to use variables described in Bamboo variables.


最終更新日: 2024 年 1 月 3 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.