onceover-octocatalog-diff 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0457bcc4f5c3efc091ed7596a99bde39a501af4
|
4
|
+
data.tar.gz: 9eb05d24a9e322eee21214360ec365a32b34abfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c9dd44b08702d4c149d85571b022e8887c8b4747da5f30d62356e48426271b495e29e17f2cc705b49cfb939cd0d7ad49877edd94919fde144972a07ad307021
|
7
|
+
data.tar.gz: 495d99145707f8eb4038eb43e0038dff06490f151bef1ddbc1b489967637c5ec95dcf9ad16b870c75227e0c27c4dd2d0aa0593f2d03a01f57505e9c1dae4636d
|
@@ -4,14 +4,7 @@ require "onceover/octocatalog/diff/cli"
|
|
4
4
|
class Onceover
|
5
5
|
module Octocatalog
|
6
6
|
module Diff
|
7
|
-
|
8
|
-
require 'json'
|
9
|
-
|
10
|
-
repo.facts_files.each do |facts_file|
|
11
|
-
facts = JSON.load(File.read(facts_file))
|
12
|
-
File.open("#{output_location}/#{File.basename(facts_file,'.*')}.yaml", 'w') {|f| f.write facts.to_yaml }
|
13
|
-
end
|
14
|
-
end
|
7
|
+
|
15
8
|
end
|
16
9
|
end
|
17
10
|
end
|
@@ -49,14 +49,23 @@ revisions to compare between.
|
|
49
49
|
logger.debug "Copying controlrepo to #{tempdir}"
|
50
50
|
FileUtils.copy_entry(repo.root,tempdir)
|
51
51
|
|
52
|
+
# Copy all of the factsets over in reverse order so that
|
53
|
+
# local ones override vendored ones
|
54
|
+
logger.debug "Deploying vendored factsets"
|
55
|
+
deduped_factsets = repo.facts_files.reverse.inject({}) do |hash, file|
|
56
|
+
hash[File.basename(file)] = file
|
57
|
+
hash
|
58
|
+
end
|
59
|
+
|
60
|
+
deduped_factsets.each do |basename,path|
|
61
|
+
FileUtils.cp(path,"#{tempdir}/spec/factsets/")
|
62
|
+
end
|
63
|
+
|
52
64
|
if File.directory?("#{r10k_cache_dir}/modules")
|
53
65
|
logger.debug "Copying modules from thread cache to #{tempdir}"
|
54
66
|
FileUtils.copy_entry("#{r10k_cache_dir}/modules","#{tempdir}/modules")
|
55
67
|
end
|
56
68
|
|
57
|
-
logger.debug "Converting facts to yaml"
|
58
|
-
Onceover::Octocatalog::Diff.create_facts_yaml(repo,"#{tempdir}/spec/factsets")
|
59
|
-
|
60
69
|
logger.info "Deploying Puppetfile for #{test.classes[0].name} on #{test.nodes[0].name}"
|
61
70
|
r10k_cmd = "r10k puppetfile install --verbose --color --puppetfile #{repo.puppetfile} --config #{r10k_cache_dir}/r10k.yaml"
|
62
71
|
Open3.popen3(r10k_cmd, :chdir => tempdir) do |stdin, stdout, stderr, wait_thr|
|
@@ -86,7 +95,7 @@ revisions to compare between.
|
|
86
95
|
|
87
96
|
command_args = [
|
88
97
|
'--fact-file',
|
89
|
-
"#{tempdir}/spec/factsets/#{test.nodes[0].name}.
|
98
|
+
"#{tempdir}/spec/factsets/#{test.nodes[0].name}.json",
|
90
99
|
'--from',
|
91
100
|
opts[:from],
|
92
101
|
'--to',
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: onceover-octocatalog-diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Ratcliffe
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-03-
|
11
|
+
date: 2017-03-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|