foreman_leapp 1.1.1 → 1.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eb8a780a7e99e97ff8522fcf364eee8758e52d85798cbabd0ece68f1dbd5d249
4
- data.tar.gz: 7815d710b788c121ec6b22b860b7f71d484feafb3ed78eba43a985506a1c0bca
3
+ metadata.gz: af697afeb0e8d96dfd208fbded7b7eb14fe4e1713a0fb1ae9d98265a9be27948
4
+ data.tar.gz: dee96e5df9792f7ddb048020e70dec335fe0c0b533e006544bdbb267c980172a
5
5
  SHA512:
6
- metadata.gz: ae638917262ab9065a9c1479ffab9e7dc4377bed8ee0b09675e870ff0d309de452d909f5735ea73cecb062f77b1ecde359cd7e8d9f965da1a8ffc834cc270275
7
- data.tar.gz: f34e753b0fae01cb17eaaf9038ac55dfaa9bcbafce47b1d71e83118a92cae878da492bfa8d695ea5dd0ce3287263fb2532eb629e3f21cfd4fdc45d966d07c385
6
+ metadata.gz: 86187202b78ab26e603ab44fa666ae26d626f21e9cd4ffe8a5626be0eeb85dd4d38dc28ef3d942cd8c14323a34cc90e69e83e49163fb75b0114bb09afaf2e644
7
+ data.tar.gz: 31991aa8b5bdb1839ae1fc916786ade5ab24a08117963d9094efffbd7d23914e43d5b0878cade7f849cdcdbde42caf8a31b332b224c0f0ccb9cb124c6bfc92b8
data/README.md CHANGED
@@ -14,6 +14,14 @@ The plugin will add following jobs:
14
14
  - Remediation plan
15
15
  - Run upgrade via Leapp
16
16
 
17
+ ### Channel
18
+
19
+ Leapp by default will use the same "channel" (e4s, eus, aus) as the current OS, so if you are using "eus" repositories, the target OS will be on "eus" repositories as well.
20
+ But if you are upgrading and want to target a different channel, i.e. from a RHEL 7.9 to a RHEL 8.6 EUS, you can do it by explicitely setting the channel to "eus".
21
+
22
+ The channel have to be specified in both the preupgrade and upgrade jobs.
23
+ Default value of "channel" is "ga" - General availability: regular repositories are used by default.
24
+
17
25
  ## Api
18
26
  - `GET /api/preupgrade_reports` List Preupgrade reports
19
27
  - `GET /api/preupgrade_reports/:id` Show Preupgrade report
@@ -6,12 +6,22 @@ description_format: 'Upgradeability check for RHEL host'
6
6
  provider_type: SSH
7
7
  feature: leapp_preupgrade
8
8
  model: JobTemplate
9
+ template_inputs:
10
+ - name: Channel
11
+ description: "Set if the target OS is required to use the General Availability (GA) channel - the default - or a specific channel among: Update Services for SAP Solutions (E4S), Extended Upgrade Support (EUS) or Advanced Update Support (AUS)."
12
+ input_type: user
13
+ required: true
14
+ default: "ga"
15
+ options: "ga\ne4s\neus\naus"
16
+ %>
17
+ <%
18
+ channel_opts = input('Channel') == 'ga' ? '' : "--channel #{input('Channel')}"
9
19
  %>
10
20
 
11
21
  <%= render_template 'Check Leapp' %>
12
22
 
13
23
  rm -f /var/log/leapp/leapp-report.json
14
- leapp preupgrade
24
+ leapp preupgrade <%= channel_opts %>
15
25
 
16
26
  echo "===leap_upgrade_report_start==="
17
27
  cat /var/log/leapp/leapp-report.json
@@ -7,6 +7,12 @@ provider_type: Ansible
7
7
  feature: leapp_upgrade
8
8
  model: JobTemplate
9
9
  template_inputs:
10
+ - name: Channel
11
+ description: "Set if the target OS is required to use the General Availability (GA) channel - the default - or a specific channel among: Update Services for SAP Solutions (E4S), Extended Upgrade Support (EUS) or Advanced Update Support (AUS)."
12
+ input_type: user
13
+ required: true
14
+ default: "ga"
15
+ options: "ga\ne4s\neus\naus"
10
16
  - name: Reboot
