Skip to content
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

Regenerate library with synth.py customizations #345

Merged
merged 13 commits into from
Sep 11, 2018
2 changes: 0 additions & 2 deletions .appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
environment:
GOOGLE_APPLICATION_CREDENTIALS: build/test/fake-certificate.json

matrix:
- nodejs_version: 8

Expand Down
13 changes: 8 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
name: Run sample tests.
command: npm run samples-test
environment:
GCLOUD_PROJECT: long-door-651
GCLOUD_PROJECT: node-gcloud-ci
jkwlui marked this conversation as resolved.
Show resolved Hide resolved
GOOGLE_APPLICATION_CREDENTIALS: /home/node/samples/.circleci/key.json
NPM_CONFIG_PREFIX: /home/node/.npm-global
- run:
Expand All @@ -149,21 +149,24 @@ jobs:
name: Decrypt credentials.
command: |
if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then
openssl aes-256-cbc -d -in .circleci/key.json.enc \
-out .circleci/key.json \
-k "${SYSTEM_TESTS_ENCRYPTION_KEY}"
for encrypted_key in .circleci/*.json.enc; do
openssl aes-256-cbc -d -in $encrypted_key \
-out $(echo $encrypted_key | sed 's/\.enc//') \
-k "${SYSTEM_TESTS_ENCRYPTION_KEY}"
done
fi
- run: *npm_install_and_link
- run:
name: Run system tests.
command: npm run system-test
environment:
GCLOUD_PROJECT: node-gcloud-ci
GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json
- run:
name: Remove unencrypted key.
command: |
if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then
rm .circleci/key.json
rm .circleci/*.json
fi
when: always
publish_npm:
Expand Down
13 changes: 13 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
extends:
- 'eslint:recommended'
- 'plugin:node/recommended'
- prettier
plugins:
- node
- prettier
rules:
prettier/prettier: error
block-scoped-var: error
eqeqeq: error
no-warning-comments: warn
4 changes: 2 additions & 2 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Copyright 2017 Google Inc. All Rights Reserved.
* Copyright 2018 Google LLC. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -36,7 +36,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2017 Google, Inc.',
copyright: 'Copyright 2018 Google, LLC.',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/firestore',
Expand Down
24 changes: 24 additions & 0 deletions .kokoro/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
24 changes: 24 additions & 0 deletions .kokoro/continuous/node10/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
Empty file.
24 changes: 24 additions & 0 deletions .kokoro/continuous/node6/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
Empty file.
24 changes: 24 additions & 0 deletions .kokoro/continuous/node8/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
4 changes: 4 additions & 0 deletions .kokoro/continuous/node8/docs.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/docs.sh"
}
4 changes: 4 additions & 0 deletions .kokoro/continuous/node8/lint.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/lint.sh"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/node8/samples-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/samples-test.sh"
}
7 changes: 7 additions & 0 deletions .kokoro/continuous/node8/system-test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Download resources for system tests (service account key, etc.)
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/google-cloud-nodejs"

env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/system-test.sh"
}
Empty file.
25 changes: 25 additions & 0 deletions .kokoro/docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

cd $(dirname $0)/..

npm install

npm run docs
31 changes: 31 additions & 0 deletions .kokoro/lint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

cd $(dirname $0)/..

npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..

npm run lint
24 changes: 24 additions & 0 deletions .kokoro/presubmit/node10/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
Empty file.
24 changes: 24 additions & 0 deletions .kokoro/presubmit/node6/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
Empty file.
24 changes: 24 additions & 0 deletions .kokoro/presubmit/node8/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

# Download trampoline resources.
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"

# Use the trampoline script to run in docker.
build_file: "nodejs-firestore/.kokoro/trampoline.sh"

# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/test.sh"
}
4 changes: 4 additions & 0 deletions .kokoro/presubmit/node8/docs.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/docs.sh"
}
4 changes: 4 additions & 0 deletions .kokoro/presubmit/node8/lint.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
value: "github/nodejs-firestore/.kokoro/lint.sh"
}
Empty file.
9 changes: 9 additions & 0 deletions .kokoro/presubmit/windows/common.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Format: //devtools/kokoro/config/proto/build.proto

# Build logs will be here
action {
define_artifacts {
regex: "**/*sponge_log.xml"
}
}

2 changes: 2 additions & 0 deletions .kokoro/presubmit/windows/test.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Use the test file directly
build_file: "nodejs-firestore/.kokoro/test.bat"
35 changes: 35 additions & 0 deletions .kokoro/samples-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -xeo pipefail

export NPM_CONFIG_PREFIX=/home/node/.npm-global

# Setup service account credentials.
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
export GCLOUD_PROJECT=node-gcloud-ci

cd $(dirname $0)/..

npm install

# Install and link samples
cd samples/
npm link ../
npm install
cd ..

npm run samples-test
Loading