2013-04-13 28 views

答えて

5

典型的に動作するように期待されます。それはバグです。

https://jira.atlassian.com/browse/BAM-11824?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

https://answers.atlassian.com/questions/66109/accessing-build-specific-variables-from-script-without-having-to-use-environment-variables-box-on-script-config-page

だから私は、スクリプトタスクでの環境変数を追加する(その間)頼る必要があります。

+2

それは最終的にジェンキンスの実行可能な代替手段である竹のリリースを待っている。 –

6

現在のバージョンのBamboo(5.x)では、Bashスクリプト内のAmazon EC2 LinuxクライアントのBashで以下の環境変数が使用できます。 PowerShellでも非常によく似ているはずです。

  • ${bamboo.buildKey} - 現在のジョブのジョブキーは、PROJECT-PLAN-JOBの形式で指定します。 BAM-MAIN-JOBX
  • ${bamboo.buildResultsUrl} - ジョブの実行が終了したら、Bambooの結果のURL。
  • ${bamboo.buildNumber} - Bambooビルド番号。 123
  • ${bamboo.buildPlanName} - 竹のプラン名。 Some Project name - Some plan name

Bamboo build variables on the Atlassian Bamboo build variable documentation pageの完全なリストが表示されます。

0

はい、Bambooの変数は、Bamboo 5.9.4で環境変数として自動的に使用できるように見えます。以下は私のためにインラインPowershellとして働いた:

$revision = $Env:bamboo_planRepository_revision 
$buildNumber = $Env:bamboo_buildNumber 
$text = "$revision - $buildNumber" 
$text > 'Version.txt' 
関連する問題