From b5155d4199d0ff0fe3b51efc288b1e2693b748ab Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Mon, 14 Oct 2013 19:01:28 -0400 Subject: [PATCH] add bash8 to devstack tests this creates a non-voting bash8 test for devstack which does basic style checking of the devstack shell scripts. Requires https://review.openstack.org/#/c/51711/ to land first for this to work. Change-Id: Ib6ae29cf4058263aedd3d9c0a1e15de27eea729b --- .../jenkins/files/slave_scripts/run-bash8.sh | 33 +++++++++++++++++++ .../jenkins_job_builder/config/macros.yaml | 5 +++ .../jenkins_job_builder/config/misc.yaml | 14 ++++++++ .../jenkins_job_builder/config/projects.yaml | 9 +++++ .../openstack_project/files/zuul/layout.yaml | 5 +++ 5 files changed, 66 insertions(+) create mode 100755 modules/jenkins/files/slave_scripts/run-bash8.sh diff --git a/modules/jenkins/files/slave_scripts/run-bash8.sh b/modules/jenkins/files/slave_scripts/run-bash8.sh new file mode 100755 index 0000000000..fd137577fb --- /dev/null +++ b/modules/jenkins/files/slave_scripts/run-bash8.sh @@ -0,0 +1,33 @@ +#!/bin/bash -xe + +# Copyright 2013 OpenStack Foundation +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +org=$1 +project=$2 + +if [[ -z "$org" || -z "$project" ]] +then + echo "Usage: $0 ORG PROJECT" + echo + echo "ORG: The project organization (eg 'openstack')" + echo "PROJECT: The project name (eg 'nova')" + exit 1 +fi + +source /usr/local/jenkins/slave_scripts/select-mirror.sh $org $project + +set -o pipefail +./run_tests.sh +set +o pipefail diff --git a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml index 1371089a59..f75def41ba 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/macros.yaml @@ -47,6 +47,11 @@ builders: - shell: "./tools/version.sh --reset" +- builder: + name: bash8 + builders: + - shell: "/usr/local/jenkins/slave_scripts/run-bash8.sh {github-org} {project}" + - builder: name: pep8 builders: diff --git a/modules/openstack_project/files/jenkins_job_builder/config/misc.yaml b/modules/openstack_project/files/jenkins_job_builder/config/misc.yaml index 6926107cab..245fdf98ee 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/misc.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/misc.yaml @@ -31,6 +31,20 @@ node: '{node}' +- job-template: + name: 'gate-{name}-bash8' + + builders: + - gerrit-git-prep + - bash8: + github-org: '{github-org}' + project: '{name}' + + publishers: + - console-log + + node: '{node}' + - job-template: name: 'gate-{name}-unittests-{env}' 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 c484e54179..412115fb63 100644 --- a/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml +++ b/modules/openstack_project/files/jenkins_job_builder/config/projects.yaml @@ -970,6 +970,15 @@ node: 'devstack-precise || devstack-precise-check' +- project: + name: devstack + github-org: openstack-dev + node: precise + + jobs: + - gate-{name}-bash8 + + - project: name: tempest github-org: openstack diff --git a/modules/openstack_project/files/zuul/layout.yaml b/modules/openstack_project/files/zuul/layout.yaml index 7a6fe0fde1..5801f0a78c 100644 --- a/modules/openstack_project/files/zuul/layout.yaml +++ b/modules/openstack_project/files/zuul/layout.yaml @@ -157,6 +157,9 @@ jobs: # merged into gate-grenade-devstack-vm - name: gate-grenade-noop branch: ^(stable/(folsom|grizzly)).*$ + - name: gate-devstack-bash8 + branch: ^(stable/(folsom|grizzly)).*$ + voting: false - name: gate-tempest-docs branch: ^(?!stable/(folsom|grizzly)).*$ - name: tempest-docs @@ -1585,6 +1588,7 @@ projects: - name: openstack-dev/devstack check: + - gate-devstack-bash8 - check-tempest-devstack-vm-smoke - check-tempest-devstack-vm-full - check-tempest-devstack-vm-cinder @@ -1595,6 +1599,7 @@ projects: - check-grenade-devstack-vm - check-swift-devstack-vm-functional gate: + - gate-devstack-bash8 - gate-tempest-devstack-vm-smoke - gate-tempest-devstack-vm-full - gate-tempest-devstack-vm-cinder