Skip to content

Commit

Permalink
Update CI config (#468)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot authored and JustinBeckwith committed Sep 10, 2018
1 parent 5d6a673 commit bd204b8
Show file tree
Hide file tree
Showing 14 changed files with 75 additions and 11 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
45 changes: 45 additions & 0 deletions .jsdoc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*!
* Copyright 2018 Google LLC. All Rights Reserved.
*
* 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
*
* http://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.
*/

'use strict';

module.exports = {
opts: {
readme: './README.md',
package: './package.json',
template: './node_modules/ink-docstrap/template',
recurse: true,
verbose: true,
destination: './docs/'
},
plugins: [
'plugins/markdown'
],
source: {
excludePattern: '(^|\\/|\\\\)[._]',
include: [
'src'
],
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2018 Google, LLC.',
includeDate: false,
sourceFiles: false,
systemName: 'google-auth-library',
theme: 'lumen'
}
};
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: "google-auth-library-nodejs.git/.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: "google-auth-library-nodejs.git/.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: "google-auth-library-nodejs.git/.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: "google-auth-library-nodejs.git/.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: "google-auth-library-nodejs.git/.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: "google-auth-library-nodejs.git/.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: "google-auth-library-nodejs.git/.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

0 comments on commit bd204b8

Please sign in to comment.