mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: switch to new dashboard firebase instance (#4954)
* Switches to a new Firebase instance for the Dashboard.
This commit is contained in:
committed by
Andrew Seguin
parent
cebb516e93
commit
7af93bc5e3
@@ -13,7 +13,7 @@ cd ${dashboardFolder}
|
||||
# before it can collect all functions and deploy them.
|
||||
(cd functions; npm install)
|
||||
|
||||
if [ -z ${MATERIAL2_DASHBOARD_ACCESS_TOKEN} ]; then
|
||||
if [ -z ${MATERIAL2_BOARD_FIREBASE_DEPLOY_KEY} ]; then
|
||||
echo "Error: No access token for firebase specified." \
|
||||
"Please set the environment variable 'MATERIAL2_DASHBOARD_ACCESS_TOKEN'."
|
||||
exit 1
|
||||
@@ -21,4 +21,4 @@ fi
|
||||
|
||||
# Deploy the dashboard functions to Firebase. For now only the functions will be deployed.
|
||||
$(npm bin)/firebase deploy \
|
||||
--only functions --token ${MATERIAL2_DASHBOARD_ACCESS_TOKEN} --project material2-dashboard
|
||||
--only functions --token ${MATERIAL2_BOARD_FIREBASE_DEPLOY_KEY} --project material2-board
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "material2-dashboard-functions",
|
||||
"name": "material2-board-functions",
|
||||
"version": "0.0.1",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
|
||||
@@ -11,13 +11,13 @@ export function openFirebaseDashboardApp() {
|
||||
// Credentials need to be for a Service Account, which can be created in the Firebase console.
|
||||
return firebaseAdmin.initializeApp({
|
||||
credential: firebaseAdmin.credential.cert({
|
||||
project_id: 'material2-dashboard',
|
||||
client_email: 'firebase-adminsdk-ch1ob@material2-dashboard.iam.gserviceaccount.com',
|
||||
project_id: 'material2-board',
|
||||
client_email: 'material2-board@appspot.gserviceaccount.com',
|
||||
// In Travis CI the private key will be incorrect because the line-breaks are escaped.
|
||||
// The line-breaks need to persist in the service account private key.
|
||||
private_key: decode(process.env['MATERIAL2_DASHBOARD_FIREBASE_KEY'])
|
||||
private_key: decode(process.env['MATERIAL2_BOARD_FIREBASE_SERVICE_KEY'])
|
||||
}),
|
||||
databaseURL: 'https://material2-dashboard.firebaseio.com'
|
||||
databaseURL: 'https://material2-board.firebaseio.com'
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user