autodeploy 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +21 -9
- data/autodeploy.gemspec +5 -5
- data/bin/autodeploy +19 -1
- data/lib/autodeploy.rb +2 -2
- data/lib/autodeploy/version.rb +1 -1
- metadata +7 -7
- data/bin/autodeploy_daemon +0 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46751e33ef5ccb5333b1ab00092f52995bef8ce4
|
4
|
+
data.tar.gz: 1736806359124af7e527e285bcab54debe988659
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4f29c848c3f485032978d13f5207e5bfcac0da1a76bd898324adc52ca5b6a1cf1b337bf956e7e2bd97390f85994d9538c48724183a1ef6604bf5b33559a312a
|
7
|
+
data.tar.gz: 05e059b3c6be8f10ceab82bcf1b675f60b28c38e6ed6b39fe3a5b89cbbc9bed569beed68fa378230ec1d21db4a34254d3e6bacae13aaf322e758fe18256dc20b
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,24 +1,36 @@
|
|
1
1
|
# Autodeploy
|
2
2
|
|
3
|
-
|
3
|
+
A simple daemon that will download assets from Jenkins
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
Install the daemon locally via gem:
|
8
8
|
|
9
|
-
gem
|
9
|
+
gem install autodeploy
|
10
|
+
|
11
|
+
Create a `config.yml`
|
10
12
|
|
11
|
-
|
13
|
+
## Usage
|
12
14
|
|
13
|
-
|
15
|
+
Run directly with:
|
14
16
|
|
15
|
-
|
17
|
+
autodeploy
|
18
|
+
|
19
|
+
Run as a daemon with:
|
16
20
|
|
17
|
-
|
21
|
+
autodeploy -d
|
22
|
+
|
23
|
+
## Config
|
18
24
|
|
19
|
-
|
25
|
+
You'll need to specify a config file in YAML.
|
20
26
|
|
21
|
-
|
27
|
+
```yaml
|
28
|
+
server_url: https://yourserver.com
|
29
|
+
username: some_username
|
30
|
+
password: some_password
|
31
|
+
job: my-job-name
|
32
|
+
download_dir: downloads
|
33
|
+
```
|
22
34
|
|
23
35
|
## Contributing
|
24
36
|
|
data/autodeploy.gemspec
CHANGED
@@ -6,11 +6,11 @@ require 'autodeploy/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "autodeploy"
|
8
8
|
spec.version = Autodeploy::VERSION
|
9
|
-
spec.authors = ["Bob Breznak"]
|
10
|
-
spec.email = ["bob.
|
11
|
-
spec.description = %q{
|
12
|
-
spec.summary = %q{
|
13
|
-
spec.homepage = ""
|
9
|
+
spec.authors = ["Bob Breznak", "Merk Greene"]
|
10
|
+
spec.email = ["bob@evertrue.com", "mark@evertrue.com"]
|
11
|
+
spec.description = %q{A simple daemon that checks and downloads assets from Jenkins}
|
12
|
+
spec.summary = %q{A simple daemon that checks and downloads assets from Jenkins}
|
13
|
+
spec.homepage = "https://github.com/evertrue/autodeploy"
|
14
14
|
spec.license = "MIT"
|
15
15
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
data/bin/autodeploy
CHANGED
@@ -1,5 +1,23 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
+
require 'rubygems'
|
3
4
|
require 'autodeploy'
|
5
|
+
require 'dante'
|
4
6
|
|
5
|
-
|
7
|
+
runner = Dante::Runner.new('autodeploy')
|
8
|
+
runner.description = 'A simple daemon for checking and deploying assets from Jenkins'
|
9
|
+
|
10
|
+
runner.with_options do |opts|
|
11
|
+
opts.on('-c', '--config FILE', String, "Path to the config file. Default: config.yml") do |config|
|
12
|
+
options[:config] = config
|
13
|
+
end
|
14
|
+
|
15
|
+
opts.on('-s', '--sleep SECONDS', Integer, "Number of seconds between checks. Default: 10") do |sleep|
|
16
|
+
options[:sleep] = sleep
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
runner.execute do |opts|
|
21
|
+
puts opts
|
22
|
+
Autodeploy::Job.new(opts[:config] || 'config.yml').daemonize(opts[:sleep] || 10)
|
23
|
+
end
|
data/lib/autodeploy.rb
CHANGED
@@ -12,8 +12,8 @@ module Autodeploy
|
|
12
12
|
puts "[#{DateTime.now.strftime}] #{message}"
|
13
13
|
end
|
14
14
|
|
15
|
-
def initialize
|
16
|
-
@config = YAML.load_file(
|
15
|
+
def initialize(configfile)
|
16
|
+
@config = YAML.load_file(configfile)
|
17
17
|
@client = JenkinsApi::Client.new(@config)
|
18
18
|
|
19
19
|
unless Dir.exist? @config['download_dir']
|
data/lib/autodeploy/version.rb
CHANGED
metadata
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: autodeploy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Breznak
|
8
|
+
- Merk Greene
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
@@ -66,12 +67,12 @@ dependencies:
|
|
66
67
|
- - '>='
|
67
68
|
- !ruby/object:Gem::Version
|
68
69
|
version: '0'
|
69
|
-
description:
|
70
|
+
description: A simple daemon that checks and downloads assets from Jenkins
|
70
71
|
email:
|
71
|
-
- bob
|
72
|
+
- bob@evertrue.com
|
73
|
+
- mark@evertrue.com
|
72
74
|
executables:
|
73
75
|
- autodeploy
|
74
|
-
- autodeploy_daemon
|
75
76
|
extensions: []
|
76
77
|
extra_rdoc_files: []
|
77
78
|
files:
|
@@ -82,10 +83,9 @@ files:
|
|
82
83
|
- Rakefile
|
83
84
|
- autodeploy.gemspec
|
84
85
|
- bin/autodeploy
|
85
|
-
- bin/autodeploy_daemon
|
86
86
|
- lib/autodeploy.rb
|
87
87
|
- lib/autodeploy/version.rb
|
88
|
-
homepage:
|
88
|
+
homepage: https://github.com/evertrue/autodeploy
|
89
89
|
licenses:
|
90
90
|
- MIT
|
91
91
|
metadata: {}
|
@@ -108,6 +108,6 @@ rubyforge_project:
|
|
108
108
|
rubygems_version: 2.0.0
|
109
109
|
signing_key:
|
110
110
|
specification_version: 4
|
111
|
-
summary:
|
111
|
+
summary: A simple daemon that checks and downloads assets from Jenkins
|
112
112
|
test_files: []
|
113
113
|
has_rdoc:
|