Add NPM Command Execution as a Build Target
- Add npm-run as a build macro. - Add xvfb-start as a build macro for generic xvfb startup. - Added gate-{project}-npm-run-{command} as a build template. - Made that same build template non-voting. - Added gate-storyboard-webclient-npm-run-lint as a first job. Note that using this target presumes that you will pipe your output reports into ./reports. Change-Id: Ie772bf2c7b56aaed3c36fc1cb1cb970dfc3f93ff
This commit is contained in:
parent
cde5e621f3
commit
e6d20ad130
@ -1,3 +1,40 @@
|
||||
# Executes a command registered inside of package.json. For more information on
|
||||
# how this works, see https://docs.npmjs.com/cli/run-script. This build assumes
|
||||
# that whatever is being run under the hood, it will pipe its output to the
|
||||
# ./reports directory in the projects' root directory. This output is
|
||||
# subsequently copied to static.openstack.org (the clickthrough target from
|
||||
# gerrit).
|
||||
- job-template:
|
||||
name: 'gate-{name}-npm-run-{command}'
|
||||
|
||||
wrappers:
|
||||
- build-timeout:
|
||||
timeout: 40
|
||||
- timestamps
|
||||
|
||||
builders:
|
||||
- npm-install
|
||||
- xvfb-install
|
||||
- chrome-install
|
||||
- firefox-install
|
||||
- revoke-sudo
|
||||
- xvfb-start
|
||||
- gerrit-git-prep
|
||||
- npm-run:
|
||||
command: '{command}'
|
||||
- assert-no-extra-files
|
||||
publishers:
|
||||
- console-log
|
||||
- coverage-log
|
||||
- scp:
|
||||
site: 'static.openstack.org'
|
||||
files:
|
||||
- target: 'logs/$LOG_PATH'
|
||||
source: 'reports/**'
|
||||
keep-hierarchy: true
|
||||
copy-after-failure: true
|
||||
node: '{node}'
|
||||
|
||||
# Runs Grunt Tests. To use this build, your Gruntfile must declare
|
||||
# a target named test:{name}, such as test:unit, test:integration, or
|
||||
# test:functional
|
||||
|
@ -82,6 +82,21 @@
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y nodejs nodejs-legacy npm
|
||||
|
||||
- builder:
|
||||
name: npm-run
|
||||
builders:
|
||||
- shell: |
|
||||
export DISPLAY=:99
|
||||
npm install
|
||||
npm run {command}
|
||||
|
||||
- builder:
|
||||
name: xvfb-start
|
||||
builders:
|
||||
- shell: |
|
||||
DIMENSIONS='1280x1024x24'
|
||||
/usr/bin/Xvfb :99 -screen 0 ${DIMENSIONS} -ac +extension GLX +render -noreset 2>&1 > /dev/null &
|
||||
|
||||
- builder:
|
||||
name: xvfb-install
|
||||
builders:
|
||||
|
@ -2922,6 +2922,8 @@
|
||||
tarball-site: tarballs.openstack.org
|
||||
|
||||
jobs:
|
||||
- 'gate-{name}-npm-run-{command}':
|
||||
command: 'lint'
|
||||
- 'gate-{name}-js-test-{test-type}':
|
||||
test-type: 'unit'
|
||||
- 'gate-{name}-js-test-{test-type}':
|
||||
|
@ -779,6 +779,8 @@ jobs:
|
||||
- name: ^gate-.*-js-draft
|
||||
parameter-function: set_node_options_default_trusty
|
||||
success-pattern: http://docs-draft.openstack.org/{build.parameters[LOG_PATH]}/dist/
|
||||
- name: ^gate-.*-npm-run-.*$
|
||||
voting: false
|
||||
- name: infra-publications-publish
|
||||
branch: ^(?!master).*$
|
||||
- name: ^gate-.*-requirements$
|
||||
@ -4231,6 +4233,7 @@ projects:
|
||||
template:
|
||||
- name: merge-check
|
||||
check:
|
||||
- gate-storyboard-webclient-npm-run-lint
|
||||
- gate-storyboard-webclient-js-test-unit
|
||||
- gate-storyboard-webclient-js-test-integration
|
||||
- gate-storyboard-webclient-js-test-functional
|
||||
|
Loading…
x
Reference in New Issue
Block a user