Skip to content

Commit

Permalink
chore: run circle as non-root, fix npm link (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-fenster authored May 22, 2018
1 parent 0f0b120 commit 8dde49a
Showing 1 changed file with 17 additions and 2 deletions.
19 changes: 17 additions & 2 deletions packages/google-cloud-compute/.circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ jobs:
node4:
docker:
- image: 'node:4'
user: node
steps: &unit_tests_steps
- checkout
- run: &remove_package_lock
Expand Down Expand Up @@ -97,22 +98,27 @@ jobs:
node6:
docker:
- image: 'node:6'
user: node
steps: *unit_tests_steps
node8:
docker:
- image: 'node:8'
user: node
steps: *unit_tests_steps
node9:
docker:
- image: 'node:9'
user: node
steps: *unit_tests_steps
node10:
docker:
- image: 'node:10'
user: node
steps: *unit_tests_steps
lint:
docker:
- image: 'node:8'
user: node
steps:
- checkout
- run: *remove_package_lock
Expand All @@ -124,12 +130,17 @@ jobs:
npm link @google-cloud/compute
npm install
cd ..
environment:
NPM_CONFIG_PREFIX: /home/node/.npm-global
- run:
name: Run linting.
command: npm run lint
environment:
NPM_CONFIG_PREFIX: /home/node/.npm-global
docs:
docker:
- image: 'node:8'
user: node
steps:
- checkout
- run: *remove_package_lock
Expand All @@ -140,6 +151,7 @@ jobs:
sample_tests:
docker:
- image: 'node:8'
user: node
steps:
- checkout
- run: *remove_package_lock
Expand All @@ -155,16 +167,18 @@ jobs:
name: Run sample tests.
command: npm run samples-test
environment:
NPM_CONFIG_PREFIX: /home/node/.npm-global
GCLOUD_PROJECT: long-door-651
GOOGLE_APPLICATION_CREDENTIALS: /var/compute/.circleci/key.json
GOOGLE_APPLICATION_CREDENTIALS: /home/node/compute-samples/.circleci/key.json
- run:
name: Remove unencrypted key.
command: rm .circleci/key.json
when: always
working_directory: /var/compute/
working_directory: /home/node/compute-samples
system_tests:
docker:
- image: 'node:8'
user: node
steps:
- checkout
- run: *remove_package_lock
Expand All @@ -187,6 +201,7 @@ jobs:
publish_npm:
docker:
- image: 'node:8'
user: node
steps:
- checkout
- run:
Expand Down

0 comments on commit 8dde49a

Please sign in to comment.