Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


How to pass bamboo build variables from one pipeline to child pipeline(bamboo spec)

i have two Bamboo pipelines  Dev & Test and  we have many variables defined in  file on DEV pipeline,

now i need that variables for child build (TEST)  pipeline -its already integrated with DEV pipeline ,so i dont knw how to get that values here to make one condition in the test pipeline script file.

In the Bamboo sites/guide there is options to add global variables in UI, bt here they are using bamboo spec concepts that options r disabled now , so i cant able add global variables manually in Bamboo Ul,  

so pls tell me how to create global variables using bamboo spec concepts?

how to get that values in child pipeline?

please provide the correct logic if you have , kindly help me its very urgent..

Thanks in advance..!


1 answer

Are you changing the variables? As global variables are read only. When i want to pass variables between staged i create a file with the variable and values in them in the working directory and then use the inject variables, 



  - script:
      interpreter: WINDOWS_POWER_SHELL
      - |-
        Set-Location ./${bamboo.solution}
        dotnet test -c Release --logger "trx;LogFileName=${bamboo.solution}_TestResults-Build_${bamboo.buildNumber}.trx" -v q
        $found = Get-ChildItem -Path . -Filter *.trx -Recurse -ErrorAction SilentlyContinue -Force
        $string = "testResultsExist=false"
        if($null -ne $found) {
            $string = "testResultsExist=true"
        $string | Set-Content "testsExist.txt"
      description: UnitTest
  - inject-variables:
      file: ${bamboo.solution}\testsExist.txt
      scope: RESULT
      namespace: inject
  - any-task:
      plugin-key: com.atlassian.bamboo.plugin.dotnet:mstest
        mstestTestResultsDirectory: '**/TestResults/*.trx'
        pickupOutdatedFiles: 'false'
      - variable:
            inject.testResultsExist: 'true'

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events