monasca-api/playbooks/legacy/monasca-tempest-base/run.yaml
Chandan Kumar 80b4f18e1e Remove bundled intree monasca-api tempest plugin
* https://review.openstack.org/#/c/526844/ move the intree
  bundled tempest plugin to a new repo monasca-tempest-plugin.
  Let's use it and remove the bundled tempest plugin from repo.

* Moved post_host script to main root directory
* Removed dummy gate_hook.sh script
* Fixed the jobs for the same

Story: 2001400
Task: 6085

Depends-On: I2ce2bd8238d44a451faeba9ddbfe27d900e9adef
Change-Id: I79cea368271bbef33914dba7b95f5546a1b8d3c1
2018-01-31 11:50:16 +05:30

85 lines
3.1 KiB
YAML

- hosts: all
name: Autoconverted job legacy-tempest-dsvm-monasca-python-mysql-full from old job
gate-tempest-dsvm-monasca-python-mysql-full-ubuntu-xenial-nv
tasks:
- name: Ensure legacy workspace directory
file:
path: '{{ ansible_user_dir }}/workspace'
state: directory
- shell:
cmd: |
set -e
set -x
cat > clonemap.yaml << EOF
clonemap:
- name: openstack-infra/devstack-gate
dest: devstack-gate
EOF
/usr/zuul-env/bin/zuul-cloner -m clonemap.yaml --cache-dir /opt/git \
git://git.openstack.org \
openstack-infra/devstack-gate
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
cat << 'EOF' >>"/tmp/dg-local.conf"
[[local|localrc]]
enable_plugin monasca-api git://git.openstack.org/openstack/monasca-api
MONASCA_API_IMPLEMENTATION_LANG="{{ api_lang }}"
MONASCA_PERSISTER_IMPLEMENTATION_LANG="{{ persister_lang }}"
MONASCA_METRICS_DB="{{ tsdb }}"
TEMPEST_PLUGINS+='/opt/stack/new/monasca-tempest-plugin'
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export ENABLED_SERVICES=tempest
export DEVSTACK_GATE_NEUTRON=1
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_TEMPEST=1
export DEVSTACK_GATE_TEMPEST_REGEX="monasca_tempest_tests.tests.api"
if [ "{{ database }}" == "postgresql" ]; then
export DEVSTACK_GATE_POSTGRES=1
else
export DEVSTACK_GATE_POSTGRES=0
fi
export PROJECTS="openstack/monasca-api $PROJECTS"
export PROJECTS="openstack/monasca-persister $PROJECTS"
export PROJECTS="openstack/monasca-common $PROJECTS"
export PROJECTS="openstack/monasca-agent $PROJECTS"
export PROJECTS="openstack/monasca-notification $PROJECTS"
export PROJECTS="openstack/monasca-thresh $PROJECTS"
export PROJECTS="openstack/monasca-statsd $PROJECTS"
export PROJECTS="openstack/python-monascaclient $PROJECTS"
export PROJECTS="openstack/monasca-grafana-datasource $PROJECTS"
export PROJECTS="openstack/monasca-ui $PROJECTS"
export PROJECTS="openstack/monasca-tempest-plugin $PROJECTS"
function post_test_hook {
# Configure and run tempest on monasca-api installation
source $BASE/new/monasca-api/contrib/post_test_hook.sh
}
export -f post_test_hook
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'