miriamtech-gocd 0.2.0 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miriamtech/gocd/artifacts.rb +17 -1
- data/lib/miriamtech/gocd/docker.rb +1 -1
- data/lib/miriamtech/gocd/lambda.rb +2 -0
- data/lib/miriamtech/gocd/tasks.rb +2 -1
- data/lib/miriamtech/gocd/version.rb +1 -1
- data/miriamtech-gocd.gemspec +2 -0
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 36bb5e58de16e0265808a3dea1ef4c080aed0980f12a15836a73015301618531
|
4
|
+
data.tar.gz: 63752d772b291d09d87b8d464c6783ebd1f6db8a437e689f5d86c95995384cfa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 06ca072ff4682cab374e4ab8422dfade27be1d2010dec3aea8cdc170b785f6fb9be364fdfc9e4801b4a2dabedd551f5c2db7300862e156a864bf5f3f20236271
|
7
|
+
data.tar.gz: fa7ea749465500419785aecb59cbb63dda6a6032b91bb25daa7dd1c18a1e24a79912be5c5399d2662fa7578b2aca83d2f1021277c5c4f08aa6f1063de33fc092
|
@@ -1,8 +1,18 @@
|
|
1
1
|
module MiriamTech
|
2
2
|
module GoCD
|
3
3
|
module DSL
|
4
|
+
def capture_artifacts(prefix = project_name, workdir:, path:, &block)
|
5
|
+
with_artifacts_volume(prefix) do |volume_name|
|
6
|
+
begin
|
7
|
+
yield "-v #{volume_name}:#{workdir}/#{path}"
|
8
|
+
ensure
|
9
|
+
copy_artifacts_from_volume(volume_name, local_path: path)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
4
14
|
def with_artifacts_volume(prefix = project_name, &block)
|
5
|
-
artifacts_volume = "#{prefix}#{build_tag}"
|
15
|
+
artifacts_volume = sanitized_volume_name("#{prefix}#{build_tag}")
|
6
16
|
docker "volume create #{artifacts_volume}"
|
7
17
|
yield artifacts_volume
|
8
18
|
ensure
|
@@ -20,6 +30,12 @@ module MiriamTech
|
|
20
30
|
docker "rm -v #{container_id}"
|
21
31
|
end
|
22
32
|
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def sanitized_volume_name(name)
|
37
|
+
name.gsub(/[^-_\.A-Za-z0-9]/, '_')
|
38
|
+
end
|
23
39
|
end
|
24
40
|
end
|
25
41
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'pathname'
|
2
|
+
require 'rake/clean'
|
2
3
|
|
3
4
|
module MiriamTech
|
4
5
|
module GoCD
|
@@ -10,7 +11,7 @@ module MiriamTech
|
|
10
11
|
task :default => [:test]
|
11
12
|
task :full => [:clobber, :build]
|
12
13
|
|
13
|
-
CLEAN.add(root_path + '
|
14
|
+
CLEAN.add(root_path + 'test/reports')
|
14
15
|
task :clean do
|
15
16
|
docker_compose "stop"
|
16
17
|
end
|
data/miriamtech-gocd.gemspec
CHANGED
@@ -29,4 +29,6 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "bundler", "~> 2.0"
|
30
30
|
spec.add_development_dependency "rake", ">= 10.0"
|
31
31
|
spec.add_development_dependency "minitest", "~> 5.0"
|
32
|
+
spec.add_development_dependency 'rspec-expectations'
|
33
|
+
spec.add_development_dependency 'rspec-mocks'
|
32
34
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miriamtech-gocd
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ken Treis
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-09-
|
11
|
+
date: 2020-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rspec-expectations
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec-mocks
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
55
83
|
description:
|
56
84
|
email:
|
57
85
|
- ken@miriamtech.com
|