akqa-jenkins 0.6.4.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (106) hide show
  1. data/.gitignore +8 -0
  2. data/Changelog.md +54 -0
  3. data/Gemfile +3 -0
  4. data/Gemfile.lock +56 -0
  5. data/README.md +159 -0
  6. data/Rakefile +82 -0
  7. data/bin/jenkins +11 -0
  8. data/cucumber.yml +8 -0
  9. data/features/build_details.feature +42 -0
  10. data/features/configure.feature +36 -0
  11. data/features/default_host.feature +26 -0
  12. data/features/development.feature +14 -0
  13. data/features/launch_server.feature +16 -0
  14. data/features/listing_jobs.feature +34 -0
  15. data/features/manage_jobs.feature +214 -0
  16. data/features/manage_slave_nodes.feature +82 -0
  17. data/features/step_definitions/common_steps.rb +192 -0
  18. data/features/step_definitions/fixture_project_steps.rb +8 -0
  19. data/features/step_definitions/jenkins_steps.rb +116 -0
  20. data/features/step_definitions/scm_steps.rb +12 -0
  21. data/features/support/common.rb +37 -0
  22. data/features/support/env.rb +19 -0
  23. data/features/support/hooks.rb +16 -0
  24. data/features/support/jenkins_helpers.rb +6 -0
  25. data/features/support/matchers.rb +10 -0
  26. data/fixtures/jenkins/envfile.hpi +0 -0
  27. data/fixtures/jenkins/git.hpi +0 -0
  28. data/fixtures/jenkins/github.hpi +0 -0
  29. data/fixtures/jenkins/greenballs.hpi +0 -0
  30. data/fixtures/jenkins/rake.hpi +0 -0
  31. data/fixtures/jenkins/ruby.hpi +0 -0
  32. data/fixtures/projects/erlang/rebar.config +1 -0
  33. data/fixtures/projects/non-bundler/Rakefile +4 -0
  34. data/fixtures/projects/rails-3/.gitignore +4 -0
  35. data/fixtures/projects/rails-3/Gemfile +30 -0
  36. data/fixtures/projects/rails-3/Gemfile.lock +74 -0
  37. data/fixtures/projects/rails-3/README +256 -0
  38. data/fixtures/projects/rails-3/Rakefile +7 -0
  39. data/fixtures/projects/rails-3/app/controllers/application_controller.rb +3 -0
  40. data/fixtures/projects/rails-3/app/helpers/application_helper.rb +2 -0
  41. data/fixtures/projects/rails-3/app/views/layouts/application.html.erb +14 -0
  42. data/fixtures/projects/rails-3/config.ru +4 -0
  43. data/fixtures/projects/rails-3/config/application.rb +42 -0
  44. data/fixtures/projects/rails-3/config/boot.rb +13 -0
  45. data/fixtures/projects/rails-3/config/database.yml +22 -0
  46. data/fixtures/projects/rails-3/config/environment.rb +5 -0
  47. data/fixtures/projects/rails-3/config/environments/development.rb +26 -0
  48. data/fixtures/projects/rails-3/config/environments/production.rb +49 -0
  49. data/fixtures/projects/rails-3/config/environments/test.rb +35 -0
  50. data/fixtures/projects/rails-3/config/initializers/backtrace_silencers.rb +7 -0
  51. data/fixtures/projects/rails-3/config/initializers/inflections.rb +10 -0
  52. data/fixtures/projects/rails-3/config/initializers/mime_types.rb +5 -0
  53. data/fixtures/projects/rails-3/config/initializers/secret_token.rb +7 -0
  54. data/fixtures/projects/rails-3/config/initializers/session_store.rb +8 -0
  55. data/fixtures/projects/rails-3/config/locales/en.yml +5 -0
  56. data/fixtures/projects/rails-3/config/routes.rb +58 -0
  57. data/fixtures/projects/rails-3/db/seeds.rb +7 -0
  58. data/fixtures/projects/rails-3/doc/README_FOR_APP +2 -0
  59. data/fixtures/projects/rails-3/lib/tasks/.gitkeep +0 -0
  60. data/fixtures/projects/rails-3/public/404.html +26 -0
  61. data/fixtures/projects/rails-3/public/422.html +26 -0
  62. data/fixtures/projects/rails-3/public/500.html +26 -0
  63. data/fixtures/projects/rails-3/public/favicon.ico +0 -0
  64. data/fixtures/projects/rails-3/public/images/rails.png +0 -0
  65. data/fixtures/projects/rails-3/public/index.html +239 -0
  66. data/fixtures/projects/rails-3/public/javascripts/application.js +2 -0
  67. data/fixtures/projects/rails-3/public/javascripts/controls.js +965 -0
  68. data/fixtures/projects/rails-3/public/javascripts/dragdrop.js +974 -0
  69. data/fixtures/projects/rails-3/public/javascripts/effects.js +1123 -0
  70. data/fixtures/projects/rails-3/public/javascripts/prototype.js +6001 -0
  71. data/fixtures/projects/rails-3/public/javascripts/rails.js +175 -0
  72. data/fixtures/projects/rails-3/public/robots.txt +5 -0
  73. data/fixtures/projects/rails-3/public/stylesheets/.gitkeep +0 -0
  74. data/fixtures/projects/rails-3/script/rails +6 -0
  75. data/fixtures/projects/rails-3/test/performance/browsing_test.rb +9 -0
  76. data/fixtures/projects/rails-3/test/test_helper.rb +13 -0
  77. data/fixtures/projects/rails-3/vendor/plugins/.gitkeep +0 -0
  78. data/fixtures/projects/ruby/Gemfile +3 -0
  79. data/fixtures/projects/ruby/Gemfile.lock +10 -0
  80. data/fixtures/projects/ruby/Rakefile +4 -0
  81. data/jenkins.gemspec +33 -0
  82. data/lib/jenkins.rb +6 -0
  83. data/lib/jenkins/api.rb +250 -0
  84. data/lib/jenkins/cli.rb +291 -0
  85. data/lib/jenkins/cli/formatting.rb +53 -0
  86. data/lib/jenkins/config.rb +27 -0
  87. data/lib/jenkins/core_ext/hash.rb +9 -0
  88. data/lib/jenkins/core_ext/object/blank.rb +77 -0
  89. data/lib/jenkins/hudson-cli.jar +0 -0
  90. data/lib/jenkins/job_config_builder.rb +292 -0
  91. data/lib/jenkins/project_scm.rb +22 -0
  92. data/lib/jenkins/remote.rb +11 -0
  93. data/lib/jenkins/version.rb +3 -0
  94. data/spec/fixtures/ec2_global.config.xml +103 -0
  95. data/spec/fixtures/erlang.single.config.xml +59 -0
  96. data/spec/fixtures/rails.multi.config.xml +82 -0
  97. data/spec/fixtures/rails.single.config.triggers.xml +84 -0
  98. data/spec/fixtures/rails.single.config.xml +80 -0
  99. data/spec/fixtures/ruby.multi-ruby-multi-labels.config.xml +84 -0
  100. data/spec/fixtures/ruby.multi.config.xml +77 -0
  101. data/spec/fixtures/ruby.single.config.xml +58 -0
  102. data/spec/fixtures/therubyracer.config.xml +77 -0
  103. data/spec/hash_key_cleaner_spec.rb +25 -0
  104. data/spec/job_config_builder_spec.rb +150 -0
  105. data/spec/spec_helper.rb +15 -0
  106. metadata +283 -0
