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")
|
default="ironic-python-agent")
|
||||||
parser.add_argument("-e", "--element", action='append', default=[],
|
parser.add_argument("-e", "--element", action='append', default=[],
|
||||||
help="Additional DIB element to use")
|
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
|
# TODO(dtantsur): handle distribution == tinyipa
|
||||||
os.environ['ELEMENTS_PATH'] = find_elements_path()
|
os.environ['ELEMENTS_PATH'] = find_elements_path()
|
||||||
if not os.environ.get('DIB_INSTALLTYPE_pip_and_virtualenv'):
|
if not os.environ.get('DIB_INSTALLTYPE_pip_and_virtualenv'):
|
||||||
@ -57,6 +60,9 @@ def main():
|
|||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
if args.release:
|
if args.release:
|
||||||
os.environ['DIB_RELEASE'] = 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:
|
try:
|
||||||
subprocess.check_call(['disk-image-create', '-o', args.output,
|
subprocess.check_call(['disk-image-create', '-o', args.output,
|
||||||
'ironic-python-agent-ramdisk',
|
'ironic-python-agent-ramdisk',
|
||||||
|
@ -4,17 +4,15 @@
|
|||||||
|
|
||||||
- name: Build a DIB image
|
- name: Build a DIB image
|
||||||
command: |
|
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 '' }}
|
{{ "-r {}".format(image_release) if image_release else '' }}
|
||||||
{{ image_distro }}
|
{{ image_distro }}
|
||||||
environment:
|
environment:
|
||||||
# Increase from the default value of 30
|
# Increase from the default value of 30
|
||||||
DIB_DHCP_TIMEOUT: 60
|
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_REPOLOCATION_ironic_python_agent: '{{ ipa_source_path }}'
|
||||||
DIB_REPOREF_ironic_python_agent: HEAD
|
|
||||||
DIB_REPOLOCATION_requirements: '{{ requirements_path }}'
|
DIB_REPOLOCATION_requirements: '{{ requirements_path }}'
|
||||||
DIB_REPOREF_requirements: HEAD
|
|
||||||
|
|
||||||
- name: Move the resulting files
|
- name: Move the resulting files
|
||||||
shell: |
|
shell: |
|
||||||
|
Loading…
Reference in New Issue
Block a user