maestro-plugin-rake-tasks 1.0.3 → 1.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- maestro-plugin-rake-tasks (1.0.3)
4
+ maestro-plugin-rake-tasks (1.0.4)
5
5
  git
6
6
  json (>= 1.4.6)
7
7
  nokogiri
@@ -18,7 +18,7 @@ GEM
18
18
  bouncy-castle-java (>= 1.5.0147)
19
19
  json (1.8.0-java)
20
20
  nokogiri (1.5.9-java)
21
- rake (10.0.3)
21
+ rake (10.0.4)
22
22
  rspec (2.13.0)
23
23
  rspec-core (~> 2.13.0)
24
24
  rspec-expectations (~> 2.13.0)
@@ -132,6 +132,8 @@ module Maestro
132
132
  manifest = JSON.parse(IO.read(@manifest_template_path))
133
133
  if manifest.instance_of? Array
134
134
  manifest.each { |m| m['version'] = manifest_version }
135
+ elsif !manifest['tasks'].nil? and manifest['tasks'].instance_of? Array
136
+ manifest['tasks'].each { |m| m['version'] = manifest_version }
135
137
  else
136
138
  manifest['version'] = manifest_version
137
139
  end
@@ -1,7 +1,7 @@
1
1
  module Maestro
2
2
  module Plugin
3
3
  module RakeTasks
4
- VERSION = '1.0.3'
4
+ VERSION = '1.0.4'
5
5
  end
6
6
  end
7
7
  end
@@ -82,6 +82,21 @@ describe Maestro::Plugin::RakeTasks::PackageTask do
82
82
 
83
83
  end
84
84
 
85
+ it 'should create an updated manifest file for new multi-tasks manifests' do
86
+ @task.stub(:git_version!)
87
+ @task.stub(:create_zip_file)
88
+ @task.manifest_template_path=File.dirname(__FILE__) + '/../../../manifest-multi-task.template.json'
89
+ @task.run_task true
90
+
91
+ manifest_path = File.dirname(__FILE__) + '/../../../../manifest.json'
92
+ File.exists?(manifest_path).should be_true
93
+ manifest = JSON.parse(IO.read(manifest_path))
94
+ manifest['tasks'].length.should == 2
95
+ manifest['tasks'].first['version'].should start_with 'X.Y.Z'
96
+ manifest['tasks'].last['version'].should start_with 'X.Y.Z'
97
+
98
+ end
99
+
85
100
  it 'should name the zip file based on the plugin_name and version' do
86
101
  @task.stub(:git_version!)
87
102
  @task.stub(:update_manifest)
@@ -0,0 +1,184 @@
1
+ {
2
+ "source_types": [
3
+ {
4
+ "name": "Jenkins",
5
+ "options": {
6
+ "host": "String",
7
+ "port": "Integer",
8
+ "username": "String",
9
+ "password": "Password",
10
+ "web_path": "String"
11
+ }
12
+ }
13
+ ],
14
+ "tasks": [
15
+ {
16
+ "name": "jenkins plugin",
17
+ "description": "Run A Set Of Work Steps In Jenkins",
18
+ "license": "Apache 2.0",
19
+ "author": "Kelly Plummer",
20
+ "version": "updated at build time",
21
+ "class": "MaestroDev::JenkinsWorker",
22
+ "type": "ruby",
23
+ "dependencies": [ ],
24
+ "task": {
25
+ "command": "/jenkinsplugin/build",
26
+ "inputs": {
27
+ "host": {
28
+ "required": true,
29
+ "type": "String",
30
+ "value": "localhost",
31
+ "description": "Hostname Of The Jenkins Server"
32
+ },
33
+ "port": {
34
+ "required": false,
35
+ "type": "Integer",
36
+ "value": 8080,
37
+ "description": "Port Jenkins Is Running On"
38
+ },
39
+ "job": {
40
+ "required": true,
41
+ "type": "String",
42
+ "value": "",
43
+ "description": "Name Of The Jenkins Job"
44
+ },
45
+ "username": {
46
+ "required": false,
47
+ "type": "String",
48
+ "value": "",
49
+ "description": "Username for jenkins server"
50
+ },
51
+ "password": {
52
+ "required": false,
53
+ "type": "Password",
54
+ "value": "",
55
+ "description": "Password for jenkins server"
56
+ },
57
+ "use_ssl": {
58
+ "required": true,
59
+ "type": "Boolean",
60
+ "value": false,
61
+ "description": "use ssl connection"
62
+ },
63
+ "web_path": {
64
+ "required": false,
65
+ "type": "String",
66
+ "value": "",
67
+ "description": "path of the jenkins application in the server"
68
+ },
69
+ "scm_url": {
70
+ "required": false,
71
+ "type": "Url",
72
+ "value": "",
73
+ "description": "Url Of The Source Code Repository"
74
+ },
75
+ "parameters": {
76
+ "required": false,
77
+ "type": "Array",
78
+ "value": [],
79
+ "description": "Parameters to pass to the job. Name=value formatted."
80
+ },
81
+ "user_defined_axes": {
82
+ "required": false,
83
+ "type": "Array",
84
+ "value": [],
85
+ "description": "User defined axes used for a configuration matrix project"
86
+ },
87
+ "label_axes": {
88
+ "required": false,
89
+ "type": "Array",
90
+ "value": [],
91
+ "description": "Labels for a configuration matrix project"
92
+ },
93
+ "steps": {
94
+ "required": false,
95
+ "type": "Array",
96
+ "value": [],
97
+ "description": "Set Of Steps To Be Executed By Jenkins"
98
+ },
99
+ "override_existing": {
100
+ "required": true,
101
+ "type": "Boolean",
102
+ "value": false,
103
+ "description": "Overwrite existing jobs, or create if it does not exist"
104
+ }
105
+ },
106
+ "outputs": {
107
+ "output": {
108
+ "type": "String"
109
+ }
110
+ },
111
+ "tool_name": "Build"
112
+ }
113
+ },
114
+ {
115
+ "name": "jenkins plugin",
116
+ "description": "Get the data from the latest build for a particular job",
117
+ "license": "Apache 2.0",
118
+ "author": "Etienne Pelletier",
119
+ "version": "updated at build time",
120
+ "class": "MaestroDev::JenkinsWorker",
121
+ "type": "ruby",
122
+ "dependencies": [ ],
123
+ "task": {
124
+ "command": "/jenkinsplugin/get_build_data",
125
+ "inputs": {
126
+ "host": {
127
+ "required": true,
128
+ "type": "String",
129
+ "value": "localhost",
130
+ "description": "Hostname Of The Jenkins Server"
131
+ },
132
+ "port": {
133
+ "required": false,
134
+ "type": "Integer",
135
+ "value": 8080,
136
+ "description": "Port Jenkins Is Running On"
137
+ },
138
+ "job": {
139
+ "required": true,
140
+ "type": "String",
141
+ "value": "",
142
+ "description": "Name Of The Jenkins Job"
143
+ },
144
+ "username": {
145
+ "required": false,
146
+ "type": "String",
147
+ "value": "",
148
+ "description": "Username for jenkins server"
149
+ },
150
+ "password": {
151
+ "required": false,
152
+ "type": "Password",
153
+ "value": "",
154
+ "description": "Password for jenkins server"
155
+ },
156
+ "use_ssl": {
157
+ "required": true,
158
+ "type": "Boolean",
159
+ "value": false,
160
+ "description": "use ssl connection"
161
+ },
162
+ "web_path": {
163
+ "required": false,
164
+ "type": "String",
165
+ "value": "",
166
+ "description": "path of the jenkins application in the server"
167
+ },
168
+ "scm_url": {
169
+ "required": false,
170
+ "type": "Url",
171
+ "value": "",
172
+ "description": "Url Of The Source Code Repository"
173
+ }
174
+ },
175
+ "outputs": {
176
+ "output": {
177
+ "type": "String"
178
+ }
179
+ },
180
+ "tool_name": "Build"
181
+ }
182
+ }
183
+ ]
184
+ }
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: maestro-plugin-rake-tasks
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.3
5
+ version: 1.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Etienne Pelletier
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2013-05-23 00:00:00 Z
13
+ date: 2013-06-04 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rake
@@ -112,6 +112,7 @@ files:
112
112
  - lib/maestro/plugin/rake_tasks/version.rb
113
113
  - maestro-plugin-rake-tasks.gemspec
114
114
  - spec/maestro/plugin/rake_tasks/package_task_spec.rb
115
+ - spec/manifest-multi-task.template.json
115
116
  - spec/manifest-single-task.template.json
116
117
  - spec/manifest.template.json
117
118
  - spec/pom.xml
@@ -151,6 +152,7 @@ specification_version: 3
151
152
  summary: A collection of Rake tasks used to package Maetro Ruby plugins
152
153
  test_files:
153
154
  - spec/maestro/plugin/rake_tasks/package_task_spec.rb
155
+ - spec/manifest-multi-task.template.json
154
156
  - spec/manifest-single-task.template.json
155
157
  - spec/manifest.template.json
156
158
  - spec/pom.xml