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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is it possible to set the firebase environment configuration?

I started deploying to firebase from bitbucket pipelines with the atlassian pipe. However i did not see a way to set environment configuration as often necessary:

https://firebase.google.com/docs/functions/config-env

 

Did I miss the docs or do I simply have to use bare bones firebase-tools?

 

Best,

Tobi

2 answers

1 accepted

0 votes
Answer accepted

Hi @tobias_eisenschenk , 
Currently, the firebase-deploy pipe doesn't have a way to set environment configuration, but we will consider this option in the upcoming pipe releases. 


Thank you for the feedback. We'll notify you about updates.

Cheers,
Viktoriia

0 votes

Hi @tobias_eisenschenk . We're currently considering adding a support for configuring the environment from a pipe. Could you describe your use case a bit more so we can better understand how to improve the pipe? Thanks a lot!

My use case is to deploy firebase cloud-functions along with environment specific configuration (firebase config).

Something like this:

script: 
-
npm --prefix ./functions install
- npm install -g firebase-tools
- firebase use $PROJECT_ID
- firebase functions:config:set environment.database_url=$ENVIRONMENT_DATABASE_URL
- pipe: atlassian/firebase-deploy:0.3.4
variables: FIREBASE_TOKEN: $FIREBASE_TOKEN PROJECT_ID: $PROJECT_ID MESSAGE: "Deploying $BITBUCKET_COMMIT (CI/CD)" EXTRA_ARGS: "--non-interactive --only functions:$FUNCTION_NAME"

As you can see I started using the atlassian pipe, but then had to use the firebase-tools cli as well.

@tobias_eisenschenk I came with the idea to set the env in linux: 

script:
- export PROD=false
- pipe: atlassian/firebase-deploy:0.3.8
variables:
FIREBASE_TOKEN: $FIREBASE_TOKEN
PROJECT_ID: $FIREBASE_PROJECT

And then to get it by using node's method:

process.env.PROD 

Actually it didnt work in my code. But probably you will make it.

hi @Alexander Zhukov , just wondering if you were are planning to implement this? Would be super useful to be able to set  functions.config env variables within the pipe using values stored in bitbucket variables.

Hi @Ben Calnan ,

Could you provide us with more details about your case?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket Pipelines

What We Learned When We Researched Open Source Vulnerabilities in 7 Popular Coding Languages

...hey are a part of us, shaping how we interact with the world around us. The same holds true for programming languages when we think about how different kinds of vulnerabilities raise their heads in t...

1,225 views 0 3
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you