Update javascript jobs to take npm_command variable
Similar to tox, the only difference in these is the command passed to npm. Update the base job to do that, and the child jobs to use the variable. Change-Id: I5f9d420f1618e9a196b4218bca7055f377349351
This commit is contained in:
parent
d3955a9d3f
commit
b125b917d9
@ -1,4 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
roles:
|
|
||||||
- role: npm
|
|
||||||
npm_command: docs
|
|
@ -1,4 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
roles:
|
|
||||||
- role: npm
|
|
||||||
npm_command: lint
|
|
@ -1,4 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
roles:
|
|
||||||
- role: npm
|
|
||||||
npm_command: test
|
|
3
playbooks/javascript/run.yaml
Normal file
3
playbooks/javascript/run.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- npm
|
@ -1,4 +0,0 @@
|
|||||||
- hosts: all
|
|
||||||
roles:
|
|
||||||
- role: npm
|
|
||||||
npm_command: pack
|
|
46
zuul.yaml
46
zuul.yaml
@ -231,12 +231,17 @@
|
|||||||
pre-run: playbooks/multinode/pre.yaml
|
pre-run: playbooks/multinode/pre.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: javascript-base
|
name: nodejs-npm
|
||||||
description: |
|
description: |
|
||||||
Base job for javascript operations
|
Base job for javascript operations
|
||||||
|
|
||||||
Responds to these variables:
|
Responds to these variables:
|
||||||
|
|
||||||
|
.. zuul:jobvar:: npm_command
|
||||||
|
:default: test
|
||||||
|
|
||||||
|
Command to pass to npm.
|
||||||
|
|
||||||
.. zuul:jobvar:: node_version
|
.. zuul:jobvar:: node_version
|
||||||
:default: 6
|
:default: 6
|
||||||
|
|
||||||
@ -247,11 +252,14 @@
|
|||||||
|
|
||||||
Path to operate in.
|
Path to operate in.
|
||||||
pre-run: playbooks/javascript/pre.yaml
|
pre-run: playbooks/javascript/pre.yaml
|
||||||
|
run: playbooks/javascript/run.yaml
|
||||||
post-run: playbooks/javascript/post.yaml
|
post-run: playbooks/javascript/post.yaml
|
||||||
|
vars:
|
||||||
|
npm_command: test
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: build-javascript-tarball
|
name: build-javascript-tarball
|
||||||
parent: javascript-base
|
parent: nodejs-npm
|
||||||
description: |
|
description: |
|
||||||
Build a source tarball for a Javascript project
|
Build a source tarball for a Javascript project
|
||||||
|
|
||||||
@ -266,51 +274,67 @@
|
|||||||
:default: {{ zuul.project.src_dir }}
|
:default: {{ zuul.project.src_dir }}
|
||||||
|
|
||||||
Path to operate in.
|
Path to operate in.
|
||||||
|
vars:
|
||||||
run: playbooks/javascript/tarball.yaml
|
npm_command: pack
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nodejs-npm-run-test
|
name: nodejs-npm-run-test
|
||||||
description: |
|
description: |
|
||||||
Run test using nodejs.
|
Run test using nodejs.
|
||||||
|
|
||||||
Responds to this variable:
|
Responds to these variables:
|
||||||
|
|
||||||
.. zuul:jobvar:: node_version
|
.. zuul:jobvar:: node_version
|
||||||
:default: 6
|
:default: 6
|
||||||
|
|
||||||
The version of Node to use.
|
The version of Node to use.
|
||||||
|
|
||||||
|
.. zuul:jobvar: zuul_work_dir
|
||||||
|
:default: {{ zuul.project.src_dir }}
|
||||||
|
|
||||||
|
Path to operate in.
|
||||||
pre-run: playbooks/javascript/pre-test.yaml
|
pre-run: playbooks/javascript/pre-test.yaml
|
||||||
run: playbooks/javascript/run-test.yaml
|
run: playbooks/javascript/run-test.yaml
|
||||||
post-run: playbooks/javascript/post.yaml
|
post-run: playbooks/javascript/post.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nodejs-npm-run-lint
|
name: nodejs-npm-run-lint
|
||||||
parent: javascript-base
|
parent: nodejs-npm
|
||||||
description: |
|
description: |
|
||||||
Run lint using nodejs.
|
Run lint using nodejs.
|
||||||
|
|
||||||
Responds to this variable:
|
Responds to these variables:
|
||||||
|
|
||||||
.. zuul:jobvar:: node_version
|
.. zuul:jobvar:: node_version
|
||||||
:default: 6
|
:default: 6
|
||||||
|
|
||||||
The version of Node to use.
|
The version of Node to use.
|
||||||
run: playbooks/javascript/run-lint.yaml
|
|
||||||
|
.. zuul:jobvar: zuul_work_dir
|
||||||
|
:default: {{ zuul.project.src_dir }}
|
||||||
|
|
||||||
|
Path to operate in.
|
||||||
|
vars:
|
||||||
|
npm_command: lint
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nodejs-npm-run-docs
|
name: nodejs-npm-run-docs
|
||||||
parent: javascript-base
|
parent: nodejs-npm
|
||||||
description: |
|
description: |
|
||||||
Run docs using nodejs.
|
Run docs using nodejs.
|
||||||
|
|
||||||
Responds to this variable:
|
Responds to these variables:
|
||||||
|
|
||||||
.. zuul:jobvar:: node_version
|
.. zuul:jobvar:: node_version
|
||||||
:default: 6
|
:default: 6
|
||||||
|
|
||||||
The version of Node to use.
|
The version of Node to use.
|
||||||
run: playbooks/javascript/run-docs.yaml
|
|
||||||
|
.. zuul:jobvar: zuul_work_dir
|
||||||
|
:default: {{ zuul.project.src_dir }}
|
||||||
|
|
||||||
|
Path to operate in.
|
||||||
post-run: playbooks/tox/docs-post.yaml
|
post-run: playbooks/tox/docs-post.yaml
|
||||||
success-url: html/
|
success-url: html/
|
||||||
|
vars:
|
||||||
|
npm_command: docs
|
||||||
|
Loading…
Reference in New Issue
Block a user