Skip to content
This repository has been archived by the owner on Jul 13, 2023. It is now read-only.

Commit

Permalink
run synth.py to fix system-test (#117)
Browse files Browse the repository at this point in the history
* remove unused kwargs from synth.py

* run synth.py
  • Loading branch information
jkwlui authored Sep 6, 2018
1 parent b32ae19 commit 8e41b87
Show file tree
Hide file tree
Showing 14 changed files with 34 additions and 18 deletions.
11 changes: 7 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: long-door-651
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
2 changes: 1 addition & 1 deletion .kokoro/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous/node10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous/node6/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:6"
value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/continuous/node8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:8"
value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 2 additions & 0 deletions .kokoro/docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -xeo pipefail

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

cd $(dirname $0)/..

npm install
Expand Down
2 changes: 2 additions & 0 deletions .kokoro/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -xeo pipefail

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

cd $(dirname $0)/..

npm install
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node10/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10"
value: "gcr.io/cloud-devrel-kokoro-resources/node:10-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node6/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:6"
value: "gcr.io/cloud-devrel-kokoro-resources/node:6-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 1 addition & 1 deletion .kokoro/presubmit/node8/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build_file: "nodejs-monitoring/.kokoro/trampoline.sh"
# Configure the docker image for kokoro-trampoline.
env_vars: {
key: "TRAMPOLINE_IMAGE"
value: "gcr.io/cloud-devrel-kokoro-resources/node:8"
value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user"
}
env_vars: {
key: "TRAMPOLINE_BUILD_FILE"
Expand Down
2 changes: 2 additions & 0 deletions .kokoro/samples-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

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=long-door-651
Expand Down
8 changes: 8 additions & 0 deletions .kokoro/system-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,19 @@

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=long-door-651

cd $(dirname $0)/..

# Run a pre-test hook, if a pre-system-test.sh is in the project
if [ -f .kokoro/pre-system-test.sh ]; then
. .kokoro/pre-system-test.sh
fi

npm install

npm run system-test
2 changes: 2 additions & 0 deletions .kokoro/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

set -xeo pipefail

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

cd $(dirname $0)/..

npm install
Expand Down
11 changes: 4 additions & 7 deletions synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,17 @@

logging.basicConfig(level=logging.DEBUG)

gapic = gcp.GAPICGenerator()
common_templates = gcp.CommonTemplates()

version = "v3"

library = gapic.node_library("monitoring", version,
config_path="/google/monitoring/artman_monitoring.yaml")
library = gapic.node_library(
"monitoring", version, config_path="/google/monitoring/artman_monitoring.yaml"
)

s.copy(library, excludes=["src/index.js", "README.md", "package.json"])

templates = common_templates.node_library(
package_name="@google-cloud/monitoring",
repo_name="googleapis/nodejs-monitoring")

templates = common_templates.node_library()
s.copy(templates)

"""
Expand Down

0 comments on commit 8e41b87

Please sign in to comment.