hudson 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.gitignore +1 -0
  2. data/Changelog.md +3 -0
  3. data/Gemfile.lock +11 -43
  4. data/README.md +3 -151
  5. data/Rakefile +0 -77
  6. data/bin/hudson +2 -10
  7. data/hudson.gemspec +2 -12
  8. data/lib/hudson.rb +1 -8
  9. data/lib/hudson/version.rb +1 -1
  10. metadata +8 -203
  11. data/features/default_host.feature +0 -19
  12. data/features/development.feature +0 -14
  13. data/features/launch_server.feature +0 -17
  14. data/features/listing_jobs.feature +0 -34
  15. data/features/manage_jobs.feature +0 -207
  16. data/features/manage_slave_nodes.feature +0 -80
  17. data/features/step_definitions/common_steps.rb +0 -197
  18. data/features/step_definitions/fixture_project_steps.rb +0 -8
  19. data/features/step_definitions/hudson_steps.rb +0 -104
  20. data/features/step_definitions/scm_steps.rb +0 -12
  21. data/features/support/common.rb +0 -37
  22. data/features/support/env.rb +0 -14
  23. data/features/support/hooks.rb +0 -16
  24. data/features/support/hudson_helpers.rb +0 -6
  25. data/features/support/matchers.rb +0 -10
  26. data/lib/hudson/api.rb +0 -219
  27. data/lib/hudson/cli.rb +0 -253
  28. data/lib/hudson/cli/formatting.rb +0 -53
  29. data/lib/hudson/config.rb +0 -27
  30. data/lib/hudson/core_ext/hash.rb +0 -9
  31. data/lib/hudson/core_ext/object/blank.rb +0 -77
  32. data/lib/hudson/hudson-cli.jar +0 -0
  33. data/lib/hudson/installation.rb +0 -136
  34. data/lib/hudson/job_config_builder.rb +0 -287
  35. data/lib/hudson/project_scm.rb +0 -22
  36. data/lib/hudson/remote.rb +0 -11
  37. data/spec/fixtures/ec2_global.config.xml +0 -103
  38. data/spec/fixtures/rails.multi.config.xml +0 -82
  39. data/spec/fixtures/rails.single.config.triggers.xml +0 -84
  40. data/spec/fixtures/rails.single.config.xml +0 -80
  41. data/spec/fixtures/ruby.multi-ruby-multi-labels.config.xml +0 -84
  42. data/spec/fixtures/ruby.multi.config.xml +0 -77
  43. data/spec/fixtures/ruby.single.config.xml +0 -58
  44. data/spec/fixtures/therubyracer.config.xml +0 -77
  45. data/spec/hash_key_cleaner_spec.rb +0 -25
  46. data/spec/job_config_builder_spec.rb +0 -137
  47. data/spec/spec_helper.rb +0 -15
