Merge "fix ci gate"

This commit is contained in:
Jenkins 2016-11-22 11:43:36 +00:00 committed by Gerrit Code Review
commit 06c001e405
3 changed files with 35 additions and 96 deletions

View File

@ -211,7 +211,7 @@ admin_protocol: "http"
#################### ####################
# OpenStack options # OpenStack options
#################### ####################
openstack_release: "3.0.0" openstack_release: "4.0.0"
openstack_logging_debug: "False" openstack_logging_debug: "False"
openstack_region_name: "RegionOne" openstack_region_name: "RegionOne"

View File

@ -17,11 +17,23 @@ if [[ ! -f /etc/sudoers.d/jenkins ]]; then
echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins echo "jenkins ALL=(:docker) NOPASSWD: ALL" | sudo tee /etc/sudoers.d/jenkins
fi fi
function build_image {
KOLLA_DIR=$(mktemp -d)
cat > /tmp/clonemap <<EOF
clonemap:
- name: openstack/kolla
dest: ${KOLLA_DIR}
EOF
/usr/zuul-env/bin/zuul-cloner -m /tmp/clonemap --workspace "$(pwd)" \
--cache-dir /opt/git git://git.openstack.org \
openstack/kolla
sudo pip install ${KOLLA_DIR}
# TODO(Jeffrey4l): ignore the known failed images
sudo kolla-build -p gate || true
}
function setup_config { function setup_config {
# generate the config sudo cp -r etc/kolla /etc/
tox -e genconfig
# Copy configs
sudo cp -a etc/kolla /etc/
# Generate passwords # Generate passwords
sudo tools/generate_passwords.py sudo tools/generate_passwords.py
@ -36,17 +48,27 @@ trusted-host = $NODEPOOL_MIRROR_HOST
EOF EOF
echo "RUN echo $(base64 -w0 ${PIP_CONF}) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header echo "RUN echo $(base64 -w0 ${PIP_CONF}) | base64 -d > /etc/pip.conf" | sudo tee /etc/kolla/header
rm ${PIP_CONF} rm ${PIP_CONF}
sed -i 's|^#include_header.*|include_header = /etc/kolla/header|' /etc/kolla/kolla-build.conf
# Get base distro and install type from workspace. The full path looks like
# /home/jenkins/workspace/gate-kolla-ansible-dsvm-deploy-centos-source-centos-7-nv
# NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying # NOTE(Jeffrey4l): use different a docker namespace name in case it pull image from hub.docker.io when deplying
sed -i 's|^#namespace.*|namespace = lokolla|' /etc/kolla/kolla-build.conf cat <<EOF | sudo tee /etc/kolla/kolla-build.conf
[DEFAULT]
include_header = /etc/kolla/header
namespace = lokolla
base = ${BASE_DISTRO}
install_type = ${INSTALL_TYPE}
EOF
if [[ "${DISTRO}" == "Debian" ]]; then if [[ "${DISTRO}" == "Debian" ]]; then
# Infra does not sign thier mirrors so we ignore gpg signing in the gate # Infra does not sign thier mirrors so we ignore gpg signing in the gate
echo "RUN echo 'APT::Get::AllowUnauthenticated \"true\";' > /etc/apt/apt.conf" | sudo tee -a /etc/kolla/header echo "RUN echo 'APT::Get::AllowUnauthenticated \"true\";' > /etc/apt/apt.conf" | sudo tee -a /etc/kolla/header
# Optimize the repos to take advantage of the Infra provided mirrors for Ubuntu # Optimize the repos to take advantage of the Infra provided mirrors for Ubuntu
sed -i 's|^#apt_sources_list.*|apt_sources_list = /etc/kolla/sources.list|' /etc/kolla/kolla-build.conf cat << EOF | sudo tee -a /etc/kolla/kolla-build.conf
apt_sources_list = /etc/kolla/sources.list
EOF
sudo cp /etc/apt/sources.list /etc/kolla/sources.list sudo cp /etc/apt/sources.list /etc/kolla/sources.list
sudo cat /etc/apt/sources.list.available.d/ubuntu-cloud-archive.list | sudo tee -a /etc/kolla/sources.list sudo cat /etc/apt/sources.list.available.d/ubuntu-cloud-archive.list | sudo tee -a /etc/kolla/sources.list
# Append non-infra provided repos to list # Append non-infra provided repos to list
@ -152,3 +174,8 @@ setup_ssh
setup_ansible setup_ansible
setup_node setup_node
setup_config setup_config
build_image
sudo tools/deploy_aio.sh "${BASE_DISTRO}" "${INSTALL_TYPE}"
tools/dump_info.sh

88
tox.ini
View File

@ -45,94 +45,6 @@ commands =
{toxinidir}/tools/setup_gate.sh {toxinidir}/tools/setup_gate.sh
{toxinidir}/tools/dump_info.sh {toxinidir}/tools/dump_info.sh
[testenv:deploy-centos-binary]
whitelist_externals = find
bash
sudo
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.DeployTestCentosBinary
sudo {toxinidir}/tools/deploy_aio.sh centos binary
{toxinidir}/tools/dump_info.sh
[testenv:deploy-centos-source]
whitelist_externals = find
bash
sudo
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.DeployTestCentosSource
sudo {toxinidir}/tools/deploy_aio.sh centos source
{toxinidir}/tools/dump_info.sh
[testenv:deploy-oraclelinux-binary]
whitelist_externals = find
bash
sudo
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.DeployTestOracleLinuxBinary
sudo {toxinidir}/tools/deploy_aio.sh oraclelinux binary
{toxinidir}/tools/dump_info.sh
[testenv:deploy-oraclelinux-source]
whitelist_externals = find
bash
sudo
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.DeployTestOracleLinuxSource
sudo {toxinidir}/tools/deploy_aio.sh oraclelinux source
{toxinidir}/tools/dump_info.sh
[testenv:deploy-ubuntu-binary]
whitelist_externals = find
bash
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.DeployTestUbuntuBinary
sudo {toxinidir}/tools/deploy_aio.sh ubuntu binary
{toxinidir}/tools/dump_info.sh
[testenv:deploy-ubuntu-source]
whitelist_externals = find
bash
sudo
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.DeployTestUbuntuSource
sudo {toxinidir}/tools/deploy_aio.sh ubuntu source
{toxinidir}/tools/dump_info.sh
[testenv:deploy-multinode-ubuntu-source]
whitelist_externals = find
bash
setenv =
DOCKER_BUILD_TEST=1
commands =
find . -type f -name "*.pyc" -delete
bash -c "if [ ! -d .testrepository ]; then testr init; fi"
testr run test_build.BuildTestUbuntuSource
{toxinidir}/tools/dump_info.sh
[testenv:genconfig] [testenv:genconfig]
whitelist_externals = which whitelist_externals = which
commands= commands=