Skip to content

Commit

Permalink
build: bring in Kokoro cfgs via synth.py (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
jkwlui authored Sep 24, 2018
1 parent 36f7838 commit c6e746f
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
11 changes: 7 additions & 4 deletions packages/google-cloud-oslogin/.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
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ let spawn = require('child_process').spawn;
//USE: ./index.js <ms npm can be idle> <number of attempts> [... NPM ARGS]
//

let timeout = process.argv[2] || 60000;
let timeout = process.argv[2] || process.env.NPM_INSTALL_TIMEOUT || 60000;
let attempts = process.argv[3] || 3;
let args = process.argv.slice(4);
if (args.length === 0) {
Expand Down
4 changes: 2 additions & 2 deletions packages/google-cloud-oslogin/.jsdoc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Copyright 2017 Google Inc. All Rights Reserved.
* 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.
Expand Down Expand Up @@ -36,7 +36,7 @@ module.exports = {
includePattern: '\\.js$'
},
templates: {
copyright: 'Copyright 2017 Google, Inc.',
copyright: 'Copyright 2018 Google, LLC.',
includeDate: false,
sourceFiles: false,
systemName: '@google-cloud/os-login',
Expand Down
5 changes: 4 additions & 1 deletion packages/google-cloud-oslogin/synth.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,12 @@
excludes=['package.json', 'README.md', 'src/index.js'],
)

common_templates = gcp.CommonTemplates()
templates = common_templates.node_library()
s.copy(templates)

#
# Node.js specific cleanup
#
subprocess.run(['npm', 'install'])
subprocess.run(['npm', 'run', 'prettier'])
subprocess.run(['npm', 'run', 'lint'])

0 comments on commit c6e746f

Please sign in to comment.