c1327819bb
https://review.openstack.org/#/c/607288/ shuffled some basic setup tasks around and put them in tripleo-ci/pre.yaml. Unfortunately the configure-swap task isn't idempotent so let's stop duplicating the tasks in the build jobs now. Change-Id: I046aeea86b3b63cae0b44865dc8ee0a59a3f7f5f Closes-Bug: #1810777
59 lines
1.7 KiB
YAML
59 lines
1.7 KiB
YAML
- hosts: all
|
|
name: TripleO container image building job
|
|
roles:
|
|
- role: bindep
|
|
bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['git.openstack.org/openstack/python-tripleoclient'].src_dir }}"
|
|
tasks:
|
|
- name: Include common vars
|
|
include_vars:
|
|
file: "common.yaml"
|
|
|
|
- name: Get branch
|
|
set_fact:
|
|
ci_branch: "{{ zuul.branch | default('master') | replace('stable/','') }}"
|
|
|
|
- name: Install pip
|
|
become: true
|
|
package:
|
|
name: python-pip
|
|
state: present
|
|
|
|
- name: Install virtualenv
|
|
become: true
|
|
package:
|
|
name: python-virtualenv
|
|
state: present
|
|
|
|
- name: pip install required items
|
|
become: true
|
|
pip:
|
|
name: "{{ item }}"
|
|
state: present
|
|
virtualenv: "{{ workspace }}/venv"
|
|
with_items:
|
|
- "file://{{ openstack_git_root }}/kolla"
|
|
- "file://{{ openstack_git_root }}/tripleo-common"
|
|
- "file://{{ openstack_git_root }}/python-tripleoclient"
|
|
|
|
# TODO(aschultz): make the kolla-build branch aware
|
|
- name: Generate kolla-build.conf
|
|
template:
|
|
src: templates/kolla-build.conf.j2
|
|
dest: "{{ workspace }}/kolla-build.conf"
|
|
mode: 0644
|
|
force: yes
|
|
|
|
- name: Run image build
|
|
args:
|
|
chdir: '{{ workspace }}'
|
|
shell: |
|
|
set -x
|
|
source {{ workspace }}/venv/bin/activate
|
|
TRIPLEO_COMMON_PATH="{{ openstack_git_root }}/tripleo-common"
|
|
|
|
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
|
|
RESULT=$?
|
|
exit $RESULT
|