aa77799c36
Pass the image filename to the validate script. Change-Id: I9374d6b004a07aac8adbf23e7ca5d218d5f62cbc
137 lines
4.5 KiB
YAML
137 lines
4.5 KiB
YAML
- job-template:
|
|
name: '{pipeline}-functional-dsvm-magnum-{coe}{special}{job-suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- link-logs
|
|
- net-info
|
|
- devstack-checkout
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
export PYTHONUNBUFFERED=true
|
|
export DEVSTACK_GATE_TEMPEST=0
|
|
export DEVSTACK_GATE_NEUTRON=1
|
|
|
|
# Enable tempest for tempest plugin
|
|
export ENABLED_SERVICES=tempest
|
|
|
|
export BRANCH_OVERRIDE={branch-override}
|
|
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
|
|
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
|
|
fi
|
|
if [ "{special}" == "-identity-v3-only" ] ; then
|
|
export DEVSTACK_LOCAL_CONFIG="ENABLE_IDENTITY_V2=False"
|
|
fi
|
|
export PROJECTS="openstack/magnum $PROJECTS"
|
|
export PROJECTS="openstack/python-magnumclient $PROJECTS"
|
|
|
|
if [ "{special}" == "-ironic" ] ; then
|
|
export PROJECTS="openstack/ironic $PROJECTS"
|
|
export PROJECTS="openstack/ironic-lib $PROJECTS"
|
|
export PROJECTS="openstack/ironic-python-agent $PROJECTS"
|
|
export PROJECTS="openstack/python-ironicclient $PROJECTS"
|
|
export PROJECTS="openstack/pyghmi $PROJECTS"
|
|
export PROJECTS="openstack/virtualbmc $PROJECTS"
|
|
fi
|
|
|
|
# Keep localrc to be able to set some vars in post_test_hook
|
|
export KEEP_LOCALRC=1
|
|
|
|
function gate_hook {{
|
|
cd /opt/stack/new/magnum/
|
|
./magnum/tests/contrib/gate_hook.sh {coe} {special}
|
|
}}
|
|
export -f gate_hook
|
|
|
|
function post_test_hook {{
|
|
source $BASE/new/devstack/accrc/admin/admin
|
|
cd /opt/stack/new/magnum/
|
|
./magnum/tests/contrib/post_test_hook.sh {coe} {special}
|
|
}}
|
|
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
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{pipeline}-magnum-dib-buildimage-{image-name}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 60
|
|
- timestamps
|
|
|
|
builders:
|
|
- link-logs
|
|
- net-info
|
|
- install-distro-packages
|
|
- shell: |
|
|
#!/bin/bash -eux
|
|
cd ~
|
|
|
|
if [ "{image-name}" == "ubuntu-mesos" ]; then
|
|
EXTRA_PROJECTS="openstack/tripleo-image-elements openstack/heat-templates"
|
|
else
|
|
EXTRA_PROJECTS=""
|
|
fi
|
|
|
|
/usr/zuul-env/bin/zuul-cloner --cache-dir /opt/git \
|
|
git://git.openstack.org \
|
|
openstack/diskimage-builder \
|
|
openstack/dib-utils \
|
|
openstack/magnum $EXTRA_PROJECTS
|
|
|
|
export PATH=$PATH:$(pwd)/openstack/dib-utils/bin
|
|
export PATH=$PATH:$(pwd)/openstack/diskimage-builder/bin
|
|
|
|
DIB_ELEMENTS=./openstack/diskimage-builder/elements
|
|
|
|
export DIB_IMAGE_SIZE=2.2
|
|
|
|
if [ "{image-name}" == "ubuntu-mesos" ]; then
|
|
TRIPLEO_ELEMENTS=./openstack/tripleo-image-elements/elements
|
|
HEAT_ELEMENTS=./openstack/heat-templates/hot/software-config/elements
|
|
MESOS_ELEMENTS=./openstack/magnum/magnum/drivers/mesos_ubuntu_v1/image
|
|
export ELEMENTS_PATH=$TRIPLEO_ELEMENTS:$HEAT_ELEMENTS:$MESOS_ELEMENTS
|
|
|
|
$MESOS_ELEMENTS/install_imagebuild_deps.sh
|
|
|
|
export DIB_RELEASE=trusty
|
|
|
|
disk-image-create ubuntu vm docker mesos \
|
|
os-collect-config os-refresh-config os-apply-config \
|
|
heat-config heat-config-script -o $WORKSPACE/{image-name}.qcow2
|
|
|
|
$MESOS_ELEMENTS/validate_image.sh $WORKSPACE/{image-name}.qcow2
|
|
else
|
|
MAGNUM_ELEMENTS=./openstack/magnum/magnum/drivers/common/image
|
|
export ELEMENTS_PATH=$DIB_ELEMENTS:$MAGNUM_ELEMENTS
|
|
$MAGNUM_ELEMENTS/fedora-atomic/install_imagebuild_deps.sh
|
|
|
|
export DIB_RELEASE="23"
|
|
disk-image-create -x -o $WORKSPACE/{image-name}-dib fedora-atomic
|
|
|
|
# validate image
|
|
$MAGNUM_ELEMENTS/fedora-atomic/validate_atomic_image.sh $WORKSPACE/{image-name}-dib.qcow2
|
|
fi
|
|
|
|
publishers:
|
|
- scp:
|
|
site: 'tarballs.openstack.org'
|
|
files:
|
|
- source: '*.qcow2'
|
|
target: 'tarballs/magnum/images'
|
|
keep-hierarchy: false
|
|
copy-after-failure: false
|
|
- console-log
|