From f71f8f199bab211744351609fe38c24685b7847e Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Fri, 17 May 2019 16:48:14 -0700 Subject: [PATCH] build: updated kokoro config for coverage and release-please (#481) --- .kokoro/continuous/node10/test.cfg | 19 ++++++++++++++++ .kokoro/release-candidate-issue.sh | 25 --------------------- .kokoro/release-requested.sh | 25 --------------------- .kokoro/release/publish.cfg | 9 ++++++++ .kokoro/release/release-candidate-issue.cfg | 22 ------------------ .kokoro/release/release-requested.cfg | 22 ------------------ .kokoro/test.sh | 8 +++++++ synth.metadata | 6 ++--- 8 files changed, 39 insertions(+), 97 deletions(-) delete mode 100755 .kokoro/release-candidate-issue.sh delete mode 100755 .kokoro/release-requested.sh delete mode 100644 .kokoro/release/release-candidate-issue.cfg delete mode 100644 .kokoro/release/release-requested.cfg diff --git a/.kokoro/continuous/node10/test.cfg b/.kokoro/continuous/node10/test.cfg index e69de29bb..38c174e6b 100644 --- a/.kokoro/continuous/node10/test.cfg +++ b/.kokoro/continuous/node10/test.cfg @@ -0,0 +1,19 @@ +# Bring in codecov.io master token into the build as $KOKORO_KEYSTORE_DIR/73713_dpebot_codecov_token +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} + +# token used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} diff --git a/.kokoro/release-candidate-issue.sh b/.kokoro/release-candidate-issue.sh deleted file mode 100755 index cd159a89c..000000000 --- a/.kokoro/release-candidate-issue.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright 2019 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 -eo pipefail - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) - -npx release-please candidate-issue --token=$GITHUB_TOKEN \ - --repo-url=googleapis/nodejs-bigtable \ - --package-name=@google-cloud/bigtable diff --git a/.kokoro/release-requested.sh b/.kokoro/release-requested.sh deleted file mode 100755 index 43bda8579..000000000 --- a/.kokoro/release-requested.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/bash - -# Copyright 2019 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 -eo pipefail - -export NPM_CONFIG_PREFIX=/home/node/.npm-global - -GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) - -npx release-please detect-checked --token=$GITHUB_TOKEN \ - --repo-url=googleapis/nodejs-bigtable \ - --package-name=@google-cloud/bigtable diff --git a/.kokoro/release/publish.cfg b/.kokoro/release/publish.cfg index 0baef0a66..637e3563b 100644 --- a/.kokoro/release/publish.cfg +++ b/.kokoro/release/publish.cfg @@ -9,6 +9,15 @@ before_action { } } +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + } + } +} + before_action { fetch_keystore { keystore_resource { diff --git a/.kokoro/release/release-candidate-issue.cfg b/.kokoro/release/release-candidate-issue.cfg deleted file mode 100644 index 458fd4e9b..000000000 --- a/.kokoro/release/release-candidate-issue.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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-bigtable/.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-bigtable/.kokoro/release-candidate-issue.sh" -} diff --git a/.kokoro/release/release-requested.cfg b/.kokoro/release/release-requested.cfg deleted file mode 100644 index 478f9036e..000000000 --- a/.kokoro/release/release-requested.cfg +++ /dev/null @@ -1,22 +0,0 @@ -# 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-bigtable/.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-bigtable/.kokoro/release-requested.sh" -} diff --git a/.kokoro/test.sh b/.kokoro/test.sh index bfc7b2615..5e474289e 100755 --- a/.kokoro/test.sh +++ b/.kokoro/test.sh @@ -35,3 +35,11 @@ if npx check-node-version@3.3.0 --silent --node $COVERAGE_NODE; then else echo "coverage is only reported for Node $COVERAGE_NODE" fi + +# if the GITHUB_TOKEN is set, we kick off a task to update the release-PR. +GITHUB_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_yoshi-automation-github-key) || true +if [ "$GITHUB_TOKEN" ]; then + npx release-please release-pr --token=$GITHUB_TOKEN \ + --repo-url=googleapis/nodejs-bigtable \ + --package-name=@google-cloud/bigtable +fi diff --git a/synth.metadata b/synth.metadata index ba2d8988c..8d128bb07 100644 --- a/synth.metadata +++ b/synth.metadata @@ -1,5 +1,5 @@ { - "updateTime": "2019-05-17T01:02:51.962312Z", + "updateTime": "2019-05-17T19:42:20.064756Z", "sources": [ { "generator": { @@ -12,8 +12,8 @@ "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "03269e767cff9dd644d7784a4d4350b2ba6daf69", - "internalRef": "248524261" + "sha": "99efb1441b7c2aeb75c69f8baf9b61d4221bb744", + "internalRef": "248724297" } }, {