2015-04-01 08:45:57 -07:00
|
|
|
# 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}'
|
|
|
|
|
2014-08-01 15:37:28 -07:00
|
|
|
# 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
|
2014-01-19 09:26:58 -08:00
|
|
|
- job-template:
|
2014-08-01 15:37:28 -07:00
|
|
|
name: 'gate-{name}-js-test-{test-type}'
|
2014-01-19 09:26:58 -08:00
|
|
|
|
|
|
|
wrappers:
|
2014-05-27 14:51:16 -07:00
|
|
|
- build-timeout:
|
2014-01-19 09:26:58 -08:00
|
|
|
timeout: 40
|
|
|
|
- timestamps
|
|
|
|
|
|
|
|
builders:
|
2014-07-10 12:45:16 -07:00
|
|
|
- npm-install
|
2015-01-21 16:44:42 +01:00
|
|
|
- xvfb-install
|
|
|
|
- chrome-install
|
2014-02-11 14:15:13 -08:00
|
|
|
- revoke-sudo
|
2014-01-19 09:26:58 -08:00
|
|
|
- gerrit-git-prep
|
|
|
|
- js-build:
|
2014-08-01 15:37:28 -07:00
|
|
|
command: 'test:{test-type}'
|
2014-07-10 14:23:58 -07:00
|
|
|
envlist: 'grunt'
|
|
|
|
project: '{name}'
|
|
|
|
- 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}'
|
|
|
|
|
|
|
|
# Builds a draft application and uploads it to docs-draft. To use this build,
|
2014-09-29 18:28:19 -07:00
|
|
|
# your Gruntfile must declare a target named "build:draft"
|
2014-07-10 14:23:58 -07:00
|
|
|
- job-template:
|
|
|
|
name: 'gate-{name}-js-draft'
|
|
|
|
|
|
|
|
wrappers:
|
|
|
|
- build-timeout:
|
|
|
|
timeout: 40
|
|
|
|
- timestamps
|
|
|
|
|
|
|
|
builders:
|
|
|
|
- npm-install
|
|
|
|
- revoke-sudo
|
|
|
|
- gerrit-git-prep
|
|
|
|
- js-build:
|
2014-09-29 18:28:19 -07:00
|
|
|
command: 'build:draft'
|
2014-07-10 14:23:58 -07:00
|
|
|
envlist: 'grunt'
|
|
|
|
project: '{name}'
|
|
|
|
- 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
|
|
|
|
|
|
|
|
# We're uploading the compiled app as a pre-release sanity check,
|
|
|
|
# much like we do with docs builds.
|
|
|
|
- target: 'docs-draft/$LOG_PATH'
|
|
|
|
source: 'dist/**'
|
|
|
|
keep-hierarchy: true
|
|
|
|
copy-after-failure: false
|
|
|
|
node: '{node}'
|
|
|
|
|
|
|
|
# Builds a release tarball
|
2014-01-19 10:00:35 -08:00
|
|
|
- job-template:
|
|
|
|
name: '{name}-js-release-{branch-designator}'
|
|
|
|
|
|
|
|
builders:
|
2014-07-10 12:45:16 -07:00
|
|
|
- npm-install
|
2014-02-11 14:15:13 -08:00
|
|
|
- revoke-sudo
|
2014-01-19 10:00:35 -08:00
|
|
|
- gerrit-git-prep
|
|
|
|
- js-build:
|
|
|
|
command: 'build'
|
|
|
|
envlist: 'grunt'
|
|
|
|
- shell: |
|
|
|
|
#!/bin/bash -xe
|
2014-06-24 11:59:41 +10:00
|
|
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
|
|
|
source version.properties
|
2014-01-19 10:00:35 -08:00
|
|
|
|
2014-01-28 13:11:38 -08:00
|
|
|
# Clean/create a tarball directory
|
|
|
|
rm -rf tarballs
|
|
|
|
mkdir -p tarballs
|
|
|
|
|
|
|
|
# Create an archive tarball.
|
2014-01-19 10:00:35 -08:00
|
|
|
tar -czf {name}-$PROJECT_VER.tar.gz dist/
|
2014-01-28 13:11:38 -08:00
|
|
|
cp {name}-$PROJECT_VER.tar.gz tarballs/{name}-latest.tar.gz
|
|
|
|
mv {name}-$PROJECT_VER.tar.gz tarballs/
|
2014-01-19 10:00:35 -08:00
|
|
|
publishers:
|
|
|
|
- console-log
|
|
|
|
- coverage-log
|
|
|
|
- scp:
|
|
|
|
site: 'static.openstack.org'
|
|
|
|
files:
|
|
|
|
- target: 'logs/$LOG_PATH'
|
|
|
|
source: 'reports/**'
|
|
|
|
keep-hierarchy: true
|
|
|
|
copy-after-failure: true
|
2014-01-28 13:11:38 -08:00
|
|
|
- target: 'tarballs/{name}/'
|
|
|
|
source: 'tarballs/*.tar.gz'
|
|
|
|
keep-hierarchy: false
|
|
|
|
copy-after-failure: false
|
2014-01-19 10:00:35 -08:00
|
|
|
node: '{node}'
|