From 18df7b8eccb4fec253349374dad31bdc9cbe0c1c Mon Sep 17 00:00:00 2001 From: Michael Krotscheck Date: Fri, 1 Aug 2014 15:37:28 -0700 Subject: [PATCH] Cleanup javascript build Once vinz and storyboard have been migrated forward to use the new JS build targets, we can remove the old build. This patch removes the legacy gate-{name}-js-unittests target, and collapses the explicit unit/integration/functional targets into one configurable one (as per clarkb's comments on #106172). Change-Id: I331fafdc70253a893027255128865d7239f1406e --- .../config/javascript.yaml | 111 +----------------- .../jenkins_job_builder/config/projects.yaml | 18 ++- 2 files changed, 17 insertions(+), 112 deletions(-) diff --git a/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml b/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml index 28b619f921..6ae707de74 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/javascript.yaml @@ -1,7 +1,8 @@ -# The old javascript unit test build, kept while storyboard and vinz -# are migrated forward. +# 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-unittests' + name: 'gate-{name}-js-test-{test-type}' wrappers: - build-timeout: @@ -13,109 +14,7 @@ - revoke-sudo - gerrit-git-prep - js-build: - command: 'test' - envlist: 'grunt' - - 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}' - -# Runs Grunt Unit Tests. To use this build, your Gruntfile must declare -# a target named test:unit -- job-template: - name: 'gate-{name}-js-test-unit' - - wrappers: - - build-timeout: - timeout: 40 - - timestamps - - builders: - - npm-install - - revoke-sudo - - gerrit-git-prep - - js-build: - command: 'test:unit' - 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}' - -# Runs grunt integration tests. To use this build, your Gruntfile must declare -# a target named test:integration -- job-template: - name: 'gate-{name}-js-test-integration' - - wrappers: - - build-timeout: - timeout: 40 - - timestamps - - builders: - - npm-install - - revoke-sudo - - gerrit-git-prep - - js-build: - command: 'test:integration' - 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}' - -# Runs grunt functional tests. To use this build, your Gruntfile must declare -# a target named test:functional -- job-template: - name: 'gate-{name}-js-test-functional' - - wrappers: - - build-timeout: - timeout: 40 - - timestamps - - builders: - - npm-install - - revoke-sudo - - gerrit-git-prep - - js-build: - command: 'test:functional' + command: 'test:{test-type}' envlist: 'grunt' project: '{name}' - assert-no-extra-files diff --git a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml index 82596b2537..b00a2d79ff 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -1539,9 +1539,12 @@ tarball-site: tarballs.openstack.org jobs: - - gate-{name}-js-test-unit - - gate-{name}-js-test-integration - - gate-{name}-js-test-functional + - 'gate-{name}-js-test-{test-type}': + test-type: 'unit' + - 'gate-{name}-js-test-{test-type}': + test-type: 'functional' + - 'gate-{name}-js-test-{test-type}': + test-type: 'integration' - gate-{name}-js-draft - '{name}-js-release-{branch-designator}': branch-designator: 'master' @@ -1563,9 +1566,12 @@ tarball-site: tarballs.openstack.org jobs: - - gate-{name}-js-test-unit - - gate-{name}-js-test-integration - - gate-{name}-js-test-functional + - 'gate-{name}-js-test-{test-type}': + test-type: 'unit' + - 'gate-{name}-js-test-{test-type}': + test-type: 'functional' + - 'gate-{name}-js-test-{test-type}': + test-type: 'integration' - gate-{name}-js-draft - '{name}-js-release-{branch-designator}': branch-designator: 'master'