rake_fly 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rake_fly/tasks/get_pipeline.rb +1 -0
- data/lib/rake_fly/tasks/push_pipeline.rb +59 -0
- data/lib/rake_fly/tasks/set_pipeline.rb +38 -0
- data/lib/rake_fly/tasks/unpause_pipeline.rb +1 -0
- data/lib/rake_fly/tasks.rb +2 -0
- data/lib/rake_fly/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 50d19f1df4abffc31c165d08aa7a1b65ae83734c
|
4
|
+
data.tar.gz: 3a007d3575bf31831efc4670ebf6683b11d07f15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7edee1d1a35281b4dcc2a9fec3fa0c9da2fa8a7166aba01579a5c9e0b24a0d03f9b6be037d4f6c71b06aa66608bd851f90f311a75be791eae05ec01c5b485814
|
7
|
+
data.tar.gz: d37d2693233ce952939f14f3ae5f14e21b361e538b007b8c5a5e17799be9031120d1e00ee8cc9f2d4f6298d92b989b5566539391a876356788d48ecf554d5e70
|
data/Gemfile.lock
CHANGED
@@ -0,0 +1,59 @@
|
|
1
|
+
|
2
|
+
require 'ruby_fly'
|
3
|
+
require_relative '../tasklib'
|
4
|
+
|
5
|
+
module RakeFly
|
6
|
+
module Tasks
|
7
|
+
class PushPipeline < TaskLib
|
8
|
+
parameter :name, :default => :push_pipeline
|
9
|
+
|
10
|
+
parameter :target, :required => true
|
11
|
+
parameter :pipeline, :required => true
|
12
|
+
parameter :config, :required => true
|
13
|
+
|
14
|
+
parameter :vars
|
15
|
+
parameter :var_files
|
16
|
+
parameter :non_interactive
|
17
|
+
|
18
|
+
parameter :get_pipeline_task_name, :default => :get_pipeline
|
19
|
+
parameter :set_pipeline_task_name, :default => :set_pipeline
|
20
|
+
parameter :unpause_pipeline_task_name, :default => :unpause_pipeline
|
21
|
+
|
22
|
+
def process_arguments(args)
|
23
|
+
self.name = args[0] if args[0]
|
24
|
+
end
|
25
|
+
|
26
|
+
def define
|
27
|
+
GetPipeline.new(get_pipeline_task_name) do |t|
|
28
|
+
t.target = target
|
29
|
+
t.pipeline = pipeline
|
30
|
+
end
|
31
|
+
SetPipeline.new(set_pipeline_task_name) do |t|
|
32
|
+
t.target = target
|
33
|
+
t.pipeline = pipeline
|
34
|
+
t.config = config
|
35
|
+
t.vars = vars
|
36
|
+
t.var_files = var_files
|
37
|
+
t.non_interactive = non_interactive
|
38
|
+
end
|
39
|
+
UnpausePipeline.new(unpause_pipeline_task_name) do |t|
|
40
|
+
t.target = target
|
41
|
+
t.pipeline = pipeline
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "Push pipeline #{pipeline} to target #{target}"
|
45
|
+
task name => [
|
46
|
+
scoped_task_name(set_pipeline_task_name),
|
47
|
+
scoped_task_name(get_pipeline_task_name),
|
48
|
+
scoped_task_name(unpause_pipeline_task_name)
|
49
|
+
]
|
50
|
+
end
|
51
|
+
|
52
|
+
private
|
53
|
+
|
54
|
+
def scoped_task_name(task_name)
|
55
|
+
Rake.application.current_scope.path_with_task_name(task_name)
|
56
|
+
end
|
57
|
+
end
|
58
|
+
end
|
59
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'ruby_fly'
|
2
|
+
require_relative '../tasklib'
|
3
|
+
|
4
|
+
module RakeFly
|
5
|
+
module Tasks
|
6
|
+
class SetPipeline < TaskLib
|
7
|
+
parameter :name, :default => :set_pipeline
|
8
|
+
|
9
|
+
parameter :target, :required => true
|
10
|
+
parameter :pipeline, :required => true
|
11
|
+
parameter :config, :required => true
|
12
|
+
|
13
|
+
parameter :vars
|
14
|
+
parameter :var_files
|
15
|
+
parameter :non_interactive
|
16
|
+
|
17
|
+
parameter :ensure_task, :default => :'fly:ensure'
|
18
|
+
|
19
|
+
def process_arguments(args)
|
20
|
+
self.name = args[0] if args[0]
|
21
|
+
end
|
22
|
+
|
23
|
+
def define
|
24
|
+
desc "Set pipeline #{pipeline} for target #{target}"
|
25
|
+
task name => [ensure_task] do
|
26
|
+
puts "Setting pipeline #{pipeline} for target #{target}..."
|
27
|
+
RubyFly.set_pipeline(
|
28
|
+
target: target,
|
29
|
+
pipeline: pipeline,
|
30
|
+
config: config,
|
31
|
+
vars: vars,
|
32
|
+
var_files: var_files,
|
33
|
+
non_interactive: non_interactive)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
data/lib/rake_fly/tasks.rb
CHANGED
data/lib/rake_fly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rake_fly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toby Clemson
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake_dependencies
|
@@ -160,6 +160,8 @@ files:
|
|
160
160
|
- lib/rake_fly/tasklib.rb
|
161
161
|
- lib/rake_fly/tasks.rb
|
162
162
|
- lib/rake_fly/tasks/get_pipeline.rb
|
163
|
+
- lib/rake_fly/tasks/push_pipeline.rb
|
164
|
+
- lib/rake_fly/tasks/set_pipeline.rb
|
163
165
|
- lib/rake_fly/tasks/unpause_pipeline.rb
|
164
166
|
- lib/rake_fly/version.rb
|
165
167
|
- rake_fly.gemspec
|