11
17
  description: Reboot the host automaticaly to continue with the upgrade
12
18
  input_type: user
@@ -16,9 +22,12 @@ template_inputs:
16
22
  %>
17
23
  ---
18
24
  - hosts: all
25
+ vars:
26
+ - channel_opts: <% input('Channel') == 'ga' ? '' : "--channel #{input('Channel')}" %>
19
27
  tasks:
20
28
  - name: Run Leapp Upgrade
21
- command: leapp upgrade
29
+ command: leapp upgrade {{ channel_opts }}
30
+
22
31
  <%- if input('Reboot') == "true" -%>
23
32
  - name: Reboot the machine
24
33
  reboot:
@@ -1,5 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'foreman_ansible'
4
+ require 'foreman_remote_execution'
5
+
3
6
  module ForemanLeapp
4
7
  class Engine < ::Rails::Engine
5
8
  engine_name 'foreman_leapp'
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ForemanLeapp
4
- VERSION = '1.1.1'
4
+ VERSION = '1.2.1'
5
5
  end
@@ -15,7 +15,7 @@ end
15
15
  # Tests
16
16
  namespace :test do
17
17
  desc 'Test ForemanLeapp'
18
- Rake::TestTask.new(:foreman_leapp) do |t|
18
+ Rake::TestTask.new(:foreman_leapp => ['db:test:prepare']) do |t|
19
19
  test_dir = File.join(File.dirname(__FILE__), '../..', 'test')
20
20
  t.libs << ['test', test_dir]
21
21
  t.pattern = "#{test_dir}/**/*_test.rb"
data/package.json CHANGED
@@ -9,10 +9,7 @@
9
9
  "test": "tfm-test --plugin --config jest.config.js",
10
10
  "test:watch": "tfm-test --plugin --watchAll",
11
11
  "test:current": "tfm-test --plugin --watch",
12
- "publish-coverage": "tfm-publish-coverage",
13
- "stories": "tfm-stories --plugin",
14
- "stories:build": "tfm-build-stories --plugin",
15
- "stories:deploy": "surge --project .storybook-dist"
12
+ "publish-coverage": "tfm-publish-coverage"
16
13
  },
17
14
  "repository": {
18
15
  "type": "git",
@@ -25,15 +22,15 @@
25
22
  },
26
23
  "homepage": "https://github.com/oamg/foreman_leapp",
27
24
  "peerDependencies": {
28
- "@theforeman/vendor": ">= 8.16.0"
25
+ "@theforeman/vendor": ">= 12.0.1"
29
26
  },
30
27
  "devDependencies": {
31
28
  "@babel/core": "^7.7.0",
32
29
  "@theforeman/builder": ">= 12.0.1",
33
- "@theforeman/eslint-plugin-foreman": "^10.0",
34
- "@theforeman/stories": "^10.0",
35
- "@theforeman/test": "^10.0",
36
- "@theforeman/vendor-dev": "^10.0",
30
+ "@theforeman/eslint-plugin-foreman": ">= 12.0.1",
31
+ "@theforeman/eslint-plugin-rules": ">= 12.0.1",
32
+ "@theforeman/test": ">= 12.0.1",
33
+ "@theforeman/vendor-dev": ">= 12.0.1",
37
34
  "babel-eslint": "^10.0.0",
38
35
  "eslint": "^6.8.0",
39
36
  "jest-svg-transformer": "^1.0.0",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman_leapp
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Foreman Leapp team
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-12-01 00:00:00.000000000 Z
11
+ date: 2024-03-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: foreman_remote_execution
@@ -229,7 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
229
229
  - !ruby/object:Gem::Version
230
230
  version: '0'
231
231
  requirements: []
232
- rubygems_version: 3.1.6
232
+ rubygems_version: 3.2.33
233
233
  signing_key:
234
234
  specification_version: 4
235
235
  summary: A Foreman plugin for Leapp utility.
@@ -240,6 +240,6 @@ test_files:
240
240
  - test/helpers/template_helper_test.rb
241
241
  - test/models/preupgrade_report_entry_test.rb
242
242
  - test/models/preupgrade_report_test.rb
243
+ - test/test_plugin_helper.rb
243
244
  - test/unit/actions/preupgrade_job_test.rb
244
245
  - test/unit/helpers/job_helper_test.rb
245
- - test/test_plugin_helper.rb