Skip to content

Commit

Permalink
decrypt the npm auth before publishing the new package
Browse files Browse the repository at this point in the history
  • Loading branch information
Philmod committed Jan 28, 2018
1 parent df297a3 commit af10130
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions cloudbuild.yaml
@@ -1,9 +1,27 @@
steps:
- name: 'busybox'
args: ['echo', '$TAG_NAME']
- name: 'gcr.io/cloud-builders/gcloud'
args:
- kms
- decrypt
- --ciphertext-file=npmrc.enc
- --plaintext-file=/root/.npmrc
- --location=global
- --keyring=my-keyring
- --key=npm-key
volumes:
- name: 'home'
path: /root/

- name: 'gcr.io/cloud-builders/npm'
args: ['install']

- name: 'gcr.io/cloud-builders/npm'
args: ['test']

- name: 'gcr.io/cloud-builders/npm'
args: ['publish', '$TAG_NAME']
args: ['publish']
env:
- HOME=/root/
volumes:
- name: 'home'
path: /root/

0 comments on commit af10130

Please sign in to comment.