DIB: add --branch argument to override IPA branch
Change-Id: I6954342e4c2d3936cdea415838849c31c84b77ac
This commit is contained in:
parent
19f046112d
commit
f6bf7b97d5
@ -47,6 +47,9 @@ def main():
|
||||
default="ironic-python-agent")
|
||||
parser.add_argument("-e", "--element", action='append', default=[],
|
||||
help="Additional DIB element to use")
|
||||
parser.add_argument("-b", "--branch",
|
||||
help="If set, override the branch that is used for "
|
||||
"ironic-python-agent and requirements")
|
||||
# TODO(dtantsur): handle distribution == tinyipa
|
||||
os.environ['ELEMENTS_PATH'] = find_elements_path()
|
||||
if not os.environ.get('DIB_INSTALLTYPE_pip_and_virtualenv'):
|
||||
@ -57,6 +60,9 @@ def main():
|
||||
args = parser.parse_args()
|
||||
if args.release:
|
||||
os.environ['DIB_RELEASE'] = args.release
|
||||
if args.branch:
|
||||
os.environ['DIB_REPOREF_ironic_python_agent'] = args.branch
|
||||
os.environ['DIB_REPOREF_requirements'] = args.branch
|
||||
try:
|
||||
subprocess.check_call(['disk-image-create', '-o', args.output,
|
||||
'ironic-python-agent-ramdisk',
|
||||
|
@ -4,17 +4,15 @@
|
||||
|
||||
- name: Build a DIB image
|
||||
command: |
|
||||
ironic-python-agent-builder -o {{ image_name }}
|
||||
ironic-python-agent-builder -o {{ image_name }} -b HEAD
|
||||
{{ "-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
|
||||
# Use repositories checked out by Zuul (combined with -b HEAD above)
|
||||
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: |
|
||||
|
Loading…
Reference in New Issue
Block a user