Remove final db setup

The trove repo now uses tools/test-setup.sh we do not need the db jobs
anymore, change to the standard python unit jobs.

Also use standard pylint job-template which does the same as the tox
template.

Remove all templates and job-groups for the db-jobs since it's last user
has been removed.

Only leave mysql setup jobs for bifrost in.

Change-Id: I92e6e6502c2c516babf2bf66f3514875f77c460e
Depends-On: I3463e75057d0d4544f6a0212da888759ab5e171b
This commit is contained in:
Andreas Jaeger 2017-02-01 21:05:44 +01:00
parent 77e510fdf7
commit 9fc2f0eda8
6 changed files with 23 additions and 388 deletions

View File

@ -813,28 +813,6 @@
GRANT ALL PRIVILEGES ON *.*
TO '$DB_USER'@'%' identified by '$DB_PW' WITH GRANT OPTION;"
- builder:
name: pgsql-prep
builders:
- shell: |
#!/bin/bash -xe
DB_ROOT_PW=insecure_slave
DB_USER=openstack_citest
DB_PW=openstack_citest
root_roles=$(sudo -H -u postgres psql -t -c "
SELECT 'HERE' from pg_roles where rolname='$DB_USER'")
if [[ ${root_roles} == *HERE ]];then
sudo -H -u postgres psql -c "
ALTER ROLE $DB_USER WITH SUPERUSER LOGIN PASSWORD '$DB_PW'"
else
sudo -H -u postgres psql -c "
CREATE ROLE $DB_USER WITH SUPERUSER LOGIN PASSWORD '$DB_PW'"
fi
cat << EOF > $HOME/.pgpass
*:*:*:$DB_USER:$DB_PW
EOF
chmod 0600 $HOME/.pgpass
- builder:
name: mysql-db
builders:
@ -847,17 +825,6 @@
DROP DATABASE IF EXISTS {db_name};
CREATE DATABASE {db_name} CHARACTER SET utf8;"
- builder:
name: pgsql-db
builders:
- shell: |
#!/bin/bash -xe
DB_USER=openstack_citest
DB_PW=openstack_citest
psql -h 127.0.0.1 -U $DB_USER -d template1 -c "
DROP DATABASE IF EXISTS {db_name}"
createdb -h 127.0.0.1 -U $DB_USER -l C -T template0 -E utf8 {db_name}
- builder:
name: static-publish-prep

View File

@ -13,12 +13,7 @@
- zuul-git-branch-prep-upper-constraints:
branch: master
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- extra-test-setup
- revoke-sudo
- shell: "/usr/local/jenkins/slave_scripts/run-tox-with-neutron-lib-master.sh {python}"
- assert-no-extra-files

View File

@ -14908,10 +14908,10 @@
name: trove
jobs:
- coverage-db-jobs
- python-db-jobs
- python-mitaka-bitrot-db-jobs
- python-newton-bitrot-db-jobs
- coverage-jobs
- python-jobs
- python-mitaka-bitrot-jobs
- python-newton-bitrot-jobs
- python-ocata-bitrot-jobs
- openstack-server-release-jobs
- openstack-publish-jobs
@ -14975,15 +14975,13 @@
- couchdb
- api-ref-jobs:
service: database
- gate-{name}-tox-db-{envlist}-{node}:
- gate-{name}-tox-{envlist}-{node}:
node: ubuntu-xenial
envlist:
- fakemodetests
- apiexamples
- gate-{name}-tox-{envlist}-{node}:
- gate-{name}-pylint-{node}:
node: ubuntu-xenial
envlist:
- pylint
- project:
name: trove-dashboard

View File

@ -20,35 +20,6 @@
node: '{node}'
- job-template:
name: 'periodic-{name}-python27-db{branch-name}'
description: 'Same job as periodic-{name}-python27 but sets up databases.'
wrappers:
- build-timeout:
timeout: 40
- timestamps
builders:
- zuul-git-branch-prep-upper-constraints:
branch: '{branch}'
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- python27
- assert-no-extra-files
publishers:
- test-results
- console-log
node: '{node}'
- job-template:
name: 'periodic-{name}-docs{branch-name}'
@ -98,23 +69,3 @@
jobs:
- 'periodic-{name}-python27{branch-name}'
- 'periodic-{name}-docs{branch-name}'
- job-group:
name: python-mitaka-bitrot-db-jobs
branch: 'stable/mitaka'
branch-name: '-mitaka'
node: ubuntu-trusty
jobs:
- 'periodic-{name}-python27-db{branch-name}'
- 'periodic-{name}-docs{branch-name}'
- job-group:
name: python-newton-bitrot-db-jobs
branch: 'stable/newton'
branch-name: '-newton'
node: ubuntu-xenial
jobs:
- 'periodic-{name}-python27-db{branch-name}'
- 'periodic-{name}-docs{branch-name}'

View File

@ -29,43 +29,6 @@
node: '{node}'
- job-template:
name: '{name}-coverage-db-{node}{suffix}'
description: 'Same job as {name}-coverage but sets up databases.'
wrappers:
- build-timeout:
timeout: 40
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- coverage:
env: cover
publishers:
- scp:
site: 'static.openstack.org'
files:
- target: 'logs/$LOG_PATH'
source: 'cover/**'
keep-hierarchy: true
copy-after-failure: true
- test-results
- console-log
node: '{node}'
- job-template:
name: 'gate-{name}-compare-coverage-{node}{suffix}'
@ -167,36 +130,6 @@
node: '{node}'
- job-template:
name: 'gate-{name}-python27-db-{node}'
description: 'Same job as gate-{name}-python27 but sets up databases.'
wrappers:
- build-timeout:
timeout: 50
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- python27
- assert-no-extra-files
publishers:
- test-results
- console-log
node: '{node}'
- job-template:
name: 'gate-cross-{name}-python27-{node}'
description: 'Same job as gate-{name}-python27 but clones {name}'
@ -223,37 +156,6 @@
node: '{node}'
- job-template:
name: 'gate-cross-{name}-python27-db-{node}'
description: 'Same job as gate-cross-{name}-python27 but sets up databases.'
wrappers:
- build-timeout:
timeout: 50
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints-cross:
project: openstack/{name}
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- python27
- assert-no-extra-files
publishers:
- test-results
- console-log
node: '{node}'
- job-template:
name: 'periodic-{name}-{python}-with-oslo-master'
node: ubuntu-xenial
@ -269,14 +171,7 @@
- zuul-git-branch-prep-upper-constraints:
branch: master
- install-distro-packages
# The job runs with different repositories and invokes unittests, some
# of these repositories need a database set up.
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- extra-test-setup
- revoke-sudo
- shell: "/usr/local/jenkins/slave_scripts/run-tox-with-oslo-master.sh {python}"
- assert-no-extra-files
@ -357,66 +252,6 @@
node: ubuntu-xenial
- job-template:
name: 'gate-{name}-python35-db-nv'
description: 'Same job as gate-{name}-python35-nv but sets up databases.'
wrappers:
- build-timeout:
timeout: 40
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- python35
- assert-no-extra-files
publishers:
- test-results
- console-log
node: ubuntu-xenial
- job-template:
name: 'gate-{name}-python35-db'
description: 'Same job as gate-{name}-python35 but sets up databases.'
wrappers:
- build-timeout:
timeout: 40
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- python35
- assert-no-extra-files
publishers:
- test-results
- console-log
node: ubuntu-xenial
- job-template:
name: 'gate-{name}-pypy'
@ -535,36 +370,6 @@
- test-results
- console-log
- job-template:
name: 'gate-{name}-tox-db-{envlist}-{node}'
description: 'Same job as gate-{name}-tox-db-{envlist} but on node {node}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 40
- timestamps
builders:
- print-template-name:
template-name: "{template-name}"
- zuul-git-prep-upper-constraints
- install-distro-packages
- mysql-prep
- pgsql-prep
- mysql-db:
db_name: openstack_citest
- pgsql-db:
db_name: openstack_citest
- revoke-sudo
- run-tox:
envlist: '{envlist}'
- assert-no-extra-files
publishers:
- test-results
- console-log
- job-template:
name: '{name}-tarball'
node: ubuntu-xenial
@ -733,33 +538,6 @@
- 'gate-cross-{name}-python27-{node}'
# This is the legacy way of setting up databases. Projects should now
# add tools/test-setup.sh to their repositories and use the normal
# python-jobs instead.
- job-group:
name: python-db-jobs
node:
- ubuntu-trusty
- ubuntu-xenial
jobs:
- 'gate-{name}-pep8-{node}'
- 'gate-{name}-python27-db-{node}'
- 'gate-{name}-python34-db'
- 'gate-{name}-python35-db'
- 'gate-{name}-docs-{node}'
- 'gate-{name}-requirements'
- '{name}-branch-tarball'
# pylint isn't standard
# pypy isn't standard
# gate-{name}-tox-{envlist} also isn't standard, but is reserved for
# projects that want to run specific jobs via tox
- job-group:
name: cross-python-db-jobs
node: ubuntu-xenial
jobs:
- 'gate-cross-{name}-python27-db-{node}'
- job-group:
name: openstack-server-release-jobs
jobs:
@ -777,14 +555,3 @@
- '-nv'
jobs:
- '{name}-coverage-{node}{suffix}'
- job-group:
name: coverage-db-jobs
node:
- ubuntu-trusty
- ubuntu-xenial
suffix:
- ''
- '-nv'
jobs:
- '{name}-coverage-db-{node}{suffix}'

View File

@ -390,27 +390,6 @@ project-templates:
post:
- '{name}-branch-tarball'
# Invokes the same targets as python-jobs with one change:
# python27-db is used instead of python27. The job
# python27-db sets up databases.
- name: python-db-jobs
check:
- 'gate-{name}-docs-ubuntu-trusty'
- 'gate-{name}-pep8-ubuntu-trusty'
- 'gate-{name}-python27-db-ubuntu-trusty'
- 'gate-{name}-docs-ubuntu-xenial'
- 'gate-{name}-pep8-ubuntu-xenial'
- 'gate-{name}-python27-db-ubuntu-xenial'
gate:
- 'gate-{name}-docs-ubuntu-trusty'
- 'gate-{name}-pep8-ubuntu-trusty'
- 'gate-{name}-python27-db-ubuntu-trusty'
- 'gate-{name}-docs-ubuntu-xenial'
- 'gate-{name}-pep8-ubuntu-xenial'
- 'gate-{name}-python27-db-ubuntu-xenial'
post:
- '{name}-branch-tarball'
- name: python-charm-jobs
check:
- 'gate-{name}-pep8-ubuntu-trusty'
@ -550,24 +529,12 @@ project-templates:
check:
- 'gate-{name}-python35-nv'
# Invokes the same targets as python35-jobs-nv, but sets up databases.
- name: python35-db-jobs-nv
check:
- 'gate-{name}-python35-db-nv'
- name: python35-jobs
check:
- 'gate-{name}-python35'
gate:
- 'gate-{name}-python35'
# Invokes the same targets as python35-jobs, but sets up databases.
- name: python35-db-jobs
check:
- 'gate-{name}-python35-db'
gate:
- 'gate-{name}-python35-db'
- name: osc-plugin-jobs
check:
- 'check-osc-plugins'
@ -650,16 +617,6 @@ project-templates:
- 'periodic-{name}-docs-ocata'
- 'periodic-{name}-python27-ocata'
- name: periodic-db-mitaka
periodic-stable:
- 'periodic-{name}-docs-mitaka'
- 'periodic-{name}-python27-db-mitaka'
- name: periodic-db-newton
periodic-stable:
- 'periodic-{name}-docs-newton'
- 'periodic-{name}-python27-db-newton'
# Used for building documentation projects that contain
# DocBook XML and RST files.
- name: openstack-doc-gate
@ -1235,10 +1192,10 @@ jobs:
- name: ^gate-.*-ubuntu-trusty-(liberty|mitaka)(-nv)?$
branch: master
# Restrict python34 testing to <= Mitaka.
- name: ^gate-.*-python34(-db)?(-nv)?$
- name: ^gate-.*-python34(-nv)?$
branch: ^stable/(liberty|mitaka)
# Restrict python35 testing to >= Newton.
- name: ^gate-.*-python35(-db)?(-nv)?$
- name: ^gate-.*-python35(-nv)?$
branch: ^(?!stable/(liberty|mitaka)).*$
# Make sure we run ubuntu-trusty on master for puppet-apply.
@ -2197,7 +2154,7 @@ jobs:
# BUG #1290562 pypy does not work with new setuptools, so is breaking
# all jobs. Disable until there is resolution.
- name: ^gate-.*-pypy(-db)?$
- name: ^gate-.*-pypy$
voting: false
- name: ^gate-tempest-dsvm-ironic-parallel-ubuntu-xenial-nv$
@ -18115,12 +18072,12 @@ projects:
- name: openstack/trove
template:
- name: merge-check
- name: python-db-jobs
- name: python35-db-jobs
- name: python-jobs
- name: python35-jobs
- name: openstack-server-publish-jobs
- name: openstack-server-release-jobs
- name: periodic-db-mitaka
- name: periodic-db-newton
- name: periodic-mitaka
- name: periodic-newton
- name: periodic-ocata
- name: check-requirements
- name: install-guide-jobs
@ -18147,9 +18104,9 @@ projects:
- gate-trove-legacy-scenario-dsvm-postgresql
- gate-trove-legacy-scenario-dsvm-pxc
- gate-trove-legacy-scenario-dsvm-redis-nv
- gate-trove-tox-db-fakemodetests-ubuntu-xenial
- gate-trove-tox-db-apiexamples-ubuntu-xenial
- gate-trove-tox-pylint-ubuntu-xenial
- gate-trove-tox-fakemodetests-ubuntu-xenial
- gate-trove-tox-apiexamples-ubuntu-xenial
- gate-trove-pylint-ubuntu-xenial
gate:
- gate-trove-functional-dsvm-mysql-ubuntu-xenial
- gate-trove-legacy-functional-dsvm-mysql
@ -18158,12 +18115,12 @@ projects:
- gate-trove-legacy-scenario-dsvm-mysql
- gate-trove-legacy-scenario-dsvm-postgresql
- gate-trove-legacy-scenario-dsvm-pxc
- gate-trove-tox-db-fakemodetests-ubuntu-xenial
- gate-trove-tox-db-apiexamples-ubuntu-xenial
- gate-trove-tox-pylint-ubuntu-xenial
- gate-trove-tox-fakemodetests-ubuntu-xenial
- gate-trove-tox-apiexamples-ubuntu-xenial
- gate-trove-pylint-ubuntu-xenial
post:
- trove-coverage-db-ubuntu-trusty
- trove-coverage-db-ubuntu-xenial
- trove-coverage-ubuntu-trusty
- trove-coverage-ubuntu-xenial
experimental:
- gate-trove-scenario-dsvm-cassandra-single-ubuntu-xenial-nv
- gate-trove-scenario-dsvm-cassandra-multi-ubuntu-xenial-nv