diff --git a/.zuul.yaml b/.zuul.yaml index 06cc65f..d08886e 100644 --- a/.zuul.yaml +++ b/.zuul.yaml @@ -9,6 +9,9 @@ - openstack/requirements - openstack/ironic-python-agent - openstack/ironic-python-agent-builder + vars: + ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW' + ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR' - job: name: ironic-python-agent-build-image-tinyipa @@ -44,6 +47,9 @@ - ^test-requirements.txt$ - ^tools/.*$ - ^tox.ini$ + vars: + ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW' + ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR' - job: name: ironic-python-agent-check-image-tinyipa diff --git a/playbooks/ironic-python-agent-build-image/post.yaml b/playbooks/ironic-python-agent-build-image/post.yaml index d5a929f..bd2de1a 100644 --- a/playbooks/ironic-python-agent-build-image/post.yaml +++ b/playbooks/ironic-python-agent-build-image/post.yaml @@ -1,9 +1,5 @@ - hosts: all - vars: - ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW' - ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR' - tasks: - name: Ensure artifacts directory exists @@ -12,7 +8,7 @@ state: directory delegate_to: localhost - - name: Copy files from {{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent on node + - name: Copy files from {{ ipa_raw_dir }} on node synchronize: src: '{{ ipa_raw_dir }}/' dest: '{{ zuul.executor.work_root }}/artifacts/{{ image_type }}/files/' @@ -23,7 +19,7 @@ - --include=/* - --prune-empty-dirs - - name: Copy files from {{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent on node + - name: Copy files from {{ ipa_tar_dir }} on node synchronize: src: '{{ ipa_tar_dir }}/' dest: '{{ zuul.executor.work_root }}/artifacts/{{ image_type }}/' diff --git a/playbooks/ironic-python-agent-build-image/run.yaml b/playbooks/ironic-python-agent-build-image/run.yaml index bd060df..d5eb810 100644 --- a/playbooks/ironic-python-agent-build-image/run.yaml +++ b/playbooks/ironic-python-agent-build-image/run.yaml @@ -1,9 +1,5 @@ - hosts: all - vars: - ipa_raw_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_RAW' - ipa_tar_dir: '{{ ansible_user_dir }}/src/opendev.org/openstack/ironic-python-agent/UPLOAD_TAR' - tasks: - name: Create a target directory for raw images @@ -16,10 +12,5 @@ path: '{{ ipa_tar_dir }}' state: directory - - import_role: - name: ipa-build-tinyipa-image - when: image_type == 'tinyipa' - - - import_role: - name: ipa-build-dib-image - when: image_type == 'dib' + - include_role: + name: ipa-build-{{ image_type }}-image diff --git a/roles/ipa-build-dib-image/tasks/install.yaml b/roles/ipa-build-dib-image/tasks/install.yaml index fc90b0a..8a9694f 100644 --- a/roles/ipa-build-dib-image/tasks/install.yaml +++ b/roles/ipa-build-dib-image/tasks/install.yaml @@ -4,13 +4,8 @@ vars: bindep_dir: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/diskimage-builder'].src_dir }}" -- name: Install requirements for ironic-python-agent-builder - pip: - requirements: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/ironic-python-agent-builder'].src_dir }}/requirements.txt" - extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" - become: true - - name: Install ironic-python-agent-builder pip: name: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/ironic-python-agent-builder'].src_dir }}" + extra_args: -c "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt" become: true