foreman_remote_execution 14.0.2 → 14.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/api/v2/job_invocations_controller.rb +34 -17
- data/app/helpers/remote_execution_helper.rb +2 -2
- data/app/lib/actions/remote_execution/proxy_action.rb +10 -5
- data/app/lib/actions/remote_execution/run_host_job.rb +1 -1
- data/app/lib/actions/remote_execution/template_invocation_progress_logging.rb +2 -3
- data/app/views/api/v2/job_invocations/hosts.json.rabl +15 -0
- data/config/routes.rb +1 -0
- data/db/migrate/20240312133027_extend_template_invocation_events.rb +19 -0
- data/lib/foreman_remote_execution/engine.rb +1 -1
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/lib/tasks/foreman_remote_execution_tasks.rake +3 -0
- data/webpack/JobInvocationDetail/JobInvocationActions.js +1 -1
- data/webpack/JobInvocationDetail/JobInvocationConstants.js +84 -0
- data/webpack/JobInvocationDetail/JobInvocationDetail.scss +0 -1
- data/webpack/JobInvocationDetail/JobInvocationHostTable.js +210 -0
- data/webpack/JobInvocationDetail/JobInvocationSelectors.js +2 -2
- data/webpack/JobInvocationDetail/__tests__/MainInformation.test.js +5 -1
- data/webpack/JobInvocationDetail/__tests__/fixtures.js +9 -0
- data/webpack/JobInvocationDetail/index.js +56 -34
- data/webpack/__mocks__/foremanReact/components/HostDetails/DetailsCard/DefaultLoaderEmptyState.js +1 -2
- data/webpack/react_app/components/RecentJobsCard/JobStatusIcon.js +38 -7
- data/webpack/react_app/components/RecentJobsCard/constants.js +4 -0
- data/webpack/react_app/components/TargetingHosts/__tests__/__snapshots__/HostStatus.test.js.snap +1 -1
- data/webpack/react_app/components/TargetingHosts/components/HostStatus.js +6 -6
- metadata +6 -57
- data/.babelrc.js +0 -3
- data/.eslintignore +0 -3
- data/.eslintrc +0 -13
- data/.github/workflows/js_ci.yml +0 -32
- data/.github/workflows/release.yml +0 -16
- data/.github/workflows/ruby_ci.yml +0 -19
- data/.gitignore +0 -19
- data/.packit.yaml +0 -45
- data/.prettierrc +0 -4
- data/.rubocop.yml +0 -105
- data/.rubocop_todo.yml +0 -516
- data/.tx/config +0 -10
- data/Gemfile +0 -5
- data/app/mailers/.gitkeep +0 -0
- data/app/views/dashboard/.gitkeep +0 -0
- data/foreman_remote_execution.gemspec +0 -33
- data/jsconfig.json +0 -8
@@ -1,12 +1,17 @@
|
|
1
1
|
import PropTypes from 'prop-types';
|
2
2
|
import React, { useEffect } from 'react';
|
3
3
|
import { useDispatch, useSelector } from 'react-redux';
|
4
|
-
import {
|
4
|
+
import {
|
5
|
+
Divider,
|
6
|
+
Flex,
|
7
|
+
PageSection,
|
8
|
+
PageSectionVariants,
|
9
|
+
} from '@patternfly/react-core';
|
5
10
|
import { translate as __, documentLocale } from 'foremanReact/common/I18n';
|
6
11
|
import PageLayout from 'foremanReact/routes/common/PageLayout/PageLayout';
|
7
12
|
import { useAPI } from 'foremanReact/common/hooks/API/APIHooks';
|
8
13
|
import { stopInterval } from 'foremanReact/redux/middlewares/IntervalMiddleware';
|
9
|
-
import {
|
14
|
+
import { getJobInvocation, getTask } from './JobInvocationActions';
|
10
15
|
import {
|
11
16
|
CURRENT_PERMISSIONS,
|
12
17
|
DATE_OPTIONS,
|
@@ -19,6 +24,7 @@ import JobInvocationOverview from './JobInvocationOverview';
|
|
19
24
|
import { selectItems } from './JobInvocationSelectors';
|
20
25
|
import JobInvocationSystemStatusChart from './JobInvocationSystemStatusChart';
|
21
26
|
import JobInvocationToolbarButtons from './JobInvocationToolbarButtons';
|
27
|
+
import JobInvocationHostTable from './JobInvocationHostTable';
|
22
28
|
|
23
29
|
const JobInvocationDetailPage = ({
|
24
30
|
match: {
|
@@ -32,6 +38,7 @@ const JobInvocationDetailPage = ({
|
|
32
38
|
status_label: statusLabel,
|
33
39
|
task,
|
34
40
|
start_at: startAt,
|
41
|
+
targeting,
|
35
42
|
} = items;
|
36
43
|
const finished =
|
37
44
|
statusLabel === STATUS.FAILED ||
|
@@ -57,7 +64,7 @@ const JobInvocationDetailPage = ({
|
|
57
64
|
}
|
58
65
|
|
59
66
|
useEffect(() => {
|
60
|
-
dispatch(
|
67
|
+
dispatch(getJobInvocation(`/api/job_invocations/${id}?host_status=true`));
|
61
68
|
if (finished && !autoRefresh) {
|
62
69
|
dispatch(stopInterval(JOB_INVOCATION_KEY));
|
63
70
|
}
|
@@ -82,45 +89,60 @@ const JobInvocationDetailPage = ({
|
|
82
89
|
};
|
83
90
|
|
84
91
|
return (
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
<Flex
|
99
|
-
className="job-invocation-detail-flex"
|
100
|
-
alignItems={{ default: 'alignItemsFlexStart' }}
|
92
|
+
<>
|
93
|
+
<PageLayout
|
94
|
+
header={description}
|
95
|
+
breadcrumbOptions={breadcrumbOptions}
|
96
|
+
toolbarButtons={
|
97
|
+
<JobInvocationToolbarButtons
|
98
|
+
jobId={id}
|
99
|
+
data={items}
|
100
|
+
currentPermissions={response.results}
|
101
|
+
permissionsStatus={status}
|
102
|
+
/>
|
103
|
+
}
|
104
|
+
searchable={false}
|
101
105
|
>
|
102
|
-
<JobInvocationSystemStatusChart
|
103
|
-
data={items}
|
104
|
-
isAlreadyStarted={isAlreadyStarted}
|
105
|
-
formattedStartDate={formattedStartDate}
|
106
|
-
/>
|
107
|
-
<Divider
|
108
|
-
orientation={{
|
109
|
-
default: 'vertical',
|
110
|
-
}}
|
111
|
-
/>
|
112
106
|
<Flex
|
113
|
-
className="job-
|
114
|
-
alignItems={{ default: '
|
107
|
+
className="job-invocation-detail-flex"
|
108
|
+
alignItems={{ default: 'alignItemsFlexStart' }}
|
115
109
|
>
|
116
|
-
<
|
110
|
+
<JobInvocationSystemStatusChart
|
117
111
|
data={items}
|
118
112
|
isAlreadyStarted={isAlreadyStarted}
|
119
113
|
formattedStartDate={formattedStartDate}
|
120
114
|
/>
|
115
|
+
<Divider
|
116
|
+
orientation={{
|
117
|
+
default: 'vertical',
|
118
|
+
}}
|
119
|
+
/>
|
120
|
+
<Flex
|
121
|
+
className="job-overview"
|
122
|
+
alignItems={{ default: 'alignItemsCenter' }}
|
123
|
+
>
|
124
|
+
<JobInvocationOverview
|
125
|
+
data={items}
|
126
|
+
isAlreadyStarted={isAlreadyStarted}
|
127
|
+
formattedStartDate={formattedStartDate}
|
128
|
+
/>
|
129
|
+
</Flex>
|
121
130
|
</Flex>
|
122
|
-
</
|
123
|
-
|
131
|
+
</PageLayout>
|
132
|
+
<PageSection
|
133
|
+
variant={PageSectionVariants.light}
|
134
|
+
className="table-section"
|
135
|
+
>
|
136
|
+
{items.id !== undefined && (
|
137
|
+
<JobInvocationHostTable
|
138
|
+
id={id}
|
139
|
+
targeting={targeting}
|
140
|
+
finished={finished}
|
141
|
+
autoRefresh={autoRefresh}
|
142
|
+
/>
|
143
|
+
)}
|
144
|
+
</PageSection>
|
145
|
+
</>
|
124
146
|
);
|
125
147
|
};
|
126
148
|
|
data/webpack/__mocks__/foremanReact/components/HostDetails/DetailsCard/DefaultLoaderEmptyState.js
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
import React from 'react';
|
2
|
-
import { translate as __ } from '../../../common/I18n';
|
3
2
|
|
4
3
|
const DefaultLoaderEmptyState = () => (
|
5
|
-
<span className="disabled-text">
|
4
|
+
<span className="disabled-text">Not available</span>
|
6
5
|
);
|
7
6
|
|
8
7
|
export default DefaultLoaderEmptyState;
|
@@ -3,29 +3,60 @@ import PropTypes from 'prop-types';
|
|
3
3
|
import {
|
4
4
|
CheckCircleIcon,
|
5
5
|
ExclamationCircleIcon,
|
6
|
+
BuildIcon,
|
7
|
+
RunningIcon,
|
8
|
+
ExclamationTriangleIcon,
|
6
9
|
QuestionCircleIcon,
|
7
10
|
} from '@patternfly/react-icons';
|
8
|
-
import {
|
11
|
+
import {
|
12
|
+
JOB_SUCCESS_STATUS,
|
13
|
+
JOB_ERROR_STATUS,
|
14
|
+
JOB_PLANNED_STATUS,
|
15
|
+
JOB_RUNNING_STATUS,
|
16
|
+
JOB_CANCELLED_STATUS,
|
17
|
+
JOB_AWAITING_STATUS,
|
18
|
+
} from './constants';
|
9
19
|
import './styles.scss';
|
10
20
|
|
11
21
|
const JobStatusIcon = ({ status, children, ...props }) => {
|
12
22
|
switch (status) {
|
13
23
|
case JOB_SUCCESS_STATUS:
|
14
24
|
return (
|
15
|
-
<span
|
16
|
-
<CheckCircleIcon {...props} /> {children}
|
25
|
+
<span>
|
26
|
+
<CheckCircleIcon className="job-success" {...props} /> {children}
|
17
27
|
</span>
|
18
28
|
);
|
19
29
|
case JOB_ERROR_STATUS:
|
20
30
|
return (
|
21
|
-
<span
|
22
|
-
<ExclamationCircleIcon {...props} /> {children}
|
31
|
+
<span>
|
32
|
+
<ExclamationCircleIcon className="job-error" {...props} /> {children}
|
33
|
+
</span>
|
34
|
+
);
|
35
|
+
case JOB_PLANNED_STATUS:
|
36
|
+
return (
|
37
|
+
<span>
|
38
|
+
<BuildIcon className="job-planned" {...props} /> {children}
|
39
|
+
</span>
|
40
|
+
);
|
41
|
+
case JOB_RUNNING_STATUS:
|
42
|
+
return (
|
43
|
+
<span>
|
44
|
+
<RunningIcon className="job-running" {...props} /> {children}
|
45
|
+
</span>
|
46
|
+
);
|
47
|
+
case JOB_CANCELLED_STATUS:
|
48
|
+
return (
|
49
|
+
<span>
|
50
|
+
<ExclamationTriangleIcon className="job-cancelled" {...props} />{' '}
|
51
|
+
{children}
|
23
52
|
</span>
|
24
53
|
);
|
54
|
+
case JOB_AWAITING_STATUS:
|
55
|
+
return <span className="job-awaiting_start">{children}</span>;
|
25
56
|
default:
|
26
57
|
return (
|
27
|
-
<span
|
28
|
-
<QuestionCircleIcon {...props} /> {children}
|
58
|
+
<span>
|
59
|
+
<QuestionCircleIcon className="job-unknown" {...props} /> {children}
|
29
60
|
</span>
|
30
61
|
);
|
31
62
|
}
|
@@ -5,6 +5,10 @@ export const SCHEDULED_TAB = 2;
|
|
5
5
|
|
6
6
|
export const JOB_SUCCESS_STATUS = 0;
|
7
7
|
export const JOB_ERROR_STATUS = 1;
|
8
|
+
export const JOB_PLANNED_STATUS = 2;
|
9
|
+
export const JOB_RUNNING_STATUS = 3;
|
10
|
+
export const JOB_CANCELLED_STATUS = 4;
|
11
|
+
export const JOB_AWAITING_STATUS = 5;
|
8
12
|
|
9
13
|
export const JOB_BASE_URL = '/job_invocations?search=targeted_host_id+%3D+';
|
10
14
|
export const JOB_API_URL =
|
@@ -8,38 +8,38 @@ const HostStatus = ({ status }) => {
|
|
8
8
|
case 'cancelled':
|
9
9
|
return (
|
10
10
|
<div>
|
11
|
-
<Icon type="pf" name="warning-triangle-o" /> {
|
11
|
+
<Icon type="pf" name="warning-triangle-o" /> {__('Cancelled')}
|
12
12
|
</div>
|
13
13
|
);
|
14
14
|
case 'N/A':
|
15
15
|
return (
|
16
16
|
<div>
|
17
|
-
<Icon type="fa" name="question" /> {
|
17
|
+
<Icon type="fa" name="question" /> {__('Awaiting start')}
|
18
18
|
</div>
|
19
19
|
);
|
20
20
|
case 'running':
|
21
21
|
return (
|
22
22
|
<div>
|
23
|
-
<Icon type="pf" name="running" /> {
|
23
|
+
<Icon type="pf" name="running" /> {__('Pending')}
|
24
24
|
</div>
|
25
25
|
);
|
26
26
|
case 'planned':
|
27
27
|
return (
|
28
28
|
<div>
|
29
|
-
<Icon type="pf" name="build" /> {
|
29
|
+
<Icon type="pf" name="build" /> {__('Scheduled')}
|
30
30
|
</div>
|
31
31
|
);
|
32
32
|
case 'warning':
|
33
33
|
case 'error':
|
34
34
|
return (
|
35
35
|
<div>
|
36
|
-
<Icon type="pf" name="error-circle-o" /> {__('
|
36
|
+
<Icon type="pf" name="error-circle-o" /> {__('Failed')}
|
37
37
|
</div>
|
38
38
|
);
|
39
39
|
case 'success':
|
40
40
|
return (
|
41
41
|
<div>
|
42
|
-
<Icon type="pf" name="ok" /> {
|
42
|
+
<Icon type="pf" name="ok" /> {__('Succeeded')}
|
43
43
|
</div>
|
44
44
|
);
|
45
45
|
default:
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foreman_remote_execution
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 14.
|
4
|
+
version: 14.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Foreman Remote Execution team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|
@@ -96,19 +96,6 @@ extra_rdoc_files:
|
|
96
96
|
- README.md
|
97
97
|
- LICENSE
|
98
98
|
files:
|
99
|
-
- ".babelrc.js"
|
100
|
-
- ".eslintignore"
|
101
|
-
- ".eslintrc"
|
102
|
-
- ".github/workflows/js_ci.yml"
|
103
|
-
- ".github/workflows/release.yml"
|
104
|
-
- ".github/workflows/ruby_ci.yml"
|
105
|
-
- ".gitignore"
|
106
|
-
- ".packit.yaml"
|
107
|
-
- ".prettierrc"
|
108
|
-
- ".rubocop.yml"
|
109
|
-
- ".rubocop_todo.yml"
|
110
|
-
- ".tx/config"
|
111
|
-
- Gemfile
|
112
99
|
- LICENSE
|
113
100
|
- README.md
|
114
101
|
- Rakefile
|
@@ -172,7 +159,6 @@ files:
|
|
172
159
|
- app/lib/foreman_remote_execution/renderer/scope/input.rb
|
173
160
|
- app/lib/foreman_remote_execution/renderer_methods.rb
|
174
161
|
- app/lib/proxy_api/remote_execution_ssh.rb
|
175
|
-
- app/mailers/.gitkeep
|
176
162
|
- app/mailers/rex_job_mailer.rb
|
177
163
|
- app/models/concerns/api/v2/hosts_controller_extensions.rb
|
178
164
|
- app/models/concerns/api/v2/interfaces_controller_extensions.rb
|
@@ -224,6 +210,7 @@ files:
|
|
224
210
|
- app/views/api/v2/interfaces/execution_flag.json.rabl
|
225
211
|
- app/views/api/v2/job_invocations/base.json.rabl
|
226
212
|
- app/views/api/v2/job_invocations/create.json.rabl
|
213
|
+
- app/views/api/v2/job_invocations/hosts.json.rabl
|
227
214
|
- app/views/api/v2/job_invocations/index.json.rabl
|
228
215
|
- app/views/api/v2/job_invocations/main.json.rabl
|
229
216
|
- app/views/api/v2/job_invocations/show.json.rabl
|
@@ -242,7 +229,6 @@ files:
|
|
242
229
|
- app/views/api/v2/subnets/remote_execution_proxies.json.rabl
|
243
230
|
- app/views/api/v2/template_invocations/base.json.rabl
|
244
231
|
- app/views/api/v2/template_invocations/template_invocations.json.rabl
|
245
|
-
- app/views/dashboard/.gitkeep
|
246
232
|
- app/views/dashboard/_latest-jobs.html.erb
|
247
233
|
- app/views/job_invocation_task_groups/_job_invocation_task_groups.html.erb
|
248
234
|
- app/views/job_invocations/_card_results.html.erb
|
@@ -352,6 +338,7 @@ files:
|
|
352
338
|
- db/migrate/20220822155946_add_time_to_pickup_to_job_invocation.rb
|
353
339
|
- db/migrate/20221129170145_redefine_template_invocation_events_index.rb
|
354
340
|
- db/migrate/20230816154510_drop_time_span_from_job_invocations.rb
|
341
|
+
- db/migrate/20240312133027_extend_template_invocation_events.rb
|
355
342
|
- db/migrate/20240522093412_add_smart_proxy_id_to_template_invocation.rb
|
356
343
|
- db/migrate/20240522093413_migrate_smart_proxy_ids_to_template_invocations.rb
|
357
344
|
- db/seeds.d/100-assign_features_with_templates.rb
|
@@ -365,8 +352,6 @@ files:
|
|
365
352
|
- extra/cockpit/foreman-cockpit-session
|
366
353
|
- extra/cockpit/foreman-cockpit.service
|
367
354
|
- extra/cockpit/settings.yml.example
|
368
|
-
- foreman_remote_execution.gemspec
|
369
|
-
- jsconfig.json
|
370
355
|
- lib/foreman_remote_execution.rb
|
371
356
|
- lib/foreman_remote_execution/engine.rb
|
372
357
|
- lib/foreman_remote_execution/tasks/explain_proxy_selection.rake
|
@@ -440,6 +425,7 @@ files:
|
|
440
425
|
- webpack/JobInvocationDetail/JobInvocationActions.js
|
441
426
|
- webpack/JobInvocationDetail/JobInvocationConstants.js
|
442
427
|
- webpack/JobInvocationDetail/JobInvocationDetail.scss
|
428
|
+
- webpack/JobInvocationDetail/JobInvocationHostTable.js
|
443
429
|
- webpack/JobInvocationDetail/JobInvocationOverview.js
|
444
430
|
- webpack/JobInvocationDetail/JobInvocationSelectors.js
|
445
431
|
- webpack/JobInvocationDetail/JobInvocationSystemStatusChart.js
|
@@ -615,41 +601,4 @@ signing_key:
|
|
615
601
|
specification_version: 4
|
616
602
|
summary: A plugin bringing remote execution to the Foreman, completing the config
|
617
603
|
management functionality with remote management functionality.
|
618
|
-
test_files:
|
619
|
-
- test/benchmark/run_hosts_job_benchmark.rb
|
620
|
-
- test/benchmark/targeting_benchmark.rb
|
621
|
-
- test/factories/foreman_remote_execution_factories.rb
|
622
|
-
- test/functional/api/v2/foreign_input_sets_controller_test.rb
|
623
|
-
- test/functional/api/v2/job_invocations_controller_test.rb
|
624
|
-
- test/functional/api/v2/job_templates_controller_test.rb
|
625
|
-
- test/functional/api/v2/registration_controller_test.rb
|
626
|
-
- test/functional/api/v2/remote_execution_features_controller_test.rb
|
627
|
-
- test/functional/api/v2/template_invocations_controller_test.rb
|
628
|
-
- test/functional/cockpit_controller_test.rb
|
629
|
-
- test/functional/job_invocations_controller_test.rb
|
630
|
-
- test/functional/job_templates_controller_test.rb
|
631
|
-
- test/functional/ui_job_wizard_controller_test.rb
|
632
|
-
- test/graphql/mutations/job_invocations/create_test.rb
|
633
|
-
- test/graphql/queries/job_invocation_query_test.rb
|
634
|
-
- test/graphql/queries/job_invocations_query_test.rb
|
635
|
-
- test/helpers/remote_execution_helper_test.rb
|
636
|
-
- test/support/remote_execution_helper.rb
|
637
|
-
- test/test_plugin_helper.rb
|
638
|
-
- test/unit/actions/run_host_job_test.rb
|
639
|
-
- test/unit/actions/run_hosts_job_test.rb
|
640
|
-
- test/unit/api_params_test.rb
|
641
|
-
- test/unit/concerns/foreman_tasks_cleaner_extensions_test.rb
|
642
|
-
- test/unit/concerns/host_extensions_test.rb
|
643
|
-
- test/unit/concerns/nic_extensions_test.rb
|
644
|
-
- test/unit/execution_task_status_mapper_test.rb
|
645
|
-
- test/unit/input_template_renderer_test.rb
|
646
|
-
- test/unit/job_invocation_composer_test.rb
|
647
|
-
- test/unit/job_invocation_report_template_test.rb
|
648
|
-
- test/unit/job_invocation_test.rb
|
649
|
-
- test/unit/job_template_effective_user_test.rb
|
650
|
-
- test/unit/job_template_test.rb
|
651
|
-
- test/unit/remote_execution_feature_test.rb
|
652
|
-
- test/unit/remote_execution_provider_test.rb
|
653
|
-
- test/unit/renderer_scope_input_test.rb
|
654
|
-
- test/unit/targeting_test.rb
|
655
|
-
- test/unit/template_invocation_input_value_test.rb
|
604
|
+
test_files: []
|
data/.babelrc.js
DELETED
data/.eslintignore
DELETED
data/.eslintrc
DELETED
data/.github/workflows/js_ci.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
name: JS
|
2
|
-
on:
|
3
|
-
pull_request:
|
4
|
-
paths:
|
5
|
-
- 'webpack/**'
|
6
|
-
- 'package.json'
|
7
|
-
- '.github/workflows/js_ci.yml'
|
8
|
-
jobs:
|
9
|
-
test_js:
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
strategy:
|
12
|
-
fail-fast: false
|
13
|
-
matrix:
|
14
|
-
node-version: [14]
|
15
|
-
steps:
|
16
|
-
- uses: actions/checkout@v2
|
17
|
-
- name: Setup Node
|
18
|
-
uses: actions/setup-node@v1
|
19
|
-
with:
|
20
|
-
node-version: ${{ matrix.node-version }}
|
21
|
-
- name: Npm install
|
22
|
-
run: |
|
23
|
-
npm install
|
24
|
-
- name: Run plugin linter
|
25
|
-
run: |
|
26
|
-
npm run lint
|
27
|
-
- name: Run custom plugin linter
|
28
|
-
run: |
|
29
|
-
npm run lint:custom
|
30
|
-
- name: Run plugin tests
|
31
|
-
run: |
|
32
|
-
npm run test
|
@@ -1,16 +0,0 @@
|
|
1
|
-
name: Release
|
2
|
-
|
3
|
-
on:
|
4
|
-
push:
|
5
|
-
# Pattern matched against refs/tags
|
6
|
-
tags:
|
7
|
-
- '**'
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
release:
|
11
|
-
name: Release gem
|
12
|
-
uses: theforeman/actions/.github/workflows/release-gem.yml@v0
|
13
|
-
with:
|
14
|
-
allowed_owner: theforeman
|
15
|
-
secrets:
|
16
|
-
api_key: ${{ secrets.RUBYGEM_API_KEY }}
|
@@ -1,19 +0,0 @@
|
|
1
|
-
name: CI
|
2
|
-
|
3
|
-
on: pull_request
|
4
|
-
|
5
|
-
concurrency:
|
6
|
-
group: ${{ github.ref_name }}-${{ github.workflow }}
|
7
|
-
cancel-in-progress: true
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
rubocop:
|
11
|
-
name: Rubocop
|
12
|
-
uses: theforeman/actions/.github/workflows/rubocop.yml@v0
|
13
|
-
|
14
|
-
test:
|
15
|
-
name: Ruby
|
16
|
-
needs: rubocop
|
17
|
-
uses: theforeman/actions/.github/workflows/foreman_plugin.yml@v0
|
18
|
-
with:
|
19
|
-
plugin: foreman_remote_execution
|
data/.gitignore
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
*.sw?
|
2
|
-
.idea
|
3
|
-
.bundle/
|
4
|
-
log/*.log
|
5
|
-
pkg/
|
6
|
-
test/dummy/db/*.sqlite3
|
7
|
-
test/dummy/log/*.log
|
8
|
-
test/dummy/tmp/
|
9
|
-
test/dummy/.sass-cache
|
10
|
-
locale/*.mo
|
11
|
-
locale/*/*.pox
|
12
|
-
locale/*/*.edit.po
|
13
|
-
locale/*/*.po.time_stamp
|
14
|
-
Gemfile.lock
|
15
|
-
node_modules/
|
16
|
-
package-lock.json
|
17
|
-
coverage/
|
18
|
-
public/
|
19
|
-
locale/action_names.rb
|
data/.packit.yaml
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# See the documentation for more information:
|
2
|
-
# https://packit.dev/docs/configuration/
|
3
|
-
|
4
|
-
specfile_path: rubygem-foreman_remote_execution.spec
|
5
|
-
|
6
|
-
# add or remove files that should be synced
|
7
|
-
files_to_sync:
|
8
|
-
- rubygem-foreman_remote_execution.spec
|
9
|
-
- .packit.yaml
|
10
|
-
|
11
|
-
# name in upstream package repository or registry (e.g. in PyPI)
|
12
|
-
upstream_package_name: foreman_remote_execution
|
13
|
-
# downstream (Fedora) RPM package name
|
14
|
-
downstream_package_name: rubygem-foreman_remote_execution
|
15
|
-
|
16
|
-
upstream_tag_template: v{version}
|
17
|
-
|
18
|
-
actions:
|
19
|
-
post-upstream-clone:
|
20
|
-
- "wget https://raw.githubusercontent.com/theforeman/foreman-packaging/rpm/develop/packages/plugins/rubygem-foreman_remote_execution/rubygem-foreman_remote_execution.spec -O rubygem-foreman_remote_execution.spec"
|
21
|
-
get-current-version:
|
22
|
-
- ruby -rrubygems -e 'puts Gem::Specification::load(Dir.glob("*.gemspec").first).version'
|
23
|
-
create-archive:
|
24
|
-
- gem build foreman_remote_execution.gemspec
|
25
|
-
- bash -c "ls -1t ./foreman_remote_execution-*.gem | head -n 1"
|
26
|
-
|
27
|
-
jobs:
|
28
|
-
- job: copr_build
|
29
|
-
trigger: pull_request
|
30
|
-
targets:
|
31
|
-
rhel-8:
|
32
|
-
additional_modules: "foreman-devel:el8"
|
33
|
-
additional_repos:
|
34
|
-
- https://yum.theforeman.org/releases/nightly/el8/x86_64/
|
35
|
-
- https://yum.theforeman.org/plugins/nightly/el8/x86_64/
|
36
|
-
rhel-9:
|
37
|
-
additional_modules: "foreman-devel:el9"
|
38
|
-
additional_repos:
|
39
|
-
- https://yum.theforeman.org/releases/nightly/el9/x86_64/
|
40
|
-
- https://yum.theforeman.org/plugins/nightly/el9/x86_64/
|
41
|
-
module_hotfixes: true
|
42
|
-
|
43
|
-
srpm_build_deps:
|
44
|
-
- wget
|
45
|
-
- rubygems
|
data/.prettierrc
DELETED
data/.rubocop.yml
DELETED
@@ -1,105 +0,0 @@
|
|
1
|
-
inherit_gem:
|
2
|
-
theforeman-rubocop:
|
3
|
-
- lenient.yml
|
4
|
-
- minitest.yml
|
5
|
-
|
6
|
-
inherit_from: .rubocop_todo.yml
|
7
|
-
|
8
|
-
inherit_mode:
|
9
|
-
merge:
|
10
|
-
- Exclude
|
11
|
-
|
12
|
-
AllCops:
|
13
|
-
TargetRubyVersion: 2.7
|
14
|
-
TargetRailsVersion: 5.2
|
15
|
-
Exclude:
|
16
|
-
- 'node_modules/**/*'
|
17
|
-
- 'vendor/bundle/**/*'
|
18
|
-
|
19
|
-
Bundler/OrderedGems:
|
20
|
-
Enabled: false
|
21
|
-
|
22
|
-
Layout/DotPosition:
|
23
|
-
Enabled: false
|
24
|
-
|
25
|
-
Layout/HashAlignment:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
Layout/LineLength:
|
29
|
-
Enabled: false
|
30
|
-
|
31
|
-
Layout/ParameterAlignment:
|
32
|
-
Enabled: false
|
33
|
-
|
34
|
-
Layout/SpaceInsideHashLiteralBraces:
|
35
|
-
Enabled: false
|
36
|
-
|
37
|
-
Lint/BooleanSymbol:
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
Metrics:
|
41
|
-
Enabled: false
|
42
|
-
|
43
|
-
Performance/Casecmp:
|
44
|
-
Enabled: false
|
45
|
-
|
46
|
-
Performance/RegexpMatch:
|
47
|
-
Enabled: false
|
48
|
-
|
49
|
-
Rails:
|
50
|
-
Exclude:
|
51
|
-
- 'lib/foreman_remote_execution_core/**/*'
|
52
|
-
- 'lib/foreman_remote_execution_core.rb'
|
53
|
-
|
54
|
-
Rails/Blank:
|
55
|
-
UnlessPresent: false
|
56
|
-
|
57
|
-
# Won't work with sqlite
|
58
|
-
Rails/BulkChangeTable:
|
59
|
-
Enabled: false
|
60
|
-
|
61
|
-
Rails/RefuteMethods:
|
62
|
-
Enabled: false
|
63
|
-
|
64
|
-
# Don't prefer is_a? over kind_of?
|
65
|
-
Style/ClassCheck:
|
66
|
-
Enabled: false
|
67
|
-
|
68
|
-
# Don't enforce certain methods, e.g. detect over find
|
69
|
-
Style/CollectionMethods:
|
70
|
-
Enabled: false
|
71
|
-
|
72
|
-
Style/ConditionalAssignment:
|
73
|
-
Enabled: false
|
74
|
-
|
75
|
-
# Don't enforce frozen string literals
|
76
|
-
Style/FrozenStringLiteralComment:
|
77
|
-
Enabled: false
|
78
|
-
|
79
|
-
# Support both, Ruby 1.9 hashmap and hash-rocket syntax
|
80
|
-
Style/HashSyntax:
|
81
|
-
Enabled: false
|
82
|
-
|
83
|
-
Style/IfUnlessModifier:
|
84
|
-
Enabled: false
|
85
|
-
|
86
|
-
Style/InverseMethods:
|
87
|
-
Enabled: false
|
88
|
-
|
89
|
-
Style/MultipleComparison:
|
90
|
-
Enabled: false
|
91
|
-
|
92
|
-
Style/NumericPredicate:
|
93
|
-
Enabled: false
|
94
|
-
|
95
|
-
Style/ParallelAssignment:
|
96
|
-
Enabled: false
|
97
|
-
|
98
|
-
Style/ParenthesesAroundCondition:
|
99
|
-
Enabled: false
|
100
|
-
|
101
|
-
Style/PreferredHashMethods:
|
102
|
-
Enabled: false
|
103
|
-
|
104
|
-
Style/RaiseArgs:
|
105
|
-
Enabled: false
|