Skip to content

build: switch to new dashboard firebase instance #4954

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/deploy/deploy-dashboard-functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ 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
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
2 changes: 1 addition & 1 deletion tools/dashboard/functions/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "material2-dashboard-functions",
"name": "material2-board-functions",
"version": "0.0.1",
"main": "index.js",
"dependencies": {
Expand Down
8 changes: 4 additions & 4 deletions tools/gulp/util/firebase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
});
}

Expand Down