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

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

Avatar

1 badge earned

Collect

Participate in fun challenges

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

Challenges
Coins

Gift kudos to your peers

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

Recognition
Ribbon

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!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,554,077
Community Members
 
Community Events
184
Community Groups

Bitbucket is injecting environment variable into my values.yaml file

I have a values.yaml file that I use in a helm command in my bitbucket pipeline.

I created a custom pipeline that I run manually.

Below are the beginning parts of my pipeline:

- step: &deploy-my-project
        name: Deploy My Project
        image: ubuntu:latest
        services:
          - docker
        caches:
          - node
          - docker
          - apt
        script:
          - cat "account-setup/scripts/argocd/values.yaml"

At this point, all instances of the word "password" in the file have been replaced with one of my environment variables.

An example:
this:
abc.password.value: "put something here" #TODO remove
Has been replaced with this:
abc.$MY_ADMIN_PASSWORD.value: "put something here" #TODO remove
Why is this happening?
How do I fix this?

I have tried changing the name of the file and that hasn't helped.

Any help would be much appreciated.
Thanks

1 answer

1 accepted

0 votes
Answer accepted
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Apr 26, 2023

Hey Quintonn,

The environment variable will be injected if you have a secured variable that contains this value to obscure it from view.

For example, say you have a secured variable called $TEST with a value of "helloworld", if you then reference helloworld in plaintext in your configuration - it will automatically insert $TEST as a placeholder to prevent this value from being exposed.

Please review your $MY_ADMIN_PASSWORD variable - you can test by deleting it or changing the value to something completely different to see if it is still inserted when you enter "password". 

Cheers!

- Ben (Bitbucket Cloud Support)

Hi,

This is indeed the case.
I did notice this, and I thought my pipeline was failing because it was actually putting the $ value into my files, but it seems it's only for log output.

My problem was unrelated to the passwords and I've figured it out already. Thanks.


Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events