This repository has been archived by the owner on Jun 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add new kokoro config for coverage and release-please (#223)
- Loading branch information
1 parent
df1f1d8
commit f8a9a6f
Showing
14 changed files
with
153 additions
and
30 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 |
---|---|---|
@@ -1,9 +0,0 @@ | ||
# 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" | ||
} | ||
} | ||
} | ||
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 |
---|---|---|
@@ -1,9 +0,0 @@ | ||
# 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" | ||
} | ||
} | ||
} | ||
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,25 @@ | ||
#!/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/gcs-resumable-upload \ | ||
--package-name=gcs-resumable-upload |
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,25 @@ | ||
#!/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/gcs-resumable-upload \ | ||
--package-name=gcs-resumable-upload |
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,8 @@ | ||
before_action { | ||
fetch_keystore { | ||
keystore_resource { | ||
keystore_config_id: 73713 | ||
keyname: "yoshi-automation-github-key" | ||
} | ||
} | ||
} |
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,22 @@ | ||
# 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: "gcs-resumable-upload/.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/gcs-resumable-upload/.kokoro/release-candidate-issue.sh" | ||
} |
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,22 @@ | ||
# 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: "gcs-resumable-upload/.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/gcs-resumable-upload/.kokoro/release-requested.sh" | ||
} |
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 |
---|---|---|
|
@@ -42,3 +42,16 @@ if [ -f samples/package.json ]; then | |
|
||
npm run samples-test | ||
fi | ||
|
||
# codecov combines coverage across integration and unit tests. Include | ||
# the logic below for any environment you wish to collect coverage for: | ||
COVERAGE_NODE=10 | ||
if npx [email protected] --silent --node $COVERAGE_NODE; then | ||
NYC_BIN=./node_modules/nyc/bin/nyc.js | ||
if [ -f "$NYC_BIN" ]; then | ||
$NYC_BIN report || true | ||
fi | ||
bash $KOKORO_GFILE_DIR/codecov.sh | ||
else | ||
echo "coverage is only reported for Node $COVERAGE_NODE" | ||
fi |
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 |
---|---|---|
|
@@ -34,3 +34,16 @@ fi | |
npm install | ||
|
||
npm run system-test | ||
|
||
# codecov combines coverage across integration and unit tests. Include | ||
# the logic below for any environment you wish to collect coverage for: | ||
COVERAGE_NODE=10 | ||
if npx [email protected] --silent --node $COVERAGE_NODE; then | ||
NYC_BIN=./node_modules/nyc/bin/nyc.js | ||
if [ -f "$NYC_BIN" ]; then | ||
$NYC_BIN report || true | ||
fi | ||
bash $KOKORO_GFILE_DIR/codecov.sh | ||
else | ||
echo "coverage is only reported for Node $COVERAGE_NODE" | ||
fi |
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 |
---|---|---|
|
@@ -23,11 +23,13 @@ cd $(dirname $0)/.. | |
npm install | ||
npm test | ||
|
||
# codecov combines coverage across integration and unit tests. Include | ||
# the logic below for any environment you wish to collect coverage for: | ||
COVERAGE_NODE=10 | ||
if npx [email protected] --silent --node $COVERAGE_NODE; then | ||
NYC_BIN=./node_modules/nyc/bin/nyc.js | ||
if [ -f "$NYC_BIN" ]; then | ||
$NYC_BIN report | ||
$NYC_BIN report || true | ||
fi | ||
bash $KOKORO_GFILE_DIR/codecov.sh | ||
else | ||
|
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