@@ -1,22 +0,0 @@
1
- module Hudson
2
- class ProjectScm
3
-
4
- def self.discover(scm)
5
- ProjectScmGit.new(scm) if File.exist?(".git") && File.directory?(".git")
6
- end
7
-
8
- def self.supported
9
- %w[git]
10
- end
11
- end
12
-
13
- class ProjectScmGit < ProjectScm
14
- def initialize(url = nil)
15
- @url = url
16
- end
17
-
18
- def url
19
- @url ||= `git config remote.origin.url`.strip
20
- end
21
- end
22
- end
@@ -1,11 +0,0 @@
1
- module Hudson
2
- class Remote
3
- def self.add_server(name, uri)
4
- remotes[name] = uri
5
- end
6
-
7
- def self.remotes
8
- @remotes ||= {}
9
- end
10
- end
11
- end
@@ -1,103 +0,0 @@
1
- <?xml version='1.0' encoding='UTF-8'?>
2
- <hudson>
3
- <version>1.359</version>
4
- <numExecutors>2</numExecutors>
5
- <mode>NORMAL</mode>
6
- <authorizationStrategy class="hudson.security.AuthorizationStrategy$Unsecured"/>
7
- <securityRealm class="hudson.security.SecurityRealm$None"/>
8
- <jdks/>
9
- <clouds>
10
- <hudson.plugins.ec2.EC2Cloud>
11
- <name>ec2-US_EAST_1</name>
12
- <accessId>0MVEQ5Q0BNYEGJX898G2</accessId>
13
- <secretKey>[REMOVED]</secretKey>
14
- <privateKey>
15
- <privateKey>[REMOVED]</privateKey>
16
- </privateKey>
17
- <instanceCap>2147483647</instanceCap>
18
- <templates>
19
- <hudson.plugins.ec2.SlaveTemplate>
20
- <ami>ami-79d43d10</ami>
21
- <description>Ubuntu Lucid 10.04 64bit Server</description>
22
- <remoteFS>/mnt/hudson</remoteFS>
23
- <type>LARGE</type>
24
- <labels>Ubuntu-Lucid-10.04-server-amd64 GCC_44</labels>
25
- <initScript></initScript>
26
- <userData></userData>
27
- <numExecutors>4</numExecutors>
28
- <remoteAdmin>ubuntu</remoteAdmin>
29
- <rootCommandPrefix>sudo</rootCommandPrefix>
30
- </hudson.plugins.ec2.SlaveTemplate>
31
- <hudson.plugins.ec2.SlaveTemplate>
32
- <ami>ami-e7d53c8e</ami>
33
- <description>Ubuntu Karmic 9.10 64bit Server</description>
34
- <remoteFS>/mnt/hudson</remoteFS>
35
- <type>LARGE</type>
36
- <labels>Ubuntu-Karmic-9.10-server-amd64 GCC_43</labels>
37
- <initScript></initScript>
38
- <userData></userData>
39
- <numExecutors>4</numExecutors>
40
- <remoteAdmin>ubuntu</remoteAdmin>
41
- <rootCommandPrefix>sudo</rootCommandPrefix>
42
- </hudson.plugins.ec2.SlaveTemplate>
43
- </templates>
44
- <region>US_EAST_1</region>
45
- </hudson.plugins.ec2.EC2Cloud>
46
- </clouds>
47
- <slaves>
48
- <slave>
49
- <name>Legolas</name>
50
- <description>Legolas Mac Pro</description>
51
- <remoteFS>/Users/hudon/work</remoteFS>
52
- <numExecutors>2</numExecutors>
53
- <mode>NORMAL</mode>
54
- <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
55
- <launcher class="hudson.plugins.sshslaves.SSHLauncher">
56
- <host>legolas.thefrontside.net</host>
57
- <port>22</port>
58
- <username>cowboyd</username>
59
- <password>[REMOVED]</password>
60
- <privatekey></privatekey>
61
- <jvmOptions></jvmOptions>
62
- </launcher>
63
- <label>OSX-Snow-Leopard-10.6.3</label>
64
- <nodeProperties/>
65
- </slave>
66
- <slave>
67
- <name>Gimli</name>
68
- <description>The Mac Mini Sitting on the bookshelf at the frontside office</description>
69
- <remoteFS>/Users/hudson/work</remoteFS>
70
- <numExecutors>2</numExecutors>
71
- <mode>NORMAL</mode>
72
- <retentionStrategy class="hudson.slaves.RetentionStrategy$Always"/>
73
- <launcher class="hudson.plugins.sshslaves.SSHLauncher">
74
- <host>gimli.thefrontside.net</host>
75
- <port>22</port>
76
- <username>hudson</username>
77
- <password>[REMOVED]</password>
78
- <privatekey></privatekey>
79
- <jvmOptions></jvmOptions>
80
- </launcher>
81
- <label>OSX-Leopard-10.5</label>
82
- <nodeProperties/>
83
- </slave>
84
- </slaves>
85
- <quietPeriod>5</quietPeriod>
86
- <scmCheckoutRetryCount>0</scmCheckoutRetryCount>
87
- <views>
88
- <hudson.model.AllView>
89
- <owner class="hudson" reference="../../.."/>
90
- <name>All</name>
91
- <filterExecutors>false</filterExecutors>
92
- <filterQueue>false</filterQueue>
93
- </hudson.model.AllView>
94
- </views>
95
- <primaryView>All</primaryView>
96
- <slaveAgentPort>0</slaveAgentPort>
97
- <label></label>
98
- <nodeProperties/>
99
- <globalNodeProperties/>
100
- <disabledAdministrativeMonitors>
101
- <string>OldData</string>
102
- </disabledAdministrativeMonitors>
103
- </hudson>
@@ -1,82 +0,0 @@
1
- <?xml version='1.0' encoding='UTF-8'?>
2
- <matrix-project>
3
- <actions/>
4
- <description/>
5
- <keepDependencies>false</keepDependencies>
6
- <properties/>
7
- <scm class="hudson.plugins.git.GitSCM">
8
- <configVersion>1</configVersion>
9
- <remoteRepositories>
10
- <org.spearce.jgit.transport.RemoteConfig>
11
- <string>origin</string>
12
- <int>5</int>
13
- <string>fetch</string>
14
- <string>+refs/heads/*:refs/remotes/origin/*</string>
15
- <string>receivepack</string>
16
- <string>git-upload-pack</string>
17
- <string>uploadpack</string>
18
- <string>git-upload-pack</string>
19
- <string>url</string>
20
- <string>git@codebasehq.com:mocra/dash/web-app.git</string>
21
- <string>tagopt</string>
22
- <string/>
23
- </org.spearce.jgit.transport.RemoteConfig>
24
- </remoteRepositories>
25
- <branches>
26
- <hudson.plugins.git.BranchSpec>
27
- <name>master</name>
28
- </hudson.plugins.git.BranchSpec>
29
- </branches>
30
- <mergeOptions/>
31
- <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
32
- <clean>false</clean>
33
- <choosingStrategy>Default</choosingStrategy>
34
- <submoduleCfg class="list"/>
35
- </scm>
36
- <canRoam>true</canRoam>
37
- <disabled>false</disabled>
38
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
39
- <concurrentBuild>false</concurrentBuild>
40
- <axes>
41
- </axes>
42
- <builders>
43
- <hudson.tasks.Shell>
44
- <command>echo &quot;Running steps...&quot;</command>
45
- </hudson.tasks.Shell>
46
- <hudson.plugins.ruby.Ruby>
47
- <command>unless File.exist?(&quot;config/database.yml&quot;)
48
- require &apos;fileutils&apos;
49
- example = Dir[&quot;config/database*&quot;].first
50
- puts &quot;Using #{example} for config/database.yml&quot;
51
- FileUtils.cp example, &quot;config/database.yml&quot;
52
- end</command>
53
- </hudson.plugins.ruby.Ruby>
54
- <hudson.plugins.rake.Rake>
55
- <rakeInstallation>(Default)</rakeInstallation>
56
- <rakeFile/>
57
- <rakeLibDir/>
58
- <rakeWorkingDir/>
59
- <tasks>db:schema:load</tasks>
60
- <silent>false</silent>
61
- </hudson.plugins.rake.Rake>
62
- <hudson.plugins.rake.Rake>
63
- <rakeInstallation>(Default)</rakeInstallation>
64
- <rakeFile/>
65
- <rakeLibDir/>
66
- <rakeWorkingDir/>
67
- <tasks>features</tasks>
68
- <silent>false</silent>
69
- </hudson.plugins.rake.Rake>
70
- <hudson.plugins.rake.Rake>
71
- <rakeInstallation>(Default)</rakeInstallation>
72
- <rakeFile/>
73
- <rakeLibDir/>
74
- <rakeWorkingDir/>
75
- <tasks>spec</tasks>
76
- <silent>false</silent>
77
- </hudson.plugins.rake.Rake>
78
- </builders>
79
- <publishers/>
80
- <buildWrappers/>
81
- <runSequentially>false</runSequentially>
82
- </matrix-project>
@@ -1,84 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project>
3
- <actions/>
4
- <description/>
5
- <keepDependencies>false</keepDependencies>
6
- <properties/>
7
- <scm class="hudson.plugins.git.GitSCM">
8
- <configVersion>1</configVersion>
9
- <remoteRepositories>
10
- <org.spearce.jgit.transport.RemoteConfig>
11
- <string>origin</string>
12
- <int>5</int>
13
- <string>fetch</string>
14
- <string>+refs/heads/*:refs/remotes/origin/*</string>
15
- <string>receivepack</string>
16
- <string>git-upload-pack</string>
17
- <string>uploadpack</string>
18
- <string>git-upload-pack</string>
19
- <string>url</string>
20
- <string>git@codebasehq.com:mocra/misc/mocra-web.git</string>
21
- <string>tagopt</string>
22
- <string/>
23
- </org.spearce.jgit.transport.RemoteConfig>
24
- </remoteRepositories>
25
- <branches>
26
- <hudson.plugins.git.BranchSpec>
27
- <name>master</name>
28
- </hudson.plugins.git.BranchSpec>
29
- </branches>
30
- <mergeOptions/>
31
- <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
32
- <clean>false</clean>
33
- <choosingStrategy>Default</choosingStrategy>
34
- <submoduleCfg class="list"/>
35
- </scm>
36
- <canRoam>true</canRoam>
37
- <disabled>false</disabled>
38
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
39
- <triggers class="vector">
40
- <hudson.triggers.SCMTrigger>
41
- <spec># every minute
42
- * * * * *</spec>
43
- </hudson.triggers.SCMTrigger>
44
- </triggers>
45
- <concurrentBuild>false</concurrentBuild>
46
- <builders>
47
- <hudson.plugins.ruby.Ruby>
48
- <command>
49
- unless File.exist?(&quot;config/database.yml&quot;)
50
- require &apos;fileutils&apos;
51
- example = Dir[&quot;config/database*&quot;].first
52
- puts &quot;Using #{example} for config/database.yml&quot;
53
- FileUtils.cp example, &quot;config/database.yml&quot;
54
- end
55
- </command>
56
- </hudson.plugins.ruby.Ruby>
57
- <hudson.plugins.rake.Rake>
58
- <rakeInstallation>(Default)</rakeInstallation>
59
- <rakeFile/>
60
- <rakeLibDir/>
61
- <rakeWorkingDir/>
62
- <tasks>db:schema:load</tasks>
63
- <silent>false</silent>
64
- </hudson.plugins.rake.Rake>
65
- <hudson.plugins.rake.Rake>
66
- <rakeInstallation>(Default)</rakeInstallation>
67
- <rakeFile/>
68
- <rakeLibDir/>
69
- <rakeWorkingDir/>
70
- <tasks>features</tasks>
71
- <silent>false</silent>
72
- </hudson.plugins.rake.Rake>
73
- <hudson.plugins.rake.Rake>
74
- <rakeInstallation>(Default)</rakeInstallation>
75
- <rakeFile/>
76
- <rakeLibDir/>
77
- <rakeWorkingDir/>
78
- <tasks>spec</tasks>
79
- <silent>false</silent>
80
- </hudson.plugins.rake.Rake>
81
- </builders>
82
- <publishers/>
83
- <buildWrappers/>
84
- </project>
@@ -1,80 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project>
3
- <actions/>
4
- <description/>
5
- <keepDependencies>false</keepDependencies>
6
- <properties/>
7
- <scm class="hudson.plugins.git.GitSCM">
8
- <configVersion>1</configVersion>
9
- <remoteRepositories>
10
- <org.spearce.jgit.transport.RemoteConfig>
11
- <string>origin</string>
12
- <int>5</int>
13
- <string>fetch</string>
14
- <string>+refs/heads/*:refs/remotes/origin/*</string>
15
- <string>receivepack</string>
16
- <string>git-upload-pack</string>
17
- <string>uploadpack</string>
18
- <string>git-upload-pack</string>
19
- <string>url</string>
20
- <string>git://codebasehq.com/mocra/misc/mocra-web.git</string>
21
- <string>tagopt</string>
22
- <string/>
23
- </org.spearce.jgit.transport.RemoteConfig>
24
- </remoteRepositories>
25
- <branches>
26
- <hudson.plugins.git.BranchSpec>
27
- <name>master</name>
28
- </hudson.plugins.git.BranchSpec>
29
- </branches>
30
- <localBranch/>
31
- <mergeOptions/>
32
- <recursiveSubmodules>false</recursiveSubmodules>
33
- <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
34
- <authorOrCommitter>false</authorOrCommitter>
35
- <clean>false</clean>
36
- <wipeOutWorkspace>false</wipeOutWorkspace>
37
- <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
38
- <gitTool>Default</gitTool>
39
- <submoduleCfg class="list"/>
40
- <relativeTargetDir/>
41
- <excludedRegions/>
42
- <excludedUsers/>
43
- </scm>
44
- <canRoam>true</canRoam>
45
- <disabled>false</disabled>
46
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
47
- <triggers class="vector"/>
48
- <concurrentBuild>false</concurrentBuild>
49
- <builders>
50
- <hudson.tasks.Shell>
51
- <command>bundle install</command>
52
- </hudson.tasks.Shell>
53
- <hudson.plugins.ruby.Ruby>
54
- <command>
55
- unless File.exist?(&quot;config/database.yml&quot;)
56
- require &apos;fileutils&apos;
57
- example = Dir[&quot;config/database*&quot;].first
58
- puts &quot;Using #{example} for config/database.yml&quot;
59
- FileUtils.cp example, &quot;config/database.yml&quot;
60
- end
61
- </command>
62
- </hudson.plugins.ruby.Ruby>
63
- <hudson.tasks.Shell>
64
- <command>bundle exec rake db:create:all</command>
65
- </hudson.tasks.Shell>
66
- <hudson.tasks.Shell>
67
- <command>if [ -f db/schema.rb ]; then
68
- bundle exec rake db:schema:load
69
- else
70
- bundle exec rake db:migrate
71
- fi
72
- </command>
73
- </hudson.tasks.Shell>
74
- <hudson.tasks.Shell>
75
- <command>bundle exec rake</command>
76
- </hudson.tasks.Shell>
77
- </builders>
78
- <publishers/>
79
- <buildWrappers/>
80
- </project>
@@ -1,84 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <matrix-project>
3
- <actions/>
4
- <description/>
5
- <keepDependencies>false</keepDependencies>
6
- <properties/>
7
- <scm class="hudson.plugins.git.GitSCM">
8
- <configVersion>1</configVersion>
9
- <remoteRepositories>
10
- <org.spearce.jgit.transport.RemoteConfig>
11
- <string>origin</string>
12
- <int>5</int>
13
- <string>fetch</string>
14
- <string>+refs/heads/*:refs/remotes/origin/*</string>
15
- <string>receivepack</string>
16
- <string>git-upload-pack</string>
17
- <string>uploadpack</string>
18
- <string>git-upload-pack</string>
19
- <string>url</string>
20
- <string>http://github.com/drnic/picasa_plucker.git</string>
21
- <string>tagopt</string>
22
- <string/>
23
- </org.spearce.jgit.transport.RemoteConfig>
24
- </remoteRepositories>
25
- <branches>
26
- <hudson.plugins.git.BranchSpec>
27
- <name>master</name>
28
- </hudson.plugins.git.BranchSpec>
29
- </branches>
30
- <localBranch/>
31
- <mergeOptions/>
32
- <recursiveSubmodules>false</recursiveSubmodules>
33
- <doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
34
- <authorOrCommitter>false</authorOrCommitter>
35
- <clean>false</clean>
36
- <wipeOutWorkspace>false</wipeOutWorkspace>
37
- <buildChooser class="hudson.plugins.git.util.DefaultBuildChooser"/>
38
- <gitTool>Default</gitTool>
39
- <submoduleCfg class="list"/>
40
- <relativeTargetDir/>
41
- <excludedRegions/>
42
- <excludedUsers/>
43
- </scm>
44
- <canRoam>true</canRoam>
45
- <disabled>false</disabled>
46
- <blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
47
- <triggers class="vector"/>
48
- <concurrentBuild>false</concurrentBuild>
49
- <axes>
50
- <hudson.matrix.TextAxis>
51
- <name>RUBY_VERSION</name>
52
- <values>
53
- <string>1.8.7</string>
54
- <string>1.9.2</string>
55
- <string>rbx-head</string>
56
- <string>jruby</string>
57
- </values>
58
- </hudson.matrix.TextAxis>
59
- <hudson.matrix.LabelAxis>
60
- <name>label</name>
61
- <values>
62
- <string>1.8.7</string>
63
- <string>ubuntu</string>
64
- </values>
65
- </hudson.matrix.LabelAxis>
66
- </axes>
67
- <builders>
68
- <hudson.tasks.Shell>
69
- <command>rvm $RUBY_VERSION</command>
70
- </hudson.tasks.Shell>
71
- <hudson.tasks.Shell>
72
- <command>rvm gemset create ruby-$RUBY_VERSION &amp;&amp; rvm gemset use ruby-$RUBY_VERSION</command>
73
- </hudson.tasks.Shell>
74
- <hudson.tasks.Shell>
75
- <command>bundle install</command>
76
- </hudson.tasks.Shell>
77
- <hudson.tasks.Shell>
78
- <command>bundle exec rake</command>
79
- </hudson.tasks.Shell>
80
- </builders>
81
- <publishers/>
82
- <buildWrappers/>
83
- <runSequentially>false</runSequentially>
84
- </matrix-project>