zun/playbooks/zun-devstack-base/run.yaml
zhurong d3f19e181e Remove LIBS_FROM_GIT from the plugin code
LIBS_FROM_GIT should config by user in them local.conf,
This patch Remove LIBS_FROM_GIT from the plugin code.

Closes-Bug: #1733805
Change-Id: I89f6c541e07e8f84cbbd0d7aece91bd320370442
2017-11-23 11:35:06 +08:00

90 lines
2.9 KiB
YAML

- hosts: all
name: Zun devstack base
tasks:
- name: Ensure 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 zun git://git.openstack.org/openstack/zun
LIBS_FROM_GIT="python-zunclient"
EOF
executable: /bin/bash
chdir: '{{ ansible_user_dir }}/workspace'
environment: '{{ zuul | zuul_legacy_vars }}'
- shell:
cmd: |
set -e
set -x
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_NEUTRON=1
# Enable tempest for tempest plugin
export ENABLED_SERVICES=tempest
export PROJECTS="openstack/zun $PROJECTS"
export PROJECTS="openstack/kuryr-libnetwork $PROJECTS"
export PROJECTS="openstack/python-zunclient $PROJECTS"
export PROJECTS="openstack/devstack-plugin-container $PROJECTS"
export PROJECTS="openstack/zun-tempest-plugin $PROJECTS"
# Keep localrc to be able to set some vars in post_test_hook
export KEEP_LOCALRC=1
if [ "{{ use_python3 }}" -eq 1 ] ; then
export DEVSTACK_GATE_USE_PYTHON3=True
# Swift does not work so skip s-* for python3x for now
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-account"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-container"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-object"
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service s-proxy"
else
export DEVSTACK_GATE_USE_PYTHON3=False
fi
function gate_hook {
cd /opt/stack/new/zun/
./zun/tests/contrib/gate_hook.sh docker "{{ database }}"
}
export -f gate_hook
function post_test_hook {
source $BASE/new/devstack/accrc/admin/admin
cd /opt/stack/new/zun/
./zun/tests/contrib/post_test_hook.sh docker
}
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 }}'