From 56e38f768c076982f72e3eb65d98b249822dbb9d Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Fri, 2 Nov 2018 11:58:55 -0700 Subject: [PATCH 01/14] add new script for testing hosting --- .travis.yml | 4 ++ scripts/creds-private.json.enc | Bin 0 -> 2352 bytes scripts/creds-public.json.enc | Bin 0 -> 2352 bytes scripts/test-hosting.sh | 71 +++++++++++++++++++++++++++++++++ src/api.js | 3 ++ src/requireAuth.js | 6 +-- 6 files changed, 81 insertions(+), 3 deletions(-) create mode 100644 scripts/creds-private.json.enc create mode 100644 scripts/creds-public.json.enc create mode 100755 scripts/test-hosting.sh diff --git a/.travis.yml b/.travis.yml index adfc68c0d05..650dbfca38e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,8 +4,12 @@ node_js: - '8' - '10' sudo: false +before_script: +- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-public.json.enc -out scripts/creds-public.json -d +- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-private.json.enc -out scripts/creds-private.json -d after_script: - nyc report --reporter=text-lcov | coveralls +- ./scripts/test-hosting.sh cache: directories: - node_modules diff --git a/scripts/creds-private.json.enc b/scripts/creds-private.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..198b5dba2f992518b83829e83feaeb4c5232a129 GIT binary patch literal 2352 zcmV-03D5T1_E)tIxbw_0C%eS-8nxVcQUh`L5L(*L^-3S9>)(-h5*AjD+dkkQXL{tunq1U!uecjUj_A!o zAYHL;J8vM!%e6#jog8rpM)-Rv8Lq{XwW7lq>xNwZBmDA? zvN1}BM#4mkckKJ`NY-Y&G48~dbsDG~A7O=!JVGrxPOP|gg}UY!8=DquK~l_zwBz*E z3V0euj#Z+5{2OyJ+*XO_l#;A$p1oX^YG&nO%aJXSI9P2;AdQoe-YBX*psL;_N7pqF z|NgPYUc!;$xN#rbkDqLR#&`T)%ViS%81Cilg5(>P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Q3cpa66}LY1cVhBq?KYc1Pq`2@LUPeAgsxz|Rc-%_D)mgYPie?4V) zUCpoRvT@WGF>8)nQ~$IujWt!&B(N^4(UvE7!?;Hp4VhDF5C@3x+qVcj7=s|-ZJHk>C%Jq)- zLPZaa$>1$|dFRh#?ds0FLnPpm9vt%%7WJ{?FZ4I6Xbr!;GKZRKO<>U_H!MYbzhe;F z?`ZR;1XTp|;ArLZ^v literal 0 HcmV?d00001 diff --git a/scripts/creds-public.json.enc b/scripts/creds-public.json.enc new file mode 100644 index 0000000000000000000000000000000000000000..ff5aa290480b6c01ed499c4a09f46d2463c11912 GIT binary patch literal 2352 zcmV-03D5SNysK)#Iqv22ae}(1W$eV7M4nk@fjTgVu%RbnXFbO83r}QUTsLRgGbSgd zF12(ddXU66wPL~x!uUr#Z3n==`13WEjE4~SRXV?cEa_|>iP=ZJGhD^@iUE7OL)}dE zASnO=yfY)PKnUF<)0k&kHGk;C;Ptgqy>k%2 z>pebTm~|oE3enbo{Vjj_M`Z%Gqx4DY>1$a%R_(x2(px?a?W@T8Te|VBG7z0qExG3Z z1it%@htsfbyF8bf_WSl4Jl=+Q8P)ocqQkpx>la)C9~u<;e82c--2q_|gP9l97N^uU zfUWld6QTUVs`9Ie3O0><`2es6PTN~>s)`vnuY|0dZsVuSyI|Jo!e7Oes9^`#)jcIvp%u&v-Yt$y`^?V_xY$l4DLyKWQW z4I-7`hYKmoK2|(gD?R^TK7d4wZlAxDZu=2%i`5k*^@j*?A}7({Qm-M~oU&F9cG;Bu z;St;0S=s*1kgljzCuqqLjlpUwWRtaxM_)i}%kRm??zz;jX~nVuKa_J3 z`L7zX>@~j+bQX%S8TT>BQ$+JjBg}2qnUbi*a5k0zXEX2smddThYcK3VbWXEichi=G zjraeiU_fh#nlo0V!j7fz{5Secr!_Yxr8KnCy40;(T#Y>?)_v_b_S&gT9mMBk)FB@= z1pf@s@f^a1n0c1YQGa9#JDaPqBiTy8LnbpV07Nzn`ZB6tTf+71ix^!j+XZI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1PY^Cpc;JL{RZwno15?~&9%&)O&s z_&t5K)EWR=l<86!gFr;CPM>GK7*9r;q(-Yk<+AoiE5~71` z_<H}GJPN "firebase.json" <<- EOM +{ + "hosting": { + "public": "public", + "ignore": [ + "firebase.json", + "**/.*", + "**/node_modules/**" + ] + } +} +EOM +mkdir "public" +touch "public/${TARGET_FILE}" +echo "${DATE}" > "public/${TARGET_FILE}.txt" +echo "Initalized temp directory." + +echo "Testing local serve..." +PORT=8685 +firebase serve --only hosting --project "${FBTOOLS_TARGET_PROJECT}" --port "${PORT}" & +PID="$!" +sleep 5 +VALUE="$(curl localhost:${PORT}/${TARGET_FILE})" +test "${DATE}" = "${VALUE}" || (echo "Expected ${VALUE} to equal ${DATE}." && false) +kill "$PID" +echo "Tested local serve." + +echo "Testing hosting deployment..." +firebase deploy --only hosting --project "${FBTOOLS_TARGET_PROJECT}" +sleep 5 +VALUE="$(curl https://${FBTOOLS_TARGET_PROJECT}.firebaseapp.com/${TARGET_FILE})" +test "${DATE}" = "${VALUE}" || (echo "Expected ${VALUE} to equal ${DATE}." && false) +echo "Tested hosting deployment." diff --git a/src/api.js b/src/api.js index 40b01a72019..1957f841659 100644 --- a/src/api.js +++ b/src/api.js @@ -133,6 +133,9 @@ var api = { setAccessToken: function(token) { accessToken = token; }, + getScopes: function() { + return commandScopes; + }, setScopes: function(s) { commandScopes = _.uniq( _.flatten( diff --git a/src/requireAuth.js b/src/requireAuth.js index 731dea0ab82..ab3d4a7a456 100644 --- a/src/requireAuth.js +++ b/src/requireAuth.js @@ -33,9 +33,9 @@ function _autoAuth(options, authScopes) { }); } -module.exports = function(options, authScopes) { +module.exports = function(options) { api.setScopes([scopes.CLOUD_PLATFORM, scopes.FIREBASE_PLATFORM]); - options.authScopes = api.commandScopes; + options.authScopes = api.getScopes(); var tokens = configstore.get("tokens"); var user = configstore.get("user"); @@ -48,7 +48,7 @@ module.exports = function(options, authScopes) { } else if (user) { logger.debug("> authorizing via signed-in user"); } else { - return _autoAuth(options, authScopes); + return _autoAuth(options, options.authScopes); } tokenOpt = tokenOpt || process.env.FIREBASE_TOKEN; From 9a0e14c8d8d67f5e36f924c5a84d04705e453ce5 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Fri, 2 Nov 2018 12:05:10 -0700 Subject: [PATCH 02/14] adding fail-safes to decrypting --- .travis.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 650dbfca38e..5ac93f4dbf7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,8 +5,9 @@ node_js: - '10' sudo: false before_script: -- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-public.json.enc -out scripts/creds-public.json -d -- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-private.json.enc -out scripts/creds-private.json -d +- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-public.json.enc -out scripts/creds-public.json -d || true +- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-private.json.enc -out scripts/creds-private.json -d || true +- test -f scripts/creds-public.json || test -f scripts/creds-private.json || (echo "No Credentials Decrypted" && false) after_script: - nyc report --reporter=text-lcov | coveralls - ./scripts/test-hosting.sh From eeb6259fe26b3d4d43800a3f53971d65b6c31a22 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Fri, 2 Nov 2018 12:08:05 -0700 Subject: [PATCH 03/14] remove stop --- scripts/test-hosting.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index f93c6d9158c..46ba2193cf7 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -13,7 +13,6 @@ echo "Running in ${CWD}" echo "Running with node: $(which node)" echo "Running with npm: $(which npm)" echo "Running with Application Creds: ${GOOGLE_APPLICATION_CREDENTIALS}" -false echo "Target project: ${FBTOOLS_TARGET_PROJECT}" From 08fbd0e94763a6c7582990f75f49845201c59c38 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Fri, 2 Nov 2018 12:17:44 -0700 Subject: [PATCH 04/14] export GAC --- scripts/test-hosting.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index 46ba2193cf7..20083acc1ab 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -8,6 +8,7 @@ GOOGLE_APPLICATION_CREDENTIALS="${CWD}/scripts/creds-private.json" if [ "${TRAVIS_REPO_SLUG}" == "firebase/firebase-tools" ]; then GOOGLE_APPLICATION_CREDENTIALS="${CWD}/scripts/creds-public.json" fi +export GOOGLE_APPLICATION_CREDENTIALS echo "Running in ${CWD}" echo "Running with node: $(which node)" From 1b8a08f1d53ec46b72c7ebebed374d4a7c795b05 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Fri, 2 Nov 2018 12:31:10 -0700 Subject: [PATCH 05/14] add fixes for local testing --- scripts/test-hosting.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index 20083acc1ab..5b0c98a74b1 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -1,8 +1,14 @@ #!/usr/bin/env bash set -e +if [ "${TRAVIS}" != "true" ]; then + TRAVIS_COMMIT="localtesting" + TRAVIS_JOB_ID="$(echo $RANDOM)" + TRAVIS_REPO_SLUG="firebase/firebase-tools" +fi + CWD="$(pwd)" -TARGET_FILE="${TRAVIS_COMMIT}-${TRAVIS_JOB_ID}" +TARGET_FILE="${TRAVIS_COMMIT}-${TRAVIS_JOB_ID}.txt" GOOGLE_APPLICATION_CREDENTIALS="${CWD}/scripts/creds-private.json" if [ "${TRAVIS_REPO_SLUG}" == "firebase/firebase-tools" ]; then @@ -50,7 +56,7 @@ cat > "firebase.json" <<- EOM EOM mkdir "public" touch "public/${TARGET_FILE}" -echo "${DATE}" > "public/${TARGET_FILE}.txt" +echo "${DATE}" > "public/${TARGET_FILE}" echo "Initalized temp directory." echo "Testing local serve..." @@ -61,6 +67,7 @@ sleep 5 VALUE="$(curl localhost:${PORT}/${TARGET_FILE})" test "${DATE}" = "${VALUE}" || (echo "Expected ${VALUE} to equal ${DATE}." && false) kill "$PID" +wait echo "Tested local serve." echo "Testing hosting deployment..." From 784edca4d22b2c8e24abfc67a63ad07107cf4444 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 08:55:17 -0800 Subject: [PATCH 06/14] add job for running hosting test --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 5ac93f4dbf7..d248d51905f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,11 @@ before_script: - test -f scripts/creds-public.json || test -f scripts/creds-private.json || (echo "No Credentials Decrypted" && false) after_script: - nyc report --reporter=text-lcov | coveralls -- ./scripts/test-hosting.sh +jobs: + include: + - stage: hosting functional test + node_js: '6' + script: ./scripts/test-hosting.sh cache: directories: - node_modules From acdb6591198ad699a53cbc50321a724f57d8a3b1 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 08:55:29 -0800 Subject: [PATCH 07/14] print out commands in script --- scripts/test-hosting.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index 5b0c98a74b1..92bdd60a4f0 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -e +set -ev if [ "${TRAVIS}" != "true" ]; then TRAVIS_COMMIT="localtesting" From 7c09fc91ea8ee595e43fbec5bae4eba213b45899 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 09:12:50 -0800 Subject: [PATCH 08/14] skip after_script --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index d248d51905f..8c09b4960c2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ jobs: - stage: hosting functional test node_js: '6' script: ./scripts/test-hosting.sh + after_script: skip cache: directories: - node_modules From 6f3c3c7522652b6e36625f0e7d0873b7fdb8a754 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 10:40:16 -0800 Subject: [PATCH 09/14] stop being verbose --- scripts/test-hosting.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index 92bdd60a4f0..5b0c98a74b1 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -ev +set -e if [ "${TRAVIS}" != "true" ]; then TRAVIS_COMMIT="localtesting" From 3b3d423fbc2981e4b9b2b905766f1695068a7428 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 11:02:54 -0800 Subject: [PATCH 10/14] break --- scripts/test-hosting.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index 5b0c98a74b1..4e948736126 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -7,6 +7,7 @@ if [ "${TRAVIS}" != "true" ]; then TRAVIS_REPO_SLUG="firebase/firebase-tools" fi +false CWD="$(pwd)" TARGET_FILE="${TRAVIS_COMMIT}-${TRAVIS_JOB_ID}.txt" From f372a5292f3c70388dac7c245f31e5662271a642 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 11:08:15 -0800 Subject: [PATCH 11/14] unbreak --- scripts/test-hosting.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/scripts/test-hosting.sh b/scripts/test-hosting.sh index 4e948736126..5b0c98a74b1 100755 --- a/scripts/test-hosting.sh +++ b/scripts/test-hosting.sh @@ -7,7 +7,6 @@ if [ "${TRAVIS}" != "true" ]; then TRAVIS_REPO_SLUG="firebase/firebase-tools" fi -false CWD="$(pwd)" TARGET_FILE="${TRAVIS_COMMIT}-${TRAVIS_JOB_ID}.txt" From 6c69a88de1a398effd0921d2703751818c6c89e4 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 11:39:52 -0800 Subject: [PATCH 12/14] move decrypt --- .travis.yml | 5 +---- scripts/decrypt-app-credentials.sh | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 4 deletions(-) create mode 100755 scripts/decrypt-app-credentials.sh diff --git a/.travis.yml b/.travis.yml index 8c09b4960c2..18cae39b04c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -4,16 +4,13 @@ node_js: - '8' - '10' sudo: false -before_script: -- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-public.json.enc -out scripts/creds-public.json -d || true -- openssl aes-256-cbc -K $encrypted_830857fa25dd_key -iv $encrypted_830857fa25dd_iv -in scripts/creds-private.json.enc -out scripts/creds-private.json -d || true -- test -f scripts/creds-public.json || test -f scripts/creds-private.json || (echo "No Credentials Decrypted" && false) after_script: - nyc report --reporter=text-lcov | coveralls jobs: include: - stage: hosting functional test node_js: '6' + before_script: ./scripts/decrypt-app-credentials.sh script: ./scripts/test-hosting.sh after_script: skip cache: diff --git a/scripts/decrypt-app-credentials.sh b/scripts/decrypt-app-credentials.sh new file mode 100755 index 00000000000..c24282fda18 --- /dev/null +++ b/scripts/decrypt-app-credentials.sh @@ -0,0 +1,18 @@ +#!/bin/#!/usr/bin/env bash +set -e + +openssl aes-256-cbc \ + -K $encrypted_830857fa25dd_key \ + -iv $encrypted_830857fa25dd_iv \ + -in scripts/creds-public.json.enc \ + -out scripts/creds-public.json \ + -d || true + +openssl aes-256-cbc \ + -K $encrypted_830857fa25dd_key \ + -iv $encrypted_830857fa25dd_iv \ + -in scripts/creds-private.json.enc \ + -out scripts/creds-private.json \ + -d || true + +test -f scripts/creds-public.json || test -f scripts/creds-private.json || (echo "No Credentials Decrypted" && false) From 85e663b60a542e50e8c19c87acefd1ad4b687b8e Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 11:43:48 -0800 Subject: [PATCH 13/14] fix env string --- scripts/decrypt-app-credentials.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/decrypt-app-credentials.sh b/scripts/decrypt-app-credentials.sh index c24282fda18..ce6856f9271 100755 --- a/scripts/decrypt-app-credentials.sh +++ b/scripts/decrypt-app-credentials.sh @@ -1,4 +1,4 @@ -#!/bin/#!/usr/bin/env bash +#!/usr/bin/env bash set -e openssl aes-256-cbc \ From 4f733e5dd2122afeb0f4b43e52c44274e37066c5 Mon Sep 17 00:00:00 2001 From: Bryan Kendall Date: Mon, 5 Nov 2018 11:59:07 -0800 Subject: [PATCH 14/14] add ignore for generated files during testing --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 693d4769dec..525ddb9b7b6 100644 --- a/.gitignore +++ b/.gitignore @@ -11,5 +11,7 @@ yarn.lock .DS_Store .idea *.iml +*.tgz +scripts/*.json lib/