Skip to content

Commit c93e3f8

Browse files
jkwluiJustinBeckwith
authored andcommitted
build: add Kokoro configs for autorelease (#473)
* build: add Kokoro configs for autorelease * build: add Kokoro configs for autorelease * chore: remove CircleCI config
1 parent 3cfd3a3 commit c93e3f8

5 files changed

Lines changed: 59 additions & 239 deletions

File tree

handwritten/spanner/.circleci/config.yml

Lines changed: 0 additions & 179 deletions
This file was deleted.
-2.31 KB
Binary file not shown.

handwritten/spanner/.circleci/npm-install-retry.js

Lines changed: 0 additions & 60 deletions
This file was deleted.
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
# Copyright 2018 Google LLC
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# https://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
set -eo pipefail
18+
19+
export NPM_CONFIG_PREFIX=/home/node/.npm-global
20+
21+
# Start the releasetool reporter
22+
python3 -m pip install gcp-releasetool
23+
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
24+
25+
cd $(dirname $0)/..
26+
27+
NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google_cloud_npm_token)
28+
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
29+
30+
npm install
31+
npm publish --access=public
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Get npm token from Keystore
2+
before_action {
3+
fetch_keystore {
4+
keystore_resource {
5+
keystore_config_id: 73713
6+
keyname: "google_cloud_npm_token"
7+
backend_type: FASTCONFIGPUSH
8+
}
9+
}
10+
}
11+
12+
13+
# Download trampoline resources.
14+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
15+
16+
# Use the trampoline script to run in docker.
17+
build_file: "nodejs-scheduler/.kokoro/trampoline.sh"
18+
19+
# Configure the docker image for kokoro-trampoline.
20+
env_vars: {
21+
key: "TRAMPOLINE_IMAGE"
22+
value: "gcr.io/cloud-devrel-kokoro-resources/node:8-user"
23+
}
24+
25+
env_vars: {
26+
key: "TRAMPOLINE_BUILD_FILE"
27+
value: "github/nodejs-scheduler/.kokoro/publish.sh"
28+
}

0 commit comments

Comments
 (0)