@@ -0,0 +1,8 @@
1
+ hudson-*.gem
2
+ tmp
3
+ var
4
+ *.rbc
5
+ .bundle
6
+ pkg/
7
+ *.swp
8
+ .rvmrc
@@ -0,0 +1,54 @@
1
+ # Changelog
2
+
3
+ ## 0.6.4 - 2011/04/13
4
+
5
+ * change from json to json_pure
6
+
7
+ ## 0.6.3 - 2011/04/12
8
+
9
+ * fixes for ruby 1.9
10
+
11
+ ## 0.6.2 - 2011/03/17
12
+
13
+ * add `build_details` command for fetching the result of a particular build.
14
+ * add instructions for running with non-english locale
15
+ * remove, fix obsolete gem dependencies
16
+
17
+ ## 0.5.0 - 2010/12/1
18
+
19
+ * hudson warfile no longer bundled with hudson gem
20
+ * rubygem is now 235K instead of 31M!
21
+ * upgrade hudson server and related plugins without requiring a new gem release
22
+ * hudson gem now fully drinks the bundler koolaid.
23
+ * hudson create
24
+ * --node-labels 'ubuntu,gentoo' - run tests against multiple slave nodes by their label
25
+ * --no-template - do not generate any default steps (well, a silly one)
26
+ * hudson add_node
27
+ * --vagrant - provide alternate default values when adding nodes if the node is a Vagrant VM
28
+ * hudson default_host
29
+ * NEW - displays the current default host:port URI
30
+
31
+ ## 0.4.0 - 2010/11/11
32
+
33
+ * hudson create
34
+ * --rubies '1.8.7,1.9.2,rbx-head,jruby' - uses RVM and Hudson's Axes support to run tests within different Ruby environments
35
+ * --scm git://some-alternate.com/repo.git - can override the "origin" URI
36
+ * --scm-branches 'master,other,branches' - specify which branches can be pulled from to trigger tests
37
+
38
+ * hudson job
39
+ * Can dump information/status about a job
40
+
41
+ ## 0.3.1 - 2010/11/8
42
+
43
+ * fixed error in the rails3 template's test for schema.rb
44
+
45
+ ## 0.3.0 - 2010/11/8
46
+
47
+ MAJOR RELEASE!
48
+
49
+ * All new commands for CLI: build, remove, nodes, add_node
50
+ * Updated to Hudson CI 1.381
51
+
52
+ ## 0.2.7 2010/8/25
53
+
54
+ * Updated to Hudson CI 1.373
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gemspec
@@ -0,0 +1,56 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ jenkins (0.6.4)
5
+ builder (~> 2.1.2)
6
+ hpricot
7
+ httparty (~> 0.6.1)
8
+ json_pure (>= 1.5.1)
9
+ term-ansicolor (>= 1.0.4)
10
+ thor (~> 0.14.2)
11
+
12
+ GEM
13
+ remote: http://rubygems.org/
14
+ specs:
15
+ awesome_print (0.3.2)
16
+ builder (2.1.2)
17
+ crack (0.1.8)
18
+ cucumber (0.10.0)
19
+ builder (>= 2.1.2)
20
+ diff-lcs (~> 1.1.2)
21
+ gherkin (~> 2.3.2)
22
+ json (~> 1.4.6)
23
+ term-ansicolor (~> 1.0.5)
24
+ diff-lcs (1.1.2)
25
+ gherkin (2.3.4)
26
+ json (~> 1.4.6)
27
+ hpricot (0.8.4)
28
+ httparty (0.6.1)
29
+ crack (= 0.1.8)
30
+ jenkins-war (1.401)
31
+ json (1.4.6)
32
+ json_pure (1.5.1)
33
+ rake (0.8.7)
34
+ rspec (2.0.1)
35
+ rspec-core (~> 2.0.1)
36
+ rspec-expectations (~> 2.0.1)
37
+ rspec-mocks (~> 2.0.1)
38
+ rspec-core (2.0.1)
39
+ rspec-expectations (2.0.1)
40
+ diff-lcs (>= 1.1.2)
41
+ rspec-mocks (2.0.1)
42
+ rspec-core (~> 2.0.1)
43
+ rspec-expectations (~> 2.0.1)
44
+ term-ansicolor (1.0.5)
45
+ thor (0.14.6)
46
+
47
+ PLATFORMS
48
+ ruby
49
+
50
+ DEPENDENCIES
51
+ awesome_print
52
+ cucumber (~> 0.10.0)
53
+ jenkins!
54
+ jenkins-war (>= 1.396)
55
+ rake (~> 0.8.7)
56
+ rspec (~> 2.0.0)
@@ -0,0 +1,159 @@
1
+ Jenkins
2
+ ======
3
+
4
+ [Jenkins CI](http://jenkins-ci.org/) is a sweet continuous integration platform. Jenkins.rb makes it easy to get started, add/remove Ruby jobs and slave nodes; either from a CLI or an API.
5
+
6
+ * Email: [http://groups.google.com/group/jenkinsrb](http://groups.google.com/group/jenkinsrb)
7
+ * IRC: [irc://irc.freenode.net/jenkins.rb](irc://irc.freenode.net/jenkins.rb)
8
+ * CI: [http://jenkins.thefrontside.net/job/jenkins.rb/](http://jenkins.thefrontside.net/job/jenkins.rb/)
9
+
10
+ Install
11
+ =======
12
+
13
+ gem install jenkins
14
+
15
+ You do not need to download Jenkins CI. It is bundled in the RubyGem.
16
+
17
+ Example
18
+ =======
19
+
20
+ Jenkins.rb is continuously tested using Jenkins at [http://jenkins.thefrontside.net/job/jenkins.rb/](http://jenkins.thefrontside.net/job/jenkins.rb/).
21
+
22
+ The `jenkins` application allows you to see the projects/jobs and their statuses:
23
+
24
+ $ jenkins list --host jenkins.thefrontside.net --port 80
25
+ jenkins.rb - http://jenkins.thefrontside.net/job/jenkins.rb/
26
+ TheRubyRacer - http://jenkins.thefrontside.net/job/TheRubyRacer/
27
+
28
+ Alternately use environment variables:
29
+
30
+ $ JENKINS_HOST=jenkins.thefrontside.net JENKINS_PORT=80 jenkins list
31
+
32
+ Alternately, it will remember the last Jenkins CI master used.
33
+
34
+ $ jenkins list
35
+
36
+ Usage
37
+ =====
38
+
39
+ To run your own Jenkins server (by default opens at http://localhost:3001):
40
+
41
+ Usage: jenkins server [options]
42
+ -p, --port [3001] run jenkins server on this port
43
+ -c, --control [3002] set the shutdown/control port
44
+ --daemon fork into background and run as a daemon
45
+ --logfile [PATH] redirect log messages to this file
46
+ -k, --kill send shutdown signal to control port
47
+ --home [/Users/drnic/.jenkins/server] use this directory to store server data
48
+
49
+ The remaining CLI tasks are for communicating with a running Jenkins server; either the one created above or hosted remotely.
50
+
51
+ ### Jobs
52
+
53
+ To list Jobs/Projects on a Jenkins server:
54
+
55
+ Usage: jenkins list [options]
56
+
57
+ To add Jobs/Projects (create a Job) on a Jenkins server:
58
+
59
+ Usage: jenkins create PROJECT_PATH [options]
60
+ --public-scm use public scm URL
61
+ --template [ruby] template of job steps (available: rails,rails3,ruby,rubygem,erlang)
62
+ --assigned-node [ASSIGNED-NODE] only use slave nodes with this label
63
+ --override override if job exists
64
+ --no-build create job without initial build
65
+
66
+ To trigger a Job to build:
67
+
68
+ Usage: jenkins build
69
+
70
+ To remove a Job from a Jenkins server:
71
+
72
+ Usage: jenkins remove PROJECT_PATH
73
+
74
+ ### Slave nodes
75
+
76
+ To list slaves on a Jenkins server (including itself):
77
+
78
+ Usage: jenkins nodes
79
+
80
+ To add a remote machine/remote VM to a Jenkins server as a slave:
81
+
82
+ Usage: jenkins add_node SLAVE_HOST
83
+ --slave-port [22] SSH port for Jenkins to connect to slave node
84
+ --label [LABEL] Labels for a job --assigned_node to match against to select a slave. --master-key [MASTER-KEY] Location of master public key or identity file
85
+ --slave-fs [SLAVE-FS] Location of file system on slave for Jenkins to use
86
+ --name [NAME] Name of slave node (default SLAVE_HOST)
87
+ --slave-user [deploy] SSH user for Jenkins to connect to slave node
88
+
89
+ ### Selecting a Jenkins CI server
90
+
91
+ **For all client-side commands, there are `--host` and `--port` options flags.** These are cached after first used, so are only required for the first request to a Jenkins CI server. For example:
92
+
93
+ jenkins create . --host localhost --port 3001
94
+ jenkins list
95
+ jenkins create . --override
96
+
97
+ Alternately, `$JENKINS_HOST` and `$JENKINS_PORT` can be provided in lieu of the cached target Jenkins CI server
98
+
99
+ JENKINS_HOST=localhost JENKINS_PORT=3001 jenkins list
100
+
101
+
102
+ Developer Instructions
103
+ ======================
104
+
105
+ The dependencies for the gem and for developing the gem are managed by Bundler.
106
+
107
+ gem install bundler
108
+ git clone http://github.com/cowboyd/jenkins.rb.git
109
+ bundle install
110
+
111
+ The test suites expects Jenkins to speak English. If you are not using an
112
+ English locale prepare the terminal session running the test suite with:
113
+
114
+ export LC_ALL=en_US.UTF-8
115
+
116
+ The test suite is run with:
117
+
118
+ rake
119
+
120
+ This launches a Jenkins server, runs cucumber features, and kills the Jenkins server.
121
+
122
+ Alternately, manually launch the Jenkins server, run features and close the Jenkins server:
123
+
124
+ rake jenkins:server:test
125
+ rake cucumber:ok
126
+ rake jenkins:server:killtest
127
+
128
+ Contributors
129
+ ============
130
+
131
+ * Charles Lowell
132
+ * Dr Nic Williams
133
+ * Bo Jeanes
134
+
135
+ License
136
+ =======
137
+
138
+ (The MIT License)
139
+
140
+ Copyright (c) 2010 Charles Lowell, cowboyd@thefrontside.net
141
+
142
+ Permission is hereby granted, free of charge, to any person obtaining
143
+ a copy of this software and associated documentation files (the
144
+ 'Software'), to deal in the Software without restriction, including
145
+ without limitation the rights to use, copy, modify, merge, publish,
146
+ distribute, sublicense, and/or sell copies of the Software, and to
147
+ permit persons to whom the Software is furnished to do so, subject to
148
+ the following conditions:
149
+
150
+ The above copyright notice and this permission notice shall be
151
+ included in all copies or substantial portions of the Software.
152
+
153
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
154
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
155
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
156
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
157
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
158
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
159
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,82 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
3
+
4
+ require "rspec/core/rake_task"
5
+ RSpec::Core::RakeTask.new(:spec)
6
+
7
+ namespace :cucumber do
8
+ require 'cucumber/rake/task'
9
+ Cucumber::Rake::Task.new(:wip, 'Run features that are being worked on') do |t|
10
+ t.cucumber_opts = "--tags @wip"
11
+ end
12
+ Cucumber::Rake::Task.new(:ok, 'Run features that should be working') do |t|
13
+ t.cucumber_opts = "--tags ~@wip"
14
+ end
15
+ task :all => [:ok, :wip]
16
+ end
17
+
18
+ desc 'Alias for cucumber:ok'
19
+ task :cucumber => 'cucumber:ok'
20
+
21
+ desc "Start test server; Run cucumber:ok; Kill Test Server;"
22
+ task :default => [:spec, "jenkins:server:killtest", "jenkins:server:test"] do
23
+ require 'socket'
24
+ require 'net/http'
25
+ print "waiting for at most 30 seconds for the server to start"
26
+ tries = 1
27
+ begin
28
+ print "."; $stdout.flush
29
+ tries += 1
30
+ Net::HTTP.start("localhost", "3010") { |http| http.get('/') }
31
+ sleep(10)
32
+ puts ""
33
+ result = Rake::Task["cucumber:ok"].invoke
34
+ rescue Exception => e
35
+ if tries <= 15
36
+ sleep 2
37
+ retry
38
+ end
39
+ raise
40
+ ensure
41
+ Rake::Task["jenkins:server:killtest"].tap do |task|
42
+ task.reenable
43
+ task.invoke
44
+ end
45
+ end
46
+ raise unless result
47
+ end
48
+
49
+ namespace :jenkins do
50
+ namespace :server do
51
+ require 'fileutils'
52
+
53
+ directory plugin_dir = File.expand_path("../var/jenkins/plugins", __FILE__)
54
+ desc "Run a server for tests"
55
+ task :test => plugin_dir do
56
+ port = 3010
57
+ control = 3011
58
+ FileUtils.chdir(File.dirname(__FILE__)) do
59
+ Dir["fixtures/jenkins/*.hpi"].each do |plugin|
60
+ FileUtils.cp plugin, plugin_dir
61
+ end
62
+ logfile = File.expand_path("../var/jenkins/test.log", __FILE__)
63
+ puts "Launching jenkins test server at http://localhost:#{port}..."
64
+ puts " output will be logged to #{logfile}"
65
+ `ruby bin/jenkins server --home #{File.dirname(plugin_dir)} --port #{port} --control #{control} --daemon --logfile #{logfile}`
66
+ end
67
+ end
68
+
69
+ desc "Kill jenkins test server if it is running."
70
+ task :killtest do
71
+ FileUtils.chdir(File.dirname(__FILE__)) do
72
+ puts "Killing any running server processes..."
73
+ `ruby bin/jenkins server --control 3011 --kill 2>/dev/null`
74
+ end
75
+ end
76
+
77
+ end
78
+ end
79
+
80
+ Dir['tasks/**/*.rake'].each {|f| load f}
81
+
82
+
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ require 'rubygems'
3
+ $:.unshift(File.expand_path(File.dirname(File.dirname(__FILE__) + "/../lib/jenkins.rb")))
4
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/jenkins')
5
+ require 'jenkins/cli'
6
+
7
+ begin
8
+ Jenkins::CLI.start
9
+ rescue Errno::ECONNREFUSED, Errno::EAFNOSUPPORT
10
+ Jenkins::CLI.new.shell.say "No connection available to the server.", :red
11
+ end
@@ -0,0 +1,8 @@
1
+ <%
2
+ rerun = File.file?('rerun.txt') ? IO.read('rerun.txt') : ""
3
+ rerun_opts = rerun.to_s.strip.empty? ? "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} features" : "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} #{rerun}"
4
+ std_opts = "--format #{ENV['CUCUMBER_FORMAT'] || 'pretty'} --strict --tags ~@wip"
5
+ %>
6
+ default: --drb <%= std_opts %> features
7
+ wip: --drb --tags @wip:3 --wip features
8
+ rerun: --drb <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip
@@ -0,0 +1,42 @@
1
+ Feature: Show build details
2
+ I want to see details about a particular build for a job I'm interested in
3
+
4
+ Scenario: Show build details for a job on a non-existent server (jenkins build_details)
5
+ When I run local executable "jenkins" with arguments "build_details ruby 1 --host localhost --port 9999"
6
+ Then I should see exactly
7
+ """
8
+ No connection available to the server.
9
+ """
10
+
11
+ Scenario: Show build details for a non-existent job (jenkins build_details)
12
+ Given I have a Jenkins server running
13
+ And the Jenkins server has no current jobs
14
+ When I run local executable "jenkins" with arguments "build_details ruby 1 --host localhost --port 3010"
15
+ Then I should see exactly
16
+ """
17
+ ERROR: Cannot find project 'ruby'.
18
+ """
19
+
20
+ Scenario: Show build details for a job (jenkins build_details)
21
+ Given I have a Jenkins server running
22
+ And the Jenkins server has no current jobs
23
+ And I am in the "ruby" project folder
24
+ And the project uses "git" scm
25
+ When I run local executable "jenkins" with arguments "create . --host localhost --port 3010"
26
+ When I run local executable "jenkins" with arguments "build"
27
+ When I wait for ruby build 1 to start
28
+ When I run local executable "jenkins" with arguments "build_details ruby 1 --host localhost --port 3010 --json"
29
+ Then I should see
30
+ """
31
+ "builtOn":"","result":"FAILURE","number":1,"keepLog":false,
32
+ """
33
+ And I should see
34
+ """
35
+ "actions":[{"causes":[{"userName":"anonymous","shortDescription":"Started by user anonymous"},{"userName":"anonymous","shortDescription":"Started by user anonymous"}]}],
36
+ """
37
+ And I should see
38
+ """
39
+ "description":null,"changeSet":{"kind":null,"items":[]},"fullDisplayName":"ruby #1"
40
+ """
41
+
42
+
@@ -0,0 +1,36 @@
1
+ Feature: Configure host connection information
2
+
3
+ Scenario: Configure host connection information and check default host and reconfigure
4
+ Given I run local executable "jenkins" with arguments "configure --host localhost --port 3010"
5
+ When I run local executable "jenkins" with arguments "default_host"
6
+ Then I should see exactly
7
+ """
8
+ http://localhost:3010
9
+ """
10
+ Given I run local executable "jenkins" with arguments "configure --host localhost --port 3010 --ssl"
11
+ When I run local executable "jenkins" with arguments "default_host"
12
+ Then I should see exactly
13
+ """
14
+ https://localhost:3010
15
+ """
16
+
17
+ Scenario: Configure host connection authentication information and check auth_info and reconfigure
18
+ Given I run local executable "jenkins" with arguments "auth_info"
19
+ Then I should see exactly
20
+ """
21
+ """
22
+ When I run local executable "jenkins" with arguments "configure --username jenkins --password sniknej"
23
+ And I run local executable "jenkins" with arguments "auth_info"
24
+ Then I should see exactly
25
+ """
26
+ username: jenkins
27
+ password: sniknej
28
+ """
29
+ When I run local executable "jenkins" with arguments "configure --username jenkins1 --password 1sniknej"
30
+ And I run local executable "jenkins" with arguments "auth_info"
31
+ Then I should see exactly
32
+ """
33
+ username: jenkins1
34
+ password: 1sniknej
35
+ """
36
+