miniexec 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miniexec.rb +0 -40
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e03f7a3801afeabed8952f4813e0dc107053f6697052e0613be969a4853f0c0
|
4
|
+
data.tar.gz: 2d82ddc61ea8be64219e733d3704e56e9c30f703fe74b121ef24558a3f0f324a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b0b78c30b6cf9cb186f2a9531fd86ff8229d2a28793ded8149753c8bc64162fee95e28a9305bb1a8995a7d60e27dc06faeb002f4ee0f65213765c52b2b805b5
|
7
|
+
data.tar.gz: a0657ec2d0cbada87e8fa9d6bedc8c580b529c362ed1fd84a1fcec04e7d5248f72d615bf5523649f313bc304a1e6c34272754348900fb395a9a14391ea01773a
|
data/lib/miniexec.rb
CHANGED
@@ -88,43 +88,3 @@ class MiniExec
|
|
88
88
|
(before_script + script + after_script).flatten.join("\n")
|
89
89
|
end
|
90
90
|
end
|
91
|
-
|
92
|
-
options = {
|
93
|
-
binds: [],
|
94
|
-
env: []
|
95
|
-
}
|
96
|
-
|
97
|
-
OptionParser.new do |opts|
|
98
|
-
opts.banner = 'Usage: miniexec.rb [options]'
|
99
|
-
opts.separator ''
|
100
|
-
opts.separator 'specific options:'
|
101
|
-
|
102
|
-
opts.on('-p', '--path PATH', 'Path to the repository containing a valid .gitlab-ci.yml') do |path|
|
103
|
-
options[:path] = path
|
104
|
-
end
|
105
|
-
|
106
|
-
opts.on('-j', '--job JOBNAME', 'Specify the gitlab job to run') do |job|
|
107
|
-
options[:job] = job
|
108
|
-
end
|
109
|
-
|
110
|
-
opts.on('-b', '--bind BIND', 'Specify a bind mapping',
|
111
|
-
'Example: /some/local/dir:/mapping/in/container') do |bind|
|
112
|
-
options[:binds].push bind
|
113
|
-
end
|
114
|
-
opts.on('-e', '--environment VARIABLE',
|
115
|
-
'Specify an environment variable to be passed to the container',
|
116
|
-
'Example: SOMEVAR=thing') do |env|
|
117
|
-
options[:env].push env
|
118
|
-
end
|
119
|
-
end.parse!
|
120
|
-
|
121
|
-
raise OptionParser::MissingArgument, 'Specify a job with -j' if options[:job].nil?
|
122
|
-
raise OptionParser::MissingArgument, 'Specify a job with -p' if options[:path].nil?
|
123
|
-
|
124
|
-
MiniExec.config(project_path: options[:path])
|
125
|
-
exec = MiniExec.new options[:job],
|
126
|
-
docker_url: 'unix:///var/run/user/1000/podman/podman.sock',
|
127
|
-
binds: options[:binds],
|
128
|
-
env: options[:env]
|
129
|
-
|
130
|
-
exec.run_job
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miniexec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Martin Pugh
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-03 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: A minimal interpretor/executor for .gitlab-ci.yml
|
14
14
|
email: pugh@s3kr.it
|
@@ -31,7 +31,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
31
31
|
requirements:
|
32
32
|
- - ">="
|
33
33
|
- !ruby/object:Gem::Version
|
34
|
-
version: '0'
|
34
|
+
version: '2.0'
|
35
35
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|