9 Commits

Author SHA1 Message Date
Daniel Lee
d9aaaec1f3 Deploy environment variables in dotenv files for functions (#3645)
Add support for setting up environment variables for functions using dotenv files.

On deploy, Firebase CLI looks for naive dotenv file (`.env`) file or project-specific ones (`.env.<project id>` or `.env.<project alias>`) files, loads environment variables, and injects them on deployed functions. Environment variable set in project-specific dotenv file wins, and you cannot have both `.<project id>` and `<.project alias>` files.

Environment variables are also loaded up on Firebase Emulators. Emulator will look for `.env` and `.env.local` files and ignore project-specific dotenv files.

We are hiding the feature behind `dotenv` preview flag. We want to get a feeling for the development experience from our users before an official launch + documentations.

Also including a small e2e test for env var support. It's meant to run manually by the Firebase team via command `node scripts/test-functions-env.js`.
2021-08-11 13:31:18 -07:00
Bryan Kendall
2dc7216a49 upgrade prettier (#3010)
* upgrade prettier

* prettier formatting
2021-01-08 16:01:31 -08:00
Lauren Long
64c0613b4c Fix functions deploy integration test script (#1703) 2019-10-08 16:00:27 -07:00
Bryan Kendall
4ca1528ed8 Format scripts directory (#1513)
* format and lint scripts

* allow ecma 2017 format (async/await in Node 8)

* format and fix scripts directory
2019-07-23 09:51:57 -07:00
joehan
5fdf11fd7b Scheduled functions via pubsub (#388)
* moving small thigns over

* moving small thigns over

* PubSub shceduled functions

* prettier

* prettier

* pr fixes;

* pr fixes;

* use real eventType

* reformat strings, style fixes

* remove unecessary repeated api check

* run prettier

* add tests for deployign scheduled functions, remove innaccurate comment

* clarify comment about eror handling

* changing format to be consistent

* delete now works when cloud scheduler or pubsub api is not enabled, integration tests now use newest firebase functions

* now checks labels to determine whether to delete schedule

* prettier

* changelog

* using chain instead of nested lodash functions

* adds warning comment re changing naming convention

* Clarify comments, standardize tense on changelog

* using varaibles to clarify;
2019-04-15 10:59:16 -07:00
Michael Bleigh
02f5e2eec9 Switch from outdated ESLint to Prettier (#731) 2018-04-10 18:29:02 -07:00
Lauren Long
26d4e2cabb Update functions deploy integration test to 0.5 SDK syntax (#190) 2017-03-07 17:32:05 -08:00
Lauren Long
0b4b8c73c1 modify integration tests to work with Functions v0.4.0 SDK (#136) 2016-12-17 05:48:43 +08:00
Lauren Long
922eb275e6 Add integration test for deployment of functions (#111) 2016-10-31 15:50:04 -07:00