Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #38094 - Support --els switch in convert2rhel #933

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion app/views/templates/script/convert2rhel_analyze.erb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,20 @@ model: JobTemplate
job_category: Convert 2 RHEL
provider_type: script
kind: job_template
template_inputs:
- name: ELS
required: true

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be required=false, right?

input_type: user
description: Use an Extended Lifecycle Support (ELS) add-on subscription
advanced: false
value_type: plain
options: "true\nfalse"
default: "true"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be default no/false, right?

hidden_value: false
Comment on lines +8 to +17

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After applying this patch, this option is not appearing in the inputs section on the Run Job page in UI for this job template, so just curious to know where do we define this template_inputs for UI?

%>
<%-
els = input('ELS') == "true" ? "--els" : ""
-%>
<% if @host.operatingsystem.family == 'Redhat' -%>
if ! [ $(id -u) -eq 0 ]; then
echo "You must run convert2rhel as a root user."
Expand All @@ -18,7 +31,7 @@ fi

export CONVERT2RHEL_THROUGH_FOREMAN=1

/usr/bin/convert2rhel analyze -y
/usr/bin/convert2rhel analyze -y <%= els %>

# Workaround for https://issues.redhat.com/browse/RHELC-1280
subscription-manager facts --update
Expand Down
Loading