tbone849
tbone849

Reputation: 955

How do you deploy firebase cloud functions to all aliases?

I have cloud functions set up for a project that will be used by multiple projects. I understand that you can deploy those functions to different projects using firebase use and adding/using aliases. Is there a way to deploy the functions to all known project aliases?

Upvotes: 0

Views: 1084

Answers (2)

Michael Bleigh
Michael Bleigh

Reputation: 26333

There is nothing built in to the Firebase CLI to do this as each project is considered to be a fully separate environment. You can use the --project <alias_or_project_id> flag to deploy to different aliases without having to switch using firebase use:

firebase deploy --project alias1
firebase deploy --project alias2
firebase deploy --project alias3

You could write a shell script to do all of those one after another or in parallel.

Upvotes: 3

Doug Stevenson
Doug Stevenson

Reputation: 317750

The Firebase CLI doesn't have a command for that. You can write a shell script or some other program to automate the execution of firebase deploy as many times as needed for each project you want to deploy.

Upvotes: 0

Related Questions