singularity_dsl 1.3.2 → 1.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +1 -1
- data/README.md +4 -0
- data/lib/singularity_dsl/cli/cli.rb +12 -10
- data/lib/singularity_dsl/git_helper.rb +9 -0
- data/lib/singularity_dsl/version.rb +1 -1
- data/spec/singularity_dsl/cli/cli_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjY4YmE3ODM5YjkyZDEyYzJhMTE5MWVkNDEyODg2ZGU1NmFmZmU4NQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
M2RkYzJjNGI1NTcwMzQzZjc5MTQ0NDVkNDlmYTcxMGUwYmJiYzJkMA==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ODdkNTQzYzAwMDk5N2QzYWE3Y2NmMTdkM2VjZGQ5MWNhZmE2ZmRlNjc0MmJh
|
10
|
+
NTY4NTBhMzBmMzY0ZjI4MDM2M2RmMDY1MWE2ZDI3ZTNmNzQ2ZjljYzEzNWVj
|
11
|
+
ODc1NWIxNzJlOTgzNzhiMTdhOGE5OWRkZmM3YmNmZDA2NDQ1OTg=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NDA1MzI4ZDVlZGVhYzJlZjBlYjkwYTM0Y2VlZTNlZjUxYWY2MDkxZDY4MmM1
|
14
|
+
ZmI5MjJjY2Q2ZDBhZjFlODY4YTQ1M2EzZWE4NzFjNzhlODkzOTYzY2IwZTZh
|
15
|
+
ZDBlMjE5ZWJiZDRjMzYzNTY2Zjg5NTJjNmE4ZjQ5ZTRmMTQ1ZjE=
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
# SingularityDsl
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/singularity_dsl.svg)](http://badge.fury.io/rb/singularity_dsl)
|
4
|
+
[![Dependency Status](https://gemnasium.com/behance/singularity_dsl.svg)](https://gemnasium.com/behance/singularity_dsl)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/behance/singularity_dsl/badges/gpa.svg)](https://codeclimate.com/github/behance/singularity_dsl)
|
6
|
+
|
3
7
|
A DSL lib for your [SingularityCI](https://github.com/behance/singularity) instance.
|
4
8
|
Inspired by TravisCI's `.travis.yml`
|
5
9
|
|
@@ -17,10 +17,18 @@ module SingularityDsl
|
|
17
17
|
include Stdout
|
18
18
|
include Table
|
19
19
|
|
20
|
+
attr_reader :git
|
21
|
+
|
20
22
|
def initialize(*args)
|
21
23
|
super
|
22
24
|
@diff_list = nil
|
23
25
|
@git = GitHelper.new
|
26
|
+
envvars = options[:env] || []
|
27
|
+
envvars.each do |pair|
|
28
|
+
key = pair.split(':', 2).first
|
29
|
+
val = pair.split(':', 2).last
|
30
|
+
ENV[key] = val
|
31
|
+
end
|
24
32
|
end
|
25
33
|
|
26
34
|
class_option :task_path,
|
@@ -37,6 +45,9 @@ module SingularityDsl
|
|
37
45
|
type: :string,
|
38
46
|
desc: 'Specify path to a .singularityrc file',
|
39
47
|
default: './.singularityrc'
|
48
|
+
class_option :env,
|
49
|
+
type: :array,
|
50
|
+
desc: 'EnvVars to set, formatted as VAR:VAL'
|
40
51
|
|
41
52
|
# TASKS COMMAND
|
42
53
|
desc 'tasks', 'Available tasks.'
|
@@ -74,7 +85,7 @@ module SingularityDsl
|
|
74
85
|
desc: 'Run a batch instead, after testmerge.',
|
75
86
|
default: ''
|
76
87
|
def testmerge(git_fork, branch, base_branch, base_fork = nil)
|
77
|
-
|
88
|
+
@git.merge_refs git_fork, branch, base_branch, base_fork
|
78
89
|
@diff_list = diff_list base_branch, base_fork
|
79
90
|
remove_remotes git_fork, base_fork
|
80
91
|
batch target_run_task if target_run_task
|
@@ -91,15 +102,6 @@ module SingularityDsl
|
|
91
102
|
urls.each { |url| @git.remove_remote url }
|
92
103
|
end
|
93
104
|
|
94
|
-
def test_merge(git_fork, branch, base_branch, base_fork)
|
95
|
-
@git.clean_reset
|
96
|
-
@git.add_remote base_fork
|
97
|
-
@git.checkout_remote base_branch, base_fork
|
98
|
-
@git.add_remote git_fork
|
99
|
-
@git.merge_remote branch, git_fork
|
100
|
-
@git.install_submodules
|
101
|
-
end
|
102
|
-
|
103
105
|
def target_run_task
|
104
106
|
target = options[:run_task]
|
105
107
|
target = false if target.eql? ''
|
@@ -47,6 +47,15 @@ module SingularityDsl
|
|
47
47
|
exec("git remote rm #{remote}")
|
48
48
|
end
|
49
49
|
|
50
|
+
def merge_refs(git_fork, branch, base_branch, base_fork)
|
51
|
+
clean_reset
|
52
|
+
add_remote base_fork
|
53
|
+
checkout_remote base_branch, base_fork
|
54
|
+
add_remote git_fork
|
55
|
+
merge_remote branch, git_fork
|
56
|
+
install_submodules
|
57
|
+
end
|
58
|
+
|
50
59
|
private
|
51
60
|
|
52
61
|
def remote_cmd(branch, url, action)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: singularity_dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- chr0n1x
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|