ironic-python-agent-builder/roles/ipa-build-dib-image/tasks/main.yaml

23 lines
785 B
YAML

- name: Generate image name
set_fact:
image_name: ipa-{{ image_distro }}-{{ ipa_branch_path }}
- name: Build a DIB image
command: |
ironic-python-agent-builder -o {{ image_name }}
{{ "-r {}".format(image_release) if image_release else '' }}
{{ image_distro }}
environment:
# Increase from the default value of 30
DIB_DHCP_TIMEOUT: 60
# Use repositories checked out by Zuul
DIB_REPOLOCATION_ironic_python_agent: '{{ ipa_source_path }}'
DIB_REPOREF_ironic_python_agent: HEAD
DIB_REPOLOCATION_requirements: '{{ requirements_path }}'
DIB_REPOREF_requirements: HEAD
- name: Move the resulting files
shell: |
tar -czf "{{ ipa_tar_dir }}/{{ image_name }}.tar.gz" {{ image_name }}*
mv {{ image_name }}* "{{ ipa_raw_dir }}"