7

My team has some old bamboo pipelines, where secret and password are configured in bamboo variables and bamboo masks these values with ***** nobody knows the passwords now and it has not been documented.

Is there any way to access/print and see the values in bamboo [secret/password] variable?

Basil
  • 1,613
  • 12
  • 25
Shruthi Bhaskar
  • 1,212
  • 6
  • 20
  • 32

1 Answers1

12

There's a trick to read secret variables:

Create a Script task with content

echo ${bamboo_password_variable} > text.txt

Add artifact definition for *.txt pattern for a Job

Run build and look at text.txt artifact content.

  • I can confirm that the file will get the right content, but it is not possible to see it from Bamboo log. So the file should be pushed somewhere outside of Bamboo, then it can be viewed. – Shtefan Sep 01 '20 at 01:12
  • We are using Bamboo 6.10.3 and this does not work. the text file simply contains {bamboo_password_variable} without the dollar sign. We tried Shell, powershell and cmd and none of them worked. – d33j Aug 30 '22 at 06:25
  • for Windows you should use format echo %bamboo_password_variable% – Oleksiy Chystoprudov Aug 31 '22 at 08:46