winci 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/examples/basic.rb +18 -18
- data/examples/extended.rb +23 -23
- data/lib/winci/job.rb +2 -2
- data/lib/winci/version.rb +1 -1
- data/winci.gemspec +23 -23
- metadata +5 -6
- data/lib/winci/tasks.rb +0 -10
data/examples/basic.rb
CHANGED
@@ -1,19 +1,19 @@
|
|
1
|
-
require 'jenkins'
|
2
|
-
require 'winci'
|
3
|
-
|
4
|
-
project_name = 'files'
|
5
|
-
|
6
|
-
cfg = Jenkins::JobConfigBuilder.new(:ruby) do |c|
|
7
|
-
c.scm = "C:/repos/#{project_name}.git"
|
8
|
-
c.steps = [
|
9
|
-
# below makes sense when your Rakefile run rspec/cucumber by default
|
10
|
-
[:build_bat_step, "bundle exec rake"],
|
11
|
-
# this will send current code to production repo only after rspec/cucumber passed
|
12
|
-
[:build_bat_step, "git push c:/repos/production/files.git HEAD:master"]
|
13
|
-
]
|
14
|
-
end
|
15
|
-
|
16
|
-
job = WinCI::Job.new project_name, cfg
|
17
|
-
|
18
|
-
# by default creates job on localhost:3010
|
1
|
+
require 'jenkins'
|
2
|
+
require 'winci'
|
3
|
+
|
4
|
+
project_name = 'files'
|
5
|
+
|
6
|
+
cfg = Jenkins::JobConfigBuilder.new(:ruby) do |c|
|
7
|
+
c.scm = "C:/repos/#{project_name}.git"
|
8
|
+
c.steps = [
|
9
|
+
# below makes sense when your Rakefile run rspec/cucumber by default
|
10
|
+
[:build_bat_step, "bundle exec rake"],
|
11
|
+
# this will send current code to production repo only after rspec/cucumber passed
|
12
|
+
[:build_bat_step, "git push c:/repos/production/files.git HEAD:master"]
|
13
|
+
]
|
14
|
+
end
|
15
|
+
|
16
|
+
job = WinCI::Job.new project_name, cfg
|
17
|
+
|
18
|
+
# by default creates job on localhost:3010
|
19
19
|
job.create
|
data/examples/extended.rb
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
require 'jenkins'
|
2
|
-
require 'winci'
|
3
|
-
|
4
|
-
project_name = 'files'
|
5
|
-
|
6
|
-
cfg = Jenkins::JobConfigBuilder.new(:ruby) do |c|
|
7
|
-
c.scm = "C:/repos/#{project_name}.git"
|
8
|
-
c.steps = [
|
9
|
-
# in this way we can ensure that the PATH is the same as in production environment
|
10
|
-
[:build_shell_step, "export PATH=C:/Ruby/bin;\r\n" + "echo PATH is now : $PATH"],
|
11
|
-
# then we can run some installation script
|
12
|
-
[:build_bat_step, "ruby install.rb"],
|
13
|
-
# see basic.rb
|
14
|
-
[:build_bat_step, "bundle exec rake"],
|
15
|
-
# some adjustments to git before pushing
|
16
|
-
[:build_bat_step, "git config core.hidedotfiles false"],
|
17
|
-
# see basic.rb
|
18
|
-
[:build_bat_step, "git push c:/repos/production/files.git HEAD:master"]
|
19
|
-
]
|
20
|
-
end
|
21
|
-
|
22
|
-
job = WinCI::Job.new project_name, cfg
|
23
|
-
|
1
|
+
require 'jenkins'
|
2
|
+
require 'winci'
|
3
|
+
|
4
|
+
project_name = 'files'
|
5
|
+
|
6
|
+
cfg = Jenkins::JobConfigBuilder.new(:ruby) do |c|
|
7
|
+
c.scm = "C:/repos/#{project_name}.git"
|
8
|
+
c.steps = [
|
9
|
+
# in this way we can ensure that the PATH is the same as in production environment
|
10
|
+
[:build_shell_step, "export PATH=C:/Ruby/bin;\r\n" + "echo PATH is now : $PATH"],
|
11
|
+
# then we can run some installation script
|
12
|
+
[:build_bat_step, "ruby install.rb"],
|
13
|
+
# see basic.rb
|
14
|
+
[:build_bat_step, "bundle exec rake"],
|
15
|
+
# some adjustments to git before pushing
|
16
|
+
[:build_bat_step, "git config core.hidedotfiles false"],
|
17
|
+
# see basic.rb
|
18
|
+
[:build_bat_step, "git push c:/repos/production/files.git HEAD:master"]
|
19
|
+
]
|
20
|
+
end
|
21
|
+
|
22
|
+
job = WinCI::Job.new project_name, cfg
|
23
|
+
|
24
24
|
job.create '192.168.1.10', '3010'
|
data/lib/winci/job.rb
CHANGED
@@ -27,9 +27,9 @@ module WinCI
|
|
27
27
|
Jenkins::Api.setup_base_url(:host => server, :port => port)
|
28
28
|
|
29
29
|
if Jenkins::Api.create_job(name=@project_name, @config, options = {:override => true}) == true
|
30
|
-
|
30
|
+
return "#{@project_name} project created on jenkins"
|
31
31
|
else
|
32
|
-
|
32
|
+
raise "#{@project_name} project not created, something gone wrong or it already exist"
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
data/lib/winci/version.rb
CHANGED
data/winci.gemspec
CHANGED
@@ -1,23 +1,23 @@
|
|
1
|
-
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path("../lib", __FILE__)
|
3
|
-
require "winci/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |s|
|
6
|
-
s.name = "winci"
|
7
|
-
s.version = WinCI::VERSION
|
8
|
-
s.platform = Gem::Platform::RUBY
|
9
|
-
s.authors = ["Kamil Sobieraj"]
|
10
|
-
s.email = ["ksob@rubyforge.org"]
|
11
|
-
s.homepage = ""
|
12
|
-
s.summary = %q{Simplifies continuous integration under Windows}
|
13
|
-
s.description = %q{Implements full continuous deployment pipeline the Agile way with Jenkins/Hudson continuous integration server under Windows.}
|
14
|
-
|
15
|
-
s.rubyforge_project = "winci"
|
16
|
-
|
17
|
-
s.files = `git ls-files`.split("\n")
|
18
|
-
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
-
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
-
s.require_paths = ["lib"]
|
21
|
-
|
22
|
-
s.add_dependency('jenkins', '
|
23
|
-
end
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "winci/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "winci"
|
7
|
+
s.version = WinCI::VERSION
|
8
|
+
s.platform = Gem::Platform::RUBY
|
9
|
+
s.authors = ["Kamil Sobieraj"]
|
10
|
+
s.email = ["ksob@rubyforge.org"]
|
11
|
+
s.homepage = ""
|
12
|
+
s.summary = %q{Simplifies continuous integration under Windows}
|
13
|
+
s.description = %q{Implements full continuous deployment pipeline the Agile way with Jenkins/Hudson continuous integration server under Windows.}
|
14
|
+
|
15
|
+
s.rubyforge_project = "winci"
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
19
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
20
|
+
s.require_paths = ["lib"]
|
21
|
+
|
22
|
+
s.add_dependency('jenkins', '~> 0.6.2')
|
23
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: winci
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kamil Sobieraj
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-05-01 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ~>
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
hash: 3
|
30
30
|
segments:
|
@@ -56,7 +56,6 @@ files:
|
|
56
56
|
- lib/winci.rb
|
57
57
|
- lib/winci/jenkins_ext/job_config_builder.rb
|
58
58
|
- lib/winci/job.rb
|
59
|
-
- lib/winci/tasks.rb
|
60
59
|
- lib/winci/version.rb
|
61
60
|
- winci.gemspec
|
62
61
|
has_rdoc: true
|