From ee784f6a317df5ae55115600d92b8c61d165690f Mon Sep 17 00:00:00 2001 From: Alex Schultz Date: Wed, 27 Feb 2019 14:46:36 -0700 Subject: [PATCH] Make config file optional for container builds Change-Id: I98625ab9a01adf111e3754f34d389221e681db44 Depends-On: https://review.openstack.org/#/c/639847/ --- playbooks/tripleo-buildcontainers/run.yaml | 7 +++++++ playbooks/tripleo-buildcontainers/templates/build.sh.j2 | 3 +-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/playbooks/tripleo-buildcontainers/run.yaml b/playbooks/tripleo-buildcontainers/run.yaml index 6d37916dc..83268a263 100644 --- a/playbooks/tripleo-buildcontainers/run.yaml +++ b/playbooks/tripleo-buildcontainers/run.yaml @@ -24,6 +24,7 @@ set_fact: push_registry: "{{ push_registry | default('127.0.0.1:8787') }}" push_containers: "{{ push_containers | default(false) | bool }}" + container_config: "" - name: Get contents of delorean repo baseurl for the version hash become: true @@ -76,6 +77,12 @@ mode: 0644 force: yes + - name: Set config-file + set_fact: + container_config: "--config-file $TRIPLEO_COMMON_PATH/container-images/overcloud_containers.yaml" + when: ci_branch in ['pike', 'queens', 'rocky'] + + - name: Generate building script template: src: templates/build.sh.j2 diff --git a/playbooks/tripleo-buildcontainers/templates/build.sh.j2 b/playbooks/tripleo-buildcontainers/templates/build.sh.j2 index 4bbd4ef1e..65e1a0017 100644 --- a/playbooks/tripleo-buildcontainers/templates/build.sh.j2 +++ b/playbooks/tripleo-buildcontainers/templates/build.sh.j2 @@ -2,8 +2,7 @@ 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 \ +openstack overcloud container image build {{ container_config }}\ --kolla-config-file {{ workspace }}/kolla-build.conf \ {% if ci_branch != 'rocky' %} {% for item in exclude_containers[ansible_pkg_mgr] %}