-
Notifications
You must be signed in to change notification settings - Fork 903
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'tc-management' into tc-addFirebase
- Loading branch information
Showing
27 changed files
with
184 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* Introduce experimental support for browser clients to the Firestore emulator. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
* Allow passing `GOOGLE_APPLICATION_CREDENTIALS` environment variable into the functions emulator. | ||
* Set FIREBASE_DATABASE_EMULATOR_HOST in emulators:exec. | ||
* Add new project management commands: `projects:create`, `projects:list`. | ||
* Add new app management commands: `apps:create`, `apps:list`, `apps:sdkconfig`. | ||
* Improve `init` command to be able to create a new project. | ||
* Add new project management commands: `projects:create`, `projects:list` | ||
* Add new app management commands: `apps:create`, `apps:list`, `apps:sdkconfig`, `apps:addfirebase | ||
* Improve `init` command to be able to create a new project |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
FROM node:8.16.0 | ||
|
||
# Install dependencies | ||
RUN apt-get update && \ | ||
apt-get install -y curl git jq | ||
|
||
# Install npm at 6.10.2. | ||
RUN npm install --global npm@6.10.2 | ||
|
||
# Install hub | ||
RUN curl -fsSL --output hub.tgz https://github.com/github/hub/releases/download/v2.11.2/hub-linux-amd64-2.11.2.tgz | ||
RUN tar --strip-components=2 -C /usr/bin -xf hub.tgz hub-linux-amd64-2.11.2/bin/hub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
steps: | ||
- name: 'gcr.io/cloud-builders/docker' | ||
args: ['build', '-t', 'gcr.io/$PROJECT_ID/package-builder', '.'] | ||
images: ['gcr.io/$PROJECT_ID/package-builder'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
originals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
steps: | ||
# Decrypt the SSH key. | ||
- name: 'gcr.io/cloud-builders/gcloud' | ||
args: ['kms', 'decrypt', '--ciphertext-file=deploy_key.enc', '--plaintext-file=/root/.ssh/id_rsa', '--location=global', '--keyring=${_KEY_RING}', '--key=${_KEY_NAME}'] | ||
|
||
# Decrypt the Twitter credentials. | ||
- name: 'gcr.io/cloud-builders/gcloud' | ||
args: ['kms', 'decrypt', '--ciphertext-file=twitter.json.enc', '--plaintext-file=twitter.json', '--location=global', '--keyring=${_KEY_RING}', '--key=${_KEY_NAME}'] | ||
|
||
# Decrypt the npm credentials. | ||
- name: 'gcr.io/cloud-builders/gcloud' | ||
args: ['kms', 'decrypt', '--ciphertext-file=npmrc.enc', '--plaintext-file=npmrc', '--location=global', '--keyring=${_KEY_RING}', '--key=${_KEY_NAME}'] | ||
|
||
# Decrypt the hub (GitHub) credentials. | ||
- name: 'gcr.io/cloud-builders/gcloud' | ||
args: ['kms', 'decrypt', '--ciphertext-file=hub.enc', '--plaintext-file=hub', '--location=global', '--keyring=${_KEY_RING}', '--key=${_KEY_NAME}'] | ||
|
||
# Set up git with key and domain. | ||
- name: 'gcr.io/cloud-builders/git' | ||
entrypoint: 'bash' | ||
args: | ||
- '-c' | ||
- | | ||
chmod 600 /root/.ssh/id_rsa | ||
cat <<EOF >/root/.ssh/config | ||
Hostname github.com | ||
IdentityFile /root/.ssh/id_rsa | ||
EOF | ||
ssh-keyscan github.com >> /root/.ssh/known_hosts | ||
# Clone the repository. | ||
- name: 'gcr.io/cloud-builders/git' | ||
args: ['clone', 'git@github.com:${_REPOSITORY_ORG}/${_REPOSITORY_NAME}'] | ||
|
||
# Set up the Git configuration. | ||
- name: 'gcr.io/cloud-builders/git' | ||
dir: '${_REPOSITORY_NAME}' | ||
args: ['config', '--global', 'user.email', 'firebase-oss-bot@google.com'] | ||
- name: 'gcr.io/cloud-builders/git' | ||
dir: '${_REPOSITORY_NAME}' | ||
args: ['config', '--global', 'user.name', 'Google Open Source Bot'] | ||
|
||
# Set up the Twitter credentials. | ||
- name: 'gcr.io/$PROJECT_ID/package-builder' | ||
entrypoint: 'cp' | ||
args: ['-v', 'twitter.json', '${_REPOSITORY_NAME}/scripts/twitter.json'] | ||
|
||
# Set up the npm credentials. | ||
- name: 'gcr.io/$PROJECT_ID/package-builder' | ||
entrypoint: 'bash' | ||
args: ['-c', 'cp -v npmrc ~/.npmrc'] | ||
|
||
# Set up the hub credentials. | ||
- name: 'gcr.io/$PROJECT_ID/package-builder' | ||
entrypoint: 'bash' | ||
args: ['-c', 'mkdir -vp ~/.config && cp -v hub ~/.config/hub'] | ||
|
||
# Publish the package. | ||
- name: 'gcr.io/$PROJECT_ID/package-builder' | ||
dir: '${_REPOSITORY_NAME}' | ||
args: ['bash', './scripts/publish.sh', '${_VERSION}'] | ||
env: | ||
- 'REPOSITORY_ORG=${_REPOSITORY_ORG}' | ||
- 'REPOSITORY_NAME=${_REPOSITORY_NAME}' | ||
|
||
options: | ||
volumes: | ||
- name: 'ssh' | ||
path: /root/.ssh | ||
|
||
substitutions: | ||
_VERSION: '' | ||
_KEY_RING: 'cloud-build-ring' | ||
_KEY_NAME: 'publish' | ||
_REPOSITORY_ORG: 'firebase' | ||
_REPOSITORY_NAME: 'firebase-tools' |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
CWD="$(pwd)" | ||
|
||
if [ "${TRAVIS}" != "true" ]; then | ||
export TRAVIS_COMMIT="localtesting" | ||
export TRAVIS_JOB_ID="$(echo $RANDOM)" | ||
export TRAVIS_REPO_SLUG="firebase/firebase-tools" | ||
fi | ||
|
||
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 "Application Default Credentials: ${GOOGLE_APPLICATION_CREDENTIALS}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.