foreman_remote_execution 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/remote_execution_feature.rb +1 -1
- data/db/migrate/20150612121541_add_job_template_to_template.rb +2 -2
- data/db/migrate/20150616080015_create_template_input.rb +6 -6
- data/db/migrate/20150708133241_add_targeting.rb +2 -2
- data/db/migrate/20150708133242_add_invocation.rb +1 -1
- data/db/migrate/20150708133305_add_template_invocation.rb +1 -1
- data/db/migrate/20150812145900_add_last_task_id_to_job_invocation.rb +1 -1
- data/db/migrate/20150826191632_create_target_remote_execution_proxies.rb +1 -1
- data/db/migrate/20151120171100_add_effective_user_to_template_invocation.rb +1 -1
- data/db/migrate/20151124162300_create_job_template_effective_users.rb +1 -1
- data/db/migrate/20151203100824_add_description_to_job_invocation.rb +2 -2
- data/db/migrate/20160108141144_make_job_name_default_to_something.rb +2 -2
- data/db/migrate/20160113161916_add_run_host_job_task_id_to_template_invocation.rb +1 -1
- data/db/migrate/20160118124600_create_remote_execution_features.rb +4 -6
- data/lib/foreman_remote_execution/version.rb +1 -1
- data/lib/tasks/foreman_remote_execution_tasks.rake +2 -7
- data/test/factories/foreman_remote_execution_factories.rb +1 -0
- data/test/test_plugin_helper.rb +1 -1
- data/test/unit/execution_task_status_mapper_test.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fbd4cc854e9c31820b3dc2a1f9003613c5aa5ca1
|
4
|
+
data.tar.gz: 3f6b42cc33bac2022990315ed31d29fd537a5df9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7bdbfca1932005c1d8fe09c9a72adb2b72bedd9455a9a6bed8e53fd3fa750dbf659920a6f443503007ac529da9136a5bbee8964fa9271123227e7f501d3ff31e
|
7
|
+
data.tar.gz: 8f7d084a004c1c8b0705e2f37625801090cfb789990a14ce50613781e21e72c9be595f14e0c05a3cb915d70d68fd94966bc5ff9bea80cd13bb58c807fdba56c4
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class RemoteExecutionFeature < ActiveRecord::Base
|
2
2
|
attr_accessible :label, :name, :provided_input_names, :description, :job_template_id
|
3
3
|
|
4
|
-
|
4
|
+
validates :label, :name, :presence => true, :uniqueness => true
|
5
5
|
|
6
6
|
belongs_to :job_template
|
7
7
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddJobTemplateToTemplate < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
add_column :templates, :job_name, :string
|
4
|
-
add_column :templates, :provider_type, :string
|
3
|
+
add_column :templates, :job_name, :string, :limit => 255
|
4
|
+
add_column :templates, :provider_type, :string, :limit => 255
|
5
5
|
end
|
6
6
|
end
|
@@ -1,13 +1,13 @@
|
|
1
1
|
class CreateTemplateInput < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :template_inputs do |t|
|
4
|
-
t.string :name, :null => false
|
4
|
+
t.string :name, :null => false, :limit => 255
|
5
5
|
t.boolean :required, :null => false, :default => false
|
6
|
-
t.string :input_type, :null => false
|
7
|
-
t.string :fact_name
|
8
|
-
t.string :variable_name
|
9
|
-
t.string :puppet_class_name
|
10
|
-
t.string :puppet_parameter_name
|
6
|
+
t.string :input_type, :null => false, :limit => 255
|
7
|
+
t.string :fact_name, :limit => 255
|
8
|
+
t.string :variable_name, :limit => 255
|
9
|
+
t.string :puppet_class_name, :limit => 255
|
10
|
+
t.string :puppet_parameter_name, :limit => 255
|
11
11
|
t.text :description
|
12
12
|
t.integer :template_id
|
13
13
|
|
@@ -1,10 +1,10 @@
|
|
1
1
|
class AddTargeting < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :targetings do |t|
|
4
|
-
t.string :search_query
|
4
|
+
t.string :search_query, :limit => 255
|
5
5
|
t.references :bookmark
|
6
6
|
t.references :user
|
7
|
-
t.string :targeting_type, :null => false
|
7
|
+
t.string :targeting_type, :null => false, :limit => 255
|
8
8
|
t.timestamps
|
9
9
|
end
|
10
10
|
|
@@ -2,7 +2,7 @@ class AddInvocation< ActiveRecord::Migration
|
|
2
2
|
def change
|
3
3
|
create_table :job_invocations do |t|
|
4
4
|
t.references :targeting, :null => false
|
5
|
-
t.string :job_name, :null => false
|
5
|
+
t.string :job_name, :null => false, :limit => 255
|
6
6
|
end
|
7
7
|
|
8
8
|
add_index :job_invocations, [:targeting_id], :name => 'job_invocations_targeting_id'
|
@@ -12,7 +12,7 @@ class AddTemplateInvocation < ActiveRecord::Migration
|
|
12
12
|
create_table :template_invocation_input_values do |t|
|
13
13
|
t.references :template_invocation, :null => false
|
14
14
|
t.references :template_input, :null => false
|
15
|
-
t.string :value, :null => false
|
15
|
+
t.string :value, :null => false, :limit => 255
|
16
16
|
end
|
17
17
|
|
18
18
|
add_index :template_invocation_input_values, [:template_invocation_id, :template_input_id], :name => 'template_invocation_input_values_ti_ti_ids'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddLastTaskIdToJobInvocation < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
add_column :job_invocations, :last_task_id, :string
|
3
|
+
add_column :job_invocations, :last_task_id, :string, :limit => 255
|
4
4
|
add_index :job_invocations, [:last_task_id], :name => 'job_invocations_last_task_id'
|
5
5
|
end
|
6
6
|
end
|
@@ -3,7 +3,7 @@ class CreateTargetRemoteExecutionProxies < ActiveRecord::Migration
|
|
3
3
|
create_table :target_remote_execution_proxies do |t|
|
4
4
|
t.integer :remote_execution_proxy_id
|
5
5
|
t.integer :target_id
|
6
|
-
t.string :target_type
|
6
|
+
t.string :target_type, :limit => 255
|
7
7
|
|
8
8
|
t.timestamps
|
9
9
|
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
class AddDescriptionToJobInvocation < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
-
add_column :job_invocations, :description, :string
|
4
|
-
add_column :templates, :description_format, :string
|
3
|
+
add_column :job_invocations, :description, :string, :limit => 255
|
4
|
+
add_column :templates, :description_format, :string, :limit => 255
|
5
5
|
end
|
6
6
|
|
7
7
|
def down
|
@@ -1,9 +1,9 @@
|
|
1
1
|
class MakeJobNameDefaultToSomething < ActiveRecord::Migration
|
2
2
|
def up
|
3
|
-
change_column :templates, :job_name, :string, :default => 'Miscellaneous'
|
3
|
+
change_column :templates, :job_name, :string, :default => 'Miscellaneous', :limit => 255
|
4
4
|
end
|
5
5
|
|
6
6
|
def down
|
7
|
-
change_column :templates, :job_name, :string, :default => nil
|
7
|
+
change_column :templates, :job_name, :string, :default => nil, :limit => 255
|
8
8
|
end
|
9
9
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
class AddRunHostJobTaskIdToTemplateInvocation < ActiveRecord::Migration
|
2
2
|
def change
|
3
|
-
add_column :template_invocations, :run_host_job_task_id, :string
|
3
|
+
add_column :template_invocations, :run_host_job_task_id, :string, :limit => 255
|
4
4
|
add_index :template_invocations, [:run_host_job_task_id], :name => 'template_invocations_run_host_job_task_id'
|
5
5
|
end
|
6
6
|
end
|
@@ -1,14 +1,12 @@
|
|
1
1
|
class CreateRemoteExecutionFeatures < ActiveRecord::Migration
|
2
2
|
def change
|
3
3
|
create_table :remote_execution_features do |t|
|
4
|
-
t.string :label, :index => true, :null => false
|
5
|
-
t.string :name, :null => false
|
6
|
-
t.string :description
|
4
|
+
t.string :label, :index => true, :null => false, :limit => 255
|
5
|
+
t.string :name, :null => false, :limit => 255
|
6
|
+
t.string :description, :limit => 255
|
7
7
|
t.text :provided_inputs
|
8
|
-
t.integer :job_template_id
|
8
|
+
t.integer :job_template_id, :index => true
|
9
9
|
end
|
10
|
-
add_index :remote_execution_features, :label
|
11
|
-
add_index :remote_execution_features, :job_template_id
|
12
10
|
add_foreign_key :remote_execution_features, :templates, :column => :job_template_id
|
13
11
|
end
|
14
12
|
end
|
@@ -36,14 +36,9 @@ namespace :foreman_remote_execution do
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
-
Rake::Task[:test].enhance
|
40
|
-
Rake::Task['test:foreman_remote_execution'].invoke
|
41
|
-
end
|
39
|
+
Rake::Task[:test].enhance ['test:foreman_remote_execution']
|
42
40
|
|
43
41
|
load 'tasks/jenkins.rake'
|
44
42
|
if Rake::Task.task_defined?(:'jenkins:unit')
|
45
|
-
Rake::Task['jenkins:unit'].enhance
|
46
|
-
Rake::Task['test:foreman_remote_execution'].invoke
|
47
|
-
Rake::Task['foreman_remote_execution:rubocop'].invoke
|
48
|
-
end
|
43
|
+
Rake::Task['jenkins:unit'].enhance ['test:foreman_remote_execution', 'foreman_remote_execution:rubocop']
|
49
44
|
end
|
data/test/test_plugin_helper.rb
CHANGED
@@ -3,7 +3,7 @@ require 'test_plugin_helper'
|
|
3
3
|
describe HostStatus::ExecutionStatus::ExecutionTaskStatusMapper do
|
4
4
|
|
5
5
|
describe '.sql_conditions_for(status)' do
|
6
|
-
subject { HostStatus::ExecutionStatus::ExecutionTaskStatusMapper }
|
6
|
+
let(:subject) { HostStatus::ExecutionStatus::ExecutionTaskStatusMapper }
|
7
7
|
|
8
8
|
it 'accepts status number as well as string representation' do
|
9
9
|
subject.sql_conditions_for(HostStatus::ExecutionStatus::ERROR).must_equal subject.sql_conditions_for('failed')
|
@@ -18,7 +18,7 @@ describe HostStatus::ExecutionStatus::ExecutionTaskStatusMapper do
|
|
18
18
|
let(:mapper) { HostStatus::ExecutionStatus::ExecutionTaskStatusMapper.new(task) }
|
19
19
|
|
20
20
|
describe '#status' do
|
21
|
-
subject { mapper }
|
21
|
+
let(:subject) { mapper }
|
22
22
|
|
23
23
|
describe 'is queued' do
|
24
24
|
context 'when there is no task' do
|
@@ -65,7 +65,7 @@ describe HostStatus::ExecutionStatus::ExecutionTaskStatusMapper do
|
|
65
65
|
end
|
66
66
|
|
67
67
|
describe '#status_label' do
|
68
|
-
subject { mapper.status_label }
|
68
|
+
let(:subject) { mapper.status_label }
|
69
69
|
|
70
70
|
context 'status is OK' do
|
71
71
|
before do
|
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: 0.3.
|
4
|
+
version: 0.3.2
|
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: 2016-04-
|
11
|
+
date: 2016-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: deface
|