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
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
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ben Calnan ,
Could you provide us with more details about your case?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.