Skip to content

Commit

Permalink
Update the CircleCI config (#157)
Browse files Browse the repository at this point in the history
  • Loading branch information
dpebot authored and JustinBeckwith committed Aug 31, 2018
1 parent 50d8e23 commit 759c3f5
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions packages/google-cloud-node/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,11 @@ jobs:
- run:
name: Decrypt credentials.
command: |
openssl aes-256-cbc -d -in .circleci/key.json.enc \
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}"
fi
- run: *npm_install_and_link
- run: *samples_npm_install_and_link
- run:
Expand All @@ -131,7 +133,10 @@ jobs:
NPM_CONFIG_PREFIX: /home/node/.npm-global
- run:
name: Remove unencrypted key.
command: rm .circleci/key.json
command: |
if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then
rm .circleci/key.json
fi
when: always
working_directory: /home/node/samples/
system_tests:
Expand All @@ -143,9 +148,11 @@ jobs:
- run:
name: Decrypt credentials.
command: |
openssl aes-256-cbc -d -in .circleci/key.json.enc \
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}"
fi
- run: *npm_install_and_link
- run:
name: Run system tests.
Expand All @@ -154,14 +161,17 @@ jobs:
GOOGLE_APPLICATION_CREDENTIALS: .circleci/key.json
- run:
name: Remove unencrypted key.
command: rm .circleci/key.json
command: |
if ! [[ -z "${SYSTEM_TESTS_ENCRYPTION_KEY}" ]]; then
rm .circleci/key.json
fi
when: always
publish_npm:
docker:
- image: 'node:8'
user: node
steps:
- checkout
- npm install
- run: npm install
- run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
- run: npm publish --access=public

0 comments on commit 759c3f5

Please sign in to comment.