Skip to content
Snippets Groups Projects
Commit ed1b74a3 authored by Radosław Piliszek's avatar Radosław Piliszek Committed by Mark Goddard
Browse files

CI: Avoid tox (and clean up gate setup)

We don't need tox nor tell our users to use it when doing kolla
builds.
Tox is going away from base infra images.
It's already gone from aarch64 (arm64) ones.

Change-Id: I2eb5203ad93c011b8806f4b6fb56db081c14a2cb
parent 0c1b6c8a
No related branches found
No related tags found
No related merge requests found
......@@ -60,13 +60,6 @@
when:
- ansible_architecture == 'aarch64'
- name: Ensure tox is installed
pip:
name: tox
extra_args: "-c {{ upper_constraints_file }}"
when: need_build_image
become: true
# NOTE(yoctozepto): required to template template_overrides.j2 for Zuul
- name: Include kolla Zuul vars if building new images
include_vars:
......
......@@ -2,11 +2,11 @@
set -o xtrace
set -o errexit
set -o pipefail
# Enable unbuffered output for Ansible in Jenkins.
export PYTHONUNBUFFERED=1
GIT_PROJECT_DIR=$(mktemp -d)
function setup_openstack_clients {
# Prepare virtualenv for openstack deployment tests
......@@ -28,7 +28,11 @@ function setup_openstack_clients {
~/openstackclient-venv/bin/pip install -c $UPPER_CONSTRAINTS ${packages[@]}
}
function setup_config {
function prepare_images {
if [[ "${BUILD_IMAGE}" == "False" ]]; then
return
fi
if [[ $SCENARIO != "bifrost" ]]; then
GATE_IMAGES="^cron,^fluentd,^glance,^haproxy,^keepalived,^keystone,^kolla-toolbox,^mariadb,^memcached,^neutron,^nova-,^openvswitch,^rabbitmq,^horizon,^chrony,^heat,^placement"
else
......@@ -70,7 +74,8 @@ function setup_config {
if [[ "debian" == $BASE_DISTRO ]]; then
PUSH="false"
fi
cat <<EOF | sudo tee /etc/kolla/kolla-build.conf
sudo tee /etc/kolla/kolla-build.conf <<EOF
[DEFAULT]
namespace = lokolla
base = ${BASE_DISTRO}
......@@ -90,15 +95,16 @@ gate = ${GATE_IMAGES}
EOF
mkdir -p /tmp/logs/build
}
function prepare_images {
if [[ "${BUILD_IMAGE}" == "False" ]]; then
return
fi
sudo docker run -d -p 4000:5000 --restart=always -v /opt/kolla_registry/:/var/lib/registry --name registry registry:2
pushd "${KOLLA_SRC_DIR}"
sudo tox -e "build-${BASE_DISTRO}-${INSTALL_TYPE}"
python3 -m venv ~/kolla-venv
. ~/kolla-venv/bin/activate
pip install "${KOLLA_SRC_DIR}"
sudo ~/kolla-venv/bin/kolla-build
# NOTE(yoctozepto): due to debian buster we push after images are built
# see https://github.com/docker/for-linux/issues/711
if [[ "debian" == $BASE_DISTRO ]]; then
......@@ -106,13 +112,14 @@ function prepare_images {
sudo docker push $img;
done
fi
popd
deactivate
}
setup_openstack_clients
setup_config
setup_openstack_clients
RAW_INVENTORY=/etc/kolla/inventory
tools/kolla-ansible -i ${RAW_INVENTORY} -e ansible_user=$USER -vvv bootstrap-servers &> /tmp/logs/ansible/bootstrap-servers
prepare_images
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment