Skip to content

Commit

Permalink
build: add Kokoro configs for autorelease (#280)
Browse files Browse the repository at this point in the history
* build: add Kokoro configs for autorelease

* build: add Kokoro configs for autorelease

* chore: remove CircleCI config
  • Loading branch information
jkwlui authored and JustinBeckwith committed Dec 10, 2018
1 parent c969276 commit b5579c2
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 239 deletions.
179 changes: 0 additions & 179 deletions .circleci/config.yml

This file was deleted.

Binary file removed .circleci/key.json.enc
Binary file not shown.
60 changes: 0 additions & 60 deletions .circleci/npm-install-retry.js

This file was deleted.

31 changes: 31 additions & 0 deletions .kokoro/publish.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 -eo pipefail

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

# Start the releasetool reporter
python3 -m pip install gcp-releasetool
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script

cd $(dirname $0)/..

NPM_TOKEN=$(cat $KOKORO_KEYSTORE_DIR/73713_google_cloud_npm_token)
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc

npm install
npm publish --access=public
28 changes: 28 additions & 0 deletions .kokoro/release/publish.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Get npm token from Keystore
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_npm_token"
backend_type: FASTCONFIGPUSH
}
}
}


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

# Use the trampoline script to run in docker.
build_file: "nodejs-scheduler/.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-scheduler/.kokoro/publish.sh"
}

0 comments on commit b5579c2

Please sign in to comment.