Sean McGinnis a34de95685 Fix variable name in npm-publish job
Variable work_root was accidentally set as work_dir.

Change-Id: Ib0650027565308e04235b9b7ca48b6470f1f1a0c
2017-12-04 15:35:25 -06:00

22 lines
556 B
YAML

# This is not optimized, but allows for getting a version of node in the
# home dir.
- name: Create .npmrc configuration file
template:
dest: "~/.npmrc"
mode: 0400
src: .npmrc.j2
- name: Install NVM
git:
repo: 'https://github.com/creationix/nvm'
dest: '~/.nvm'
version: v0.33.5
- name: Upload tarball to npm
shell:
executable: /bin/bash
cmd: |
nvm install node
nvm use node
npm publish --ignore-scripts {{ zuul.executor.work_root }}/artifacts/{{ zuul.project.short_name }}-{{ project_ver }}.tar.gz