8c2da93198
With CORS support in the API, and custom configuration loading in the webclient, we can now let our js-draft build connect to a live API and function like a regular client. This change makes the assumption that any javascript project will include static docs-draft assets in the $PROJECT_ROOT/test/draft directory, which will be uploaded as-is to the same destination as the draft build. Depends on: https://review.openstack.org/#/c/124201 Change-Id: Ia68f1f5e13098faac9e94c9655cf4bd8aaceb02b
117 lines
3.2 KiB
YAML
117 lines
3.2 KiB
YAML
# 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
|
|
- job-template:
|
|
name: 'gate-{name}-js-test-{test-type}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 40
|
|
- timestamps
|
|
|
|
builders:
|
|
- npm-install
|
|
- revoke-sudo
|
|
- gerrit-git-prep
|
|
- js-build:
|
|
command: 'test:{test-type}'
|
|
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,
|
|
# your Gruntfile must declare a target named "build"
|
|
- job-template:
|
|
name: 'gate-{name}-js-draft'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 40
|
|
- timestamps
|
|
|
|
builders:
|
|
- npm-install
|
|
- revoke-sudo
|
|
- gerrit-git-prep
|
|
- js-build:
|
|
command: 'build'
|
|
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
|
|
# Upload any additional files necessary for the docs-draft build
|
|
- target: 'docs-draft/$LOG_PATH'
|
|
source: 'test/draft/**'
|
|
keep-hierarchy: true
|
|
copy-after-failure: false
|
|
node: '{node}'
|
|
|
|
# Builds a release tarball
|
|
- job-template:
|
|
name: '{name}-js-release-{branch-designator}'
|
|
|
|
builders:
|
|
- npm-install
|
|
- revoke-sudo
|
|
- gerrit-git-prep
|
|
- js-build:
|
|
command: 'build'
|
|
envlist: 'grunt'
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
/usr/local/jenkins/slave_scripts/version-properties.sh
|
|
source version.properties
|
|
|
|
# Clean/create a tarball directory
|
|
rm -rf tarballs
|
|
mkdir -p tarballs
|
|
|
|
# Create an archive tarball.
|
|
tar -czf {name}-$PROJECT_VER.tar.gz dist/
|
|
cp {name}-$PROJECT_VER.tar.gz tarballs/{name}-latest.tar.gz
|
|
mv {name}-$PROJECT_VER.tar.gz tarballs/
|
|
publishers:
|
|
- console-log
|
|
- coverage-log
|
|
- scp:
|
|
site: 'static.openstack.org'
|
|
files:
|
|
- target: 'logs/$LOG_PATH'
|
|
source: 'reports/**'
|
|
keep-hierarchy: true
|
|
copy-after-failure: true
|
|
- target: 'tarballs/{name}/'
|
|
source: 'tarballs/*.tar.gz'
|
|
keep-hierarchy: false
|
|
copy-after-failure: false
|
|
node: '{node}'
|