308 lines
9.9 KiB
YAML
308 lines
9.9 KiB
YAML
- builder:
|
|
name: devstack-magnum
|
|
builders:
|
|
- link-logs
|
|
- net-info
|
|
- devstack-checkout
|
|
- shell: |
|
|
#!/bin/bash -xe
|
|
export PYTHONUNBUFFERED=true
|
|
|
|
if [ "{neutron}" -eq 1 ] ; then
|
|
export DEVSTACK_GATE_NEUTRON=1
|
|
fi
|
|
|
|
export DEVSTACK_GATE_TEMPEST=1
|
|
if [ "{tempest}" -eq 0 ] ; then
|
|
# Do not run any tempest tests
|
|
export DEVSTACK_GATE_TEMPEST_NOTESTS=1
|
|
fi
|
|
|
|
if [ "{branch-override}" != "default" ] ; then
|
|
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
|
|
fi
|
|
|
|
export PROJECTS="openstack/magnum $PROJECTS"
|
|
export PROJECTS="openstack/python-magnumclient $PROJECTS"
|
|
export PROJECTS="openstack/diskimage-builder $PROJECTS"
|
|
|
|
if [ "{multinode}" -eq 1 ] ; then
|
|
export DEVSTACK_GATE_TOPOLOGY="multinode"
|
|
export DEVSTACK_SUBNODE_CONFIG+=$'\n'"disable_service tempest"
|
|
fi
|
|
|
|
if [ "{identity-v3-only}" -eq 1 ] ; then
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"ENABLE_IDENTITY_V2=False"
|
|
fi
|
|
|
|
if [ "{ironic}" -eq 1 ] ; 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"
|
|
export MAGNUM_GATE_SPECIAL="-ironic"
|
|
fi
|
|
|
|
if [ "{horizon}" -eq 0 ] ; then
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service horizon"
|
|
else
|
|
export DEVSTACK_GATE_HORIZON=1
|
|
fi
|
|
if [ "{swift}" -eq 0 ] ; then
|
|
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"
|
|
fi
|
|
if [ "{ceilometer}" -eq 0 ] ; then
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acentral"
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-acompute"
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-evaluator"
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-alarm-notifier"
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-api"
|
|
export DEVSTACK_LOCAL_CONFIG+=$'\n'"disable_service ceilometer-collector"
|
|
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} $MAGNUM_GATE_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} $MAGNUM_GATE_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
|
|
|
|
|
|
- job-template:
|
|
name: '{pipeline}-functional-dsvm-magnum-{coe}-{node}{suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- devstack-magnum:
|
|
coe: '{coe}'
|
|
ironic: '0'
|
|
identity-v3-only: '0'
|
|
ceilometer: '0'
|
|
swift: '0'
|
|
horizon: '0'
|
|
multinode: '0'
|
|
neutron: '1'
|
|
tempest: '0'
|
|
branch-override: '{branch-override}'
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{pipeline}-functional-dsvm-magnum-{coe}-ironic-{node}{suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- devstack-magnum:
|
|
coe: '{coe}'
|
|
ironic: '1'
|
|
identity-v3-only: '0'
|
|
ceilometer: '0'
|
|
swift: '0'
|
|
horizon: '0'
|
|
multinode: '0'
|
|
neutron: '1'
|
|
tempest: '0'
|
|
branch-override: '{branch-override}'
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{pipeline}-functional-dsvm-magnum-{coe}-identity-v3-only-{node}{suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- devstack-magnum:
|
|
coe: '{coe}'
|
|
ironic: '0'
|
|
identity-v3-only: '1'
|
|
ceilometer: '0'
|
|
swift: '0'
|
|
horizon: '0'
|
|
multinode: '0'
|
|
neutron: '1'
|
|
tempest: '0'
|
|
branch-override: '{branch-override}'
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{pipeline}-functional-dsvm-magnum-{coe}-multinode-{node-release}{suffix}'
|
|
node: '{node}'
|
|
|
|
wrappers:
|
|
- build-timeout:
|
|
timeout: 130
|
|
- timestamps
|
|
|
|
builders:
|
|
- devstack-magnum:
|
|
coe: '{coe}'
|
|
ironic: '0'
|
|
identity-v3-only: '0'
|
|
ceilometer: '0'
|
|
swift: '0'
|
|
horizon: '0'
|
|
multinode: '1'
|
|
neutron: '1'
|
|
tempest: '0'
|
|
branch-override: '{branch-override}'
|
|
|
|
publishers:
|
|
- devstack-logs
|
|
- console-log
|
|
|
|
- job-template:
|
|
name: '{pipeline}-magnum-dib-buildimage-{image-name}-{node}'
|
|
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|centos-dcos)$ ]]; 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
|
|
|
|
virtualenv env
|
|
|
|
./env/bin/pip install $(pwd)/openstack/dib-utils
|
|
./env/bin/pip install $(pwd)/openstack/diskimage-builder
|
|
|
|
# TODO(pabelanger): Remove once we migrated to bindep
|
|
./openstack/diskimage-builder/tests/install_test_deps.sh
|
|
|
|
# activate the virtualenv so that any tools run by dib run
|
|
# using the python inside it
|
|
set +u
|
|
source ./env/bin/activate
|
|
set -u
|
|
|
|
DIB_ELEMENTS=./openstack/diskimage-builder/diskimage_builder/elements
|
|
|
|
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
|
|
|
|
export DIB_IMAGE_SIZE=2.2
|
|
|
|
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
|
|
elif [ "{image-name}" == "centos-dcos" ]; then
|
|
DCOS_ELEMENTS=./openstack/magnum/contrib/drivers/dcos_centos_v1/image
|
|
TRIPLEO_ELEMENTS=./openstack/tripleo-image-elements/elements
|
|
HEAT_ELEMENTS=./openstack/heat-templates/hot/software-config/elements
|
|
# Order matters, we need the docker elements from DCOS_ELEMENTS to be used first
|
|
export ELEMENTS_PATH=$DCOS_ELEMENTS:$DIB_ELEMENTS:$TRIPLEO_ELEMENTS:$HEAT_ELEMENTS
|
|
|
|
$DCOS_ELEMENTS/install_imagebuild_deps.sh
|
|
|
|
export DIB_IMAGE_SIZE=3.0
|
|
|
|
export FS_TYPE=xfs
|
|
|
|
curl -O https://downloads.dcos.io/dcos/stable/commit/e64024af95b62c632c90b9063ed06296fcf38ea5/dcos_generate_config.sh
|
|
export DCOS_GENERATE_CONFIG_SRC=`pwd`/dcos_generate_config.sh
|
|
|
|
disk-image-create \
|
|
centos7 vm docker dcos selinux-permissive \
|
|
os-collect-config os-refresh-config os-apply-config \
|
|
heat-config heat-config-script \
|
|
-o $WORKSPACE/{image-name}.qcow2
|
|
|
|
#TODO: Add size validation
|
|
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="25"
|
|
|
|
export DIB_IMAGE_SIZE=2.5
|
|
|
|
export FEDORA_ATOMIC_TREE_URL="https://kojipkgs.fedoraproject.org/atomic/25/"
|
|
export FEDORA_ATOMIC_TREE_REF="8b15e9b988b4b02f4cb8b39bdd63d182ab7004a8926ecdac6314ee5c7ffa646b"
|
|
|
|
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
|
|
|
|
set +u
|
|
deactivate
|
|
set -u
|
|
|
|
publishers:
|
|
- scp:
|
|
site: 'tarballs.openstack.org'
|
|
files:
|
|
- source: '*.qcow2'
|
|
target: 'tarballs/magnum/images'
|
|
keep-hierarchy: false
|
|
copy-after-failure: false
|
|
- console-log
|