Return javascript content artifact records to Zuul
When producing javascript content tarballs, return artifact records to Zuul. Add a new job, build-javascript-content-tarball, which includes the role to fetch javascript content tarballs. Change-Id: Ia247054d0523b81916815151fd57138469f634e0
This commit is contained in:
parent
6523b6a530
commit
e23ece5e55
@ -3,6 +3,7 @@ Javascript Jobs
|
|||||||
|
|
||||||
.. zuul:autojob:: build-javascript-tarball
|
.. zuul:autojob:: build-javascript-tarball
|
||||||
.. zuul:autojob:: build-javascript-content
|
.. zuul:autojob:: build-javascript-content
|
||||||
|
.. zuul:autojob:: build-javascript-content-tarball
|
||||||
.. zuul:autojob:: nodejs-npm
|
.. zuul:autojob:: nodejs-npm
|
||||||
.. zuul:autojob:: nodejs-npm-run-test
|
.. zuul:autojob:: nodejs-npm-run-test
|
||||||
.. zuul:autojob:: nodejs-npm-run-lint
|
.. zuul:autojob:: nodejs-npm-run-lint
|
||||||
|
3
playbooks/javascript/tarball.yaml
Normal file
3
playbooks/javascript/tarball.yaml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
- hosts: all
|
||||||
|
roles:
|
||||||
|
- fetch-javascript-content-tarball
|
@ -36,3 +36,21 @@
|
|||||||
mode: pull
|
mode: pull
|
||||||
src: "{{ zuul_work_dir }}/dist/"
|
src: "{{ zuul_work_dir }}/dist/"
|
||||||
verify_host: true
|
verify_host: true
|
||||||
|
|
||||||
|
- name: Find content tarball
|
||||||
|
find:
|
||||||
|
file_type: file
|
||||||
|
paths: "{{ zuul_work_dir }}/dist/"
|
||||||
|
patterns: "*.tar.gz"
|
||||||
|
register: result
|
||||||
|
|
||||||
|
- name: Return artifacts to Zuul
|
||||||
|
loop: "{{ result.files }}"
|
||||||
|
zuul_return:
|
||||||
|
data:
|
||||||
|
zuul:
|
||||||
|
artifacts:
|
||||||
|
- name: javascript_content
|
||||||
|
url: "{{ item.path | basename }}"
|
||||||
|
metadata:
|
||||||
|
type: javascript_content
|
||||||
|
34
zuul.yaml
34
zuul.yaml
@ -488,6 +488,40 @@
|
|||||||
Directory, relative to zuul_work_dir, holding build content.
|
Directory, relative to zuul_work_dir, holding build content.
|
||||||
success-url: npm/html/
|
success-url: npm/html/
|
||||||
|
|
||||||
|
- job:
|
||||||
|
name: build-javascript-content-tarball
|
||||||
|
parent: nodejs-npm
|
||||||
|
description: |
|
||||||
|
Build an archive of javascript web content as it should be deployed.
|
||||||
|
|
||||||
|
Responds to these variables:
|
||||||
|
|
||||||
|
.. zuul:jobvar:: npm_command
|
||||||
|
:default: build
|
||||||
|
|
||||||
|
Command to pass to npm.
|
||||||
|
|
||||||
|
.. zuul:jobvar:: node_version
|
||||||
|
:default: 6
|
||||||
|
|
||||||
|
The version of Node to use.
|
||||||
|
|
||||||
|
.. zuul:jobvar: zuul_work_dir
|
||||||
|
:default: {{ zuul.project.src_dir }}
|
||||||
|
|
||||||
|
Path to operate in.
|
||||||
|
|
||||||
|
.. zuul:jobvar: javascript_content_dir
|
||||||
|
:default: dist
|
||||||
|
|
||||||
|
Directory, relative to zuul_work_dir, holding build content.
|
||||||
|
|
||||||
|
.. zuul:jobvar: create_tarball_directory
|
||||||
|
|
||||||
|
Create a tarball with the contents of
|
||||||
|
create_tarball_directory (relative to zuul_work_dir).
|
||||||
|
post-run: playbooks/javascript/tarball.yaml
|
||||||
|
|
||||||
- job:
|
- job:
|
||||||
name: nodejs-npm-run-test
|
name: nodejs-npm-run-test
|
||||||
parent: nodejs-npm
|
parent: nodejs-npm
|
||||||
|
Loading…
Reference in New Issue
Block a user