mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
build: add dashboard firebase functions (#4806)
* build: add dashboard firebase functions * Adds a new folder for the dashboard project that for now only contains firebase functions. * The firebase functions will be used to securely make API calls to the Github API (e.g payload status) * Functions will be automatically deployed as same as screenshot functions. * Address feedback
This commit is contained in:
committed by
mmalerba
parent
f169152638
commit
964033ce8d
@@ -22,10 +22,11 @@ $(npm bin)/gulp docs
|
||||
|
||||
# Run publishing of artifacts in parallel.
|
||||
# This is possible because the output has been built before.
|
||||
./scripts/release/publish-build-artifacts.sh --no-build &
|
||||
./scripts/release/publish-docs-content.sh --no-build &
|
||||
./scripts/deploy/publish-build-artifacts.sh --no-build &
|
||||
./scripts/deploy/publish-docs-content.sh --no-build &
|
||||
|
||||
# Deploy the screenshot functions for each push build.
|
||||
./scripts/release/deploy-screenshot-functions.sh &
|
||||
# Deploy the screenshot and dashboard functions for each push build.
|
||||
./scripts/deploy/deploy-screenshot-functions.sh &
|
||||
./scripts/deploy/deploy-dashboard-functions.sh &
|
||||
|
||||
wait
|
||||
|
||||
Executable
+24
@@ -0,0 +1,24 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Go to the project root directory
|
||||
cd $(dirname ${0})/../..
|
||||
|
||||
# Paths to the dashboard and functions directories.
|
||||
dashboardFolder=tools/dashboard
|
||||
|
||||
# Go to the dashboard folder because otherwise the Firebase CLI tries to deploy the wrong project.
|
||||
cd ${dashboardFolder}
|
||||
|
||||
# Install node modules for dashboard functions. Firebase CLI needs to execute the functions
|
||||
# before it can collect all functions and deploy them.
|
||||
(cd functions; npm install)
|
||||
|
||||
if [ -z ${MATERIAL2_DASHBOARD_ACCESS_TOKEN} ]; 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
|
||||
Reference in New Issue
Block a user