Create a new container build job with Buildah on centos7
This job will run in Stein and beyond, where we replace Docker by Buildah to build images. blueprint podman-support Depends-On: I7608136cb213bdca81348a0c3c751b488f48d712 Change-Id: Ia43d96326fdcc9629696c972df1cf677cd69c87f
This commit is contained in:
parent
5efddb6b00
commit
0079e9496f
@ -1,3 +1,4 @@
|
||||
push_registry: "127.0.0.1:8787"
|
||||
push_tag: "latest"
|
||||
push_containers: "false"
|
||||
use_buildah: false
|
||||
|
@ -13,11 +13,14 @@
|
||||
mkdir -p {{ workspace }}/conf/
|
||||
mkdir -p {{ workspace }}/logs/system
|
||||
mkdir -p {{ workspace }}/etc/docker
|
||||
mkdir -p {{ workspace }}/logs/buildah-builds
|
||||
|
||||
mv *.conf {{ workspace }}/conf/
|
||||
mv *.log {{ workspace }}/logs/
|
||||
mv /tmp/kolla-* {{ workspace }}/logs/buildah-builds/ || true
|
||||
rsync -var --no-links /var/log/ {{ workspace }}/logs/system/ || true
|
||||
rsync -var --no-links /etc/docker/ {{ workspace }}/etc/docker/ || true
|
||||
rsync -var --no-links /etc/containers/ {{ workspace }}/etc/containers/ || true
|
||||
gzip -r "{{ workspace }}/logs" "{{ workspace }}/conf" "{{ workspace }}/etc"
|
||||
chmod -R a+r "{{ workspace }}"
|
||||
chown -R {{ ansible_user }}: "{{ workspace }}"
|
||||
|
@ -43,6 +43,23 @@
|
||||
- name: Reset connection because of group changes for current user
|
||||
meta: reset_connection
|
||||
|
||||
- name: Prepare Buildah
|
||||
become: true
|
||||
when: use_buildah | default(false) | bool
|
||||
block:
|
||||
- name: Install Buildah
|
||||
package:
|
||||
name: buildah
|
||||
state: present
|
||||
|
||||
- name: Configure insecure registry
|
||||
ini_file:
|
||||
path: /etc/containers/registries.conf
|
||||
section: 'registries.insecure'
|
||||
option: registries
|
||||
value:
|
||||
- localhost:8787
|
||||
|
||||
- name: Setup repo web service
|
||||
become: true
|
||||
block:
|
||||
|
@ -51,11 +51,13 @@
|
||||
chdir: '{{ workspace }}'
|
||||
shell: |
|
||||
set -x
|
||||
BUILDAH=""
|
||||
source {{ workspace }}/venv/bin/activate
|
||||
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
|
||||
|
||||
if [[ "{{ use_buildah | default(False) }}" == "True" ]]; then BUILDAH="--use-buildah"; fi
|
||||
openstack overcloud container image build \
|
||||
--config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml \
|
||||
--kolla-config-file {{ workspace }}/kolla-build.conf > {{ workspace }}/build.log 2> {{ workspace }}/build-err.log
|
||||
--kolla-config-file {{ workspace }}/kolla-build.conf $BUILDAH > {{ workspace }}/build.log 2> {{ workspace }}/build-err.log
|
||||
RESULT=$?
|
||||
exit $RESULT
|
||||
|
@ -7,6 +7,7 @@
|
||||
check:
|
||||
jobs:
|
||||
- tripleo-build-containers-centos-7
|
||||
- tripleo-build-containers-centos-7-buildah
|
||||
gate:
|
||||
queue: tripleo
|
||||
jobs:
|
||||
@ -17,3 +18,11 @@
|
||||
parent: tripleo-build-containers-base-with-files
|
||||
nodeset: single-centos-7-node
|
||||
voting: true
|
||||
|
||||
- job:
|
||||
name: tripleo-build-containers-centos-7-buildah
|
||||
parent: tripleo-build-containers-base-with-files
|
||||
nodeset: single-centos-7-node
|
||||
branches: ^(?!stable/(pike|queens|rocky)).*$
|
||||
vars:
|
||||
use_buildah: true
|
||||
|
Loading…
Reference in New Issue
Block a user