Parametrize UpgradeLeappDevelSkip to pass multiple env variables.

One of the ways Leapp has to skip some checks is by
passing some environment files when to the leapp
execution environment. Up to now we only tested the
LEAPP_DEVEL_SKIP_RHSM=1 one, however there are many
more. So it makes sense to parametrize this variable
to allow passing a string with all the environment
variables we want to pass to Leapp.

Change-Id: Ic9f4a36cef25150708a71396bea754a93f87661d
This commit is contained in:
Jose Luis Franco Arza 2019-08-08 13:03:45 +02:00
parent 9985d5a13e
commit 56ba9e90db

View File

@ -59,10 +59,12 @@ parameters:
description: Print debugging output when running Leapp
type: boolean
default: true
UpgradeLeappDevelSkipRhsm:
description: Skip RHSM when running Leapp in development/testing.
type: boolean
default: false
UpgradeLeappDevelSkip:
description: |
Skip Leapp checks by setting env variables when running Leapp in
development/testing. For example, LEAPP_DEVEL_SKIP_RHSM=1.
type: string
default: ''
UpgradeLeappRebootTimeout:
description: Timeout (seconds) for the OS upgrade phase via Leapp
type: number
@ -97,7 +99,7 @@ outputs:
set_fact:
upgrade_leapp_enabled: {get_param: UpgradeLeappEnabled}
upgrade_leapp_debug: {get_param: UpgradeLeappDebug}
upgrade_leapp_devel_skip_rhsm: {get_param: UpgradeLeappDevelSkipRhsm}
upgrade_leapp_devel_skip: {get_param: UpgradeLeappDevelSkip}
upgrade_leapp_reboot_timeout: {get_param: UpgradeLeappRebootTimeout}
- name: system_upgrade_prepare step 3
tags:
@ -123,7 +125,7 @@ outputs:
when: upgrade_leapp_enabled
- name: run leapp upgrade (download packages)
shell: >
{% if upgrade_leapp_devel_skip_rhsm|default(false) %}LEAPP_DEVEL_SKIP_RHSM=1{% endif %}
{% if upgrade_leapp_devel_skip|default(false) %}{{ upgrade_leapp_devel_skip }}{% endif %}
leapp upgrade
{% if upgrade_leapp_debug|default(true) %}--debug{% endif %}
when: upgrade_leapp_enabled