project-config/jenkins/jobs/tripleo.yaml
2017-06-20 08:48:16 +00:00

199 lines
8.1 KiB
YAML

- builder:
name: python-tripleoclient-buildimage-checkout
builders:
- shell: |
#!/bin/bash -xe
CLONEMAP=`mktemp`
function cleanup {
rm -f $CLONEMAP
}
trap cleanup EXIT
cat > $CLONEMAP << EOF
clonemap:
- name: 'openstack/(.*)'
dest: '\1'
EOF
/usr/zuul-env/bin/zuul-cloner -m $CLONEMAP \
--cache-dir /opt/git \
git://git.openstack.org \
openstack/diskimage-builder \
openstack/heat-templates \
openstack/heat-agents \
openstack/instack-undercloud \
openstack/python-tripleoclient \
openstack/tripleo-common \
openstack/tripleo-image-elements \
openstack/tripleo-puppet-elements \
openstack/requirements
- job-template:
name: 'gate-tripleo-buildimage-{image-name}-{node}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: 70
- timestamps
builders:
- link-logs
- net-info
- python-tripleoclient-buildimage-checkout
- shell: |
#!/bin/bash -xe
cd python-tripleoclient
/usr/local/jenkins/slave_scripts/install-distro-packages.sh
- shell: |
#!/bin/bash -xe
cd python-tripleoclient
ELEMENTS="$WORKSPACE/instack-undercloud/elements:"
ELEMENTS+="$WORKSPACE/tripleo-puppet-elements/elements:"
ELEMENTS+="$WORKSPACE/tripleo-image-elements/elements:"
ELEMENTS+="$WORKSPACE/heat-templates/hot/software-config/elements"
# Basic Deployment (CLI)
# http://docs.openstack.org/developer/tripleo-docs/basic_deployment/basic_deployment_cli.html
case "$ZUUL_BRANCH" in
"stable/newton")
DELOREAN_REPO_URL="https://trunk.rdoproject.org/centos7-newton/current"
DELOREAN_DEPS_URL="https://trunk.rdoproject.org/centos7-newton"
;;
"stable/ocata")
DELOREAN_REPO_URL="https://trunk.rdoproject.org/centos7-ocata/current"
DELOREAN_DEPS_URL="https://trunk.rdoproject.org/centos7-ocata"
;;
*)
DELOREAN_REPO_URL="https://trunk.rdoproject.org/centos7-master/current-tripleo"
DELOREAN_DEPS_URL="https://trunk.rdoproject.org/centos7"
;;
esac
# setup the repos
sudo yum clean metadata
sudo curl -L ${{DELOREAN_DEPS_URL}}/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo
sudo curl -L ${{DELOREAN_REPO_URL}}/delorean.repo -o /etc/yum.repos.d/delorean.repo
export DIB_YUM_REPO_CONF="/etc/yum.repos.d/delorean*"
# if we are on master, install from source
# otherwise, install from requirements
if [ "$ZUUL_BRANCH" == "master" ]; then
tox -evenv -- pip install $WORKSPACE/diskimage-builder
else
export UPPER_CONSTRAINTS_FILE=$WORKSPACE/requirements/upper-constraints.txt
tox -evenv -- pip install diskimage-builder -c $UPPER_CONSTRAINTS_FILE
fi
TRIPLEO_COMMON_PATH=$WORKSPACE/tripleo-common
export ELEMENTS_PATH=$ELEMENTS
if [ "{image-name}" == "overcloud-hardened-full" ]; then
CONFIG_FILES="--config-file $TRIPLEO_COMMON_PATH/image-yaml/overcloud-hardened-images.yaml --config-file $TRIPLEO_COMMON_PATH/image-yaml/overcloud-hardened-images-centos7.yaml"
else
CONFIG_FILES="--config-file $TRIPLEO_COMMON_PATH/image-yaml/overcloud-images.yaml --config-file $TRIPLEO_COMMON_PATH/image-yaml/overcloud-images-centos7.yaml"
fi
if [ "$ZUUL_BRANCH" == "stable/newton" ]; then
tox -evenv -- openstack overcloud image build --type {image-name} --elements-path="$ELEMENTS"
else
tox -evenv -- openstack overcloud image build --image-name {image-name} $CONFIG_FILES
fi
mkdir -p $WORKSPACE/logs
mv *.log $WORKSPACE/logs
publishers:
- test-results
- devstack-logs
- console-log
- job-template:
name: '{trigger}-tripleo-ci-{jobname}{suffix}'
node: '{node}'
wrappers:
- build-timeout:
timeout: '{timeout}'
- timestamps
builders:
- link-logs
- net-info
- devstack-checkout
- shell: |
#!/bin/bash -xe
export TOCI_JOBTYPE={type}
# ZUUL Doesn't set these for periodic jobs
export ZUUL_BRANCH=${{ZUUL_BRANCH:-master}}
export ZUUL_REF=${{ZUUL_REF:-None}}
export BRANCH_OVERRIDE={branch-override}
if [ "$BRANCH_OVERRIDE" != "default" ] ; then
export OVERRIDE_ZUUL_BRANCH=$BRANCH_OVERRIDE
fi
export PYTHONUNBUFFERED=true
export DEVSTACK_GATE_TEMPEST=0
export DEVSTACK_GATE_EXERCISES=0
export DEVSTACK_GATE_HORIZON=1
export PROJECTS="openstack/diskimage-builder $PROJECTS"
export PROJECTS="openstack/dib-utils $PROJECTS"
export PROJECTS="openstack/instack $PROJECTS"
export PROJECTS="openstack/instack-undercloud $PROJECTS"
export PROJECTS="openstack/puppet-aodh $PROJECTS"
export PROJECTS="openstack/puppet-barbican $PROJECTS"
export PROJECTS="openstack/puppet-ceilometer $PROJECTS"
export PROJECTS="openstack/puppet-ceph $PROJECTS"
export PROJECTS="openstack/puppet-cinder $PROJECTS"
export PROJECTS="openstack/puppet-ganesha $PROJECTS"
export PROJECTS="openstack/puppet-glance $PROJECTS"
export PROJECTS="openstack/puppet-gnocchi $PROJECTS"
export PROJECTS="openstack/puppet-heat $PROJECTS"
export PROJECTS="openstack/puppet-horizon $PROJECTS"
export PROJECTS="openstack/puppet-ironic $PROJECTS"
export PROJECTS="openstack/puppet-keystone $PROJECTS"
export PROJECTS="openstack/puppet-mistral $PROJECTS"
export PROJECTS="openstack/puppet-neutron $PROJECTS"
export PROJECTS="openstack/puppet-nova $PROJECTS"
export PROJECTS="openstack/puppet-openstack_extras $PROJECTS"
export PROJECTS="openstack/puppet-openstacklib $PROJECTS"
export PROJECTS="openstack/puppet-oslo $PROJECTS"
export PROJECTS="openstack/puppet-pacemaker $PROJECTS"
export PROJECTS="openstack/puppet-sahara $PROJECTS"
export PROJECTS="openstack/puppet-swift $PROJECTS"
export PROJECTS="openstack/puppet-tripleo $PROJECTS"
export PROJECTS="openstack/puppet-vswitch $PROJECTS"
export PROJECTS="openstack/puppet-zaqar $PROJECTS"
export PROJECTS="openstack/python-ironic-inspector-client $PROJECTS"
export PROJECTS="openstack/python-tripleoclient $PROJECTS"
export PROJECTS="openstack/tripleo-common $PROJECTS"
export PROJECTS="openstack/tripleo-puppet-elements $PROJECTS"
export PROJECTS="openstack/tripleo-quickstart $PROJECTS"
export PROJECTS="openstack/tripleo-quickstart-extras $PROJECTS"
export PROJECTS="openstack/tripleo-ui $PROJECTS"
# some projects are not in devstack-gate, we need them to grab logs:
export PROJECTS="openstack/aodh $PROJECTS"
export PROJECTS="openstack/barbican $PROJECTS"
export PROJECTS="openstack/gnocchi $PROJECTS"
export PROJECTS="openstack/panko $PROJECTS"
export PROJECTS="openstack/mistral $PROJECTS"
sudo chown -hR $(whoami) /opt/git
function gate_hook {{
bash -xe /opt/stack/new/tripleo-ci/toci_gate_test.sh
}}
export -f gate_hook
cp devstack-gate/devstack-vm-gate-wrap.sh ./safe-devstack-vm-gate-wrap.sh
./safe-devstack-vm-gate-wrap.sh
publishers:
- scp:
site: 'tarballs.openstack.org'
files:
- source: 'images/*'
target: 'tarballs/tripleo-ci/images/'
keep-hierarchy: false
copy-after-failure: false
- devstack-logs
- console-log