diff --git a/jenkins/jobs/javascript.yaml b/jenkins/jobs/javascript.yaml index b58e7d8cac..a8b3717e2d 100644 --- a/jenkins/jobs/javascript.yaml +++ b/jenkins/jobs/javascript.yaml @@ -68,6 +68,50 @@ - console-log node: '{node}' +# Builds and uploads a draft version of the project to docs-draft. +- job-template: + name: '{name}-npm-publish-draft' + + builders: + - print-template-name: + template-name: "{template-name}" + - npm-install + - revoke-sudo + - gerrit-git-prep + # This will build ./{name}-{version}.tgz, where {version} is read from + # package.json. + - npm-run: + command: 'pack' + - shell: | + !/bin/bash -xe + /usr/local/jenkins/slave_scripts/version-properties.sh + source version.properties + + # Create a dist directory + mkdir -p ./dist + + # Extract the package tarball. This will place it in ./package + tar -xzf ./{name}-*.tgz + + # Move the package contents into dist so the scp upload will + # catch it. + mv ./package/{package-dir}/* ./dist/ + + publishers: + - console-log + - coverage-log + - scp: + site: 'static.openstack.org' + files: + # 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 draft application and uploads it to docs-draft. To use this build, # your Gruntfile must declare a target named "build:draft" - job-template: diff --git a/jenkins/jobs/projects.yaml b/jenkins/jobs/projects.yaml index a4f96f67d1..0501d847e4 100644 --- a/jenkins/jobs/projects.yaml +++ b/jenkins/jobs/projects.yaml @@ -2370,6 +2370,8 @@ jobs: - javascript-jobs - '{name}-npm-publish-tarball' + - '{name}-npm-publish-draft': + package-dir: 'www' # Grab everything in ./package/www - project: name: jeepyb diff --git a/zuul/layout.yaml b/zuul/layout.yaml index aa4ecec9a0..46ae7462ee 100755 --- a/zuul/layout.yaml +++ b/zuul/layout.yaml @@ -1494,6 +1494,9 @@ jobs: - name: ^gate-.*-js-draft success-pattern: http://docs-draft.openstack.org/{build.parameters[LOG_PATH]}/dist/ + - name: ^.*-npm-publish-draft$ + success-pattern: http://docs-draft.openstack.org/{build.parameters[LOG_PATH]}/dist/ + - name: infra-publications-publish branch: ^(?!master).*$ @@ -6018,6 +6021,8 @@ projects: template: - name: merge-check - name: javascript-jobs + check: + - ironic-webclient-npm-publish-draft post: - ironic-webclient-npm-publish-tarball release: