How to check the build queue using cURL

お困りですか?

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

コミュニティに質問

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

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

要約

Before Bamboo is backed up, the build queue has to be empty so that it doesn't cause any data inconsistency. 

ソリューション

Use the cURL command to check the build queue endpoint before performing any backup:

curl
curl -u <ADMIN_USERNAME>:<PASSWORD> <BAMBOO_URL>/build/admin/ajax/getDashboardSummary.action

Sample outputs:

Empty queue
{"status":"OK","builds":[],"agentSummary":" 1 online agent "}
Jobs in the queue
{"status":"OK","builds":[{"status":"QUEUED","messageType":"ERROR","messageText":"No agent can build this job.","hasReadPermission":true,"hasBuildPermission":true,"itemType":"BUILD","resultKey":"BSP49354-TES-JOB1-2","buildResultKey":"BSP49354-TES-JOB1-2","planResultKey":"BSP49354-TES-2","planKey":"BSP49354-TES","jobKey":"BSP49354-TES-JOB1","projectName":"BSP-49354","chainName":"testasufh","jobName":"Default Job","planName":"BSP-49354 - testasufh","buildNumber":2,"isBranch":false,"triggerReason":"Manual run by admin","queueIndex":1}],"agentSummary":"No agents online"}
最終更新日 2021 年 11 月 25 日

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

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