cloudspin-stack-artefact 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/cloudspin/stack/artefact/cli.rb +17 -7
- data/lib/cloudspin/stack/artefact/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 919593bd5c77587b969f61b69b25f4b96603891e
|
|
4
|
+
data.tar.gz: e3169cf4155d409f8548bd3d7d2741c8cf40b703
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f3535fc216a2509a36cbd93f3b147834ab9ac535c39e2aacbefef5d4651c50f38d767a8bc2af47bac0c3728fc26010a925852a57578d765b79c7a7312cf33eac
|
|
7
|
+
data.tar.gz: d73b482ffa552e9d8ee77a07d1a44556cbf4bb8225e67e6e83aca40100f474a92e92a404f85b92a144db63d7037defc114fbe9d9c5b1b51ddc7dbd82e14be71b
|
|
@@ -12,6 +12,12 @@ module Cloudspin
|
|
|
12
12
|
:default => './dist',
|
|
13
13
|
:desc => 'The artefact will be created in this folder'
|
|
14
14
|
|
|
15
|
+
class_option :source,
|
|
16
|
+
:aliases => '-s',
|
|
17
|
+
:banner => 'PATH',
|
|
18
|
+
:default => './src',
|
|
19
|
+
:desc => 'Folder with the terraform project source files'
|
|
20
|
+
|
|
15
21
|
desc 'build', 'Assemble the files to be packaged'
|
|
16
22
|
option :test_folder,
|
|
17
23
|
:aliases => '-t',
|
|
@@ -25,11 +31,6 @@ module Cloudspin
|
|
|
25
31
|
:aliases => '-f',
|
|
26
32
|
:banner => 'FILENAME',
|
|
27
33
|
:default => './stack-instance-defaults.yaml'
|
|
28
|
-
option :source,
|
|
29
|
-
:aliases => '-s',
|
|
30
|
-
:banner => 'PATH',
|
|
31
|
-
:default => './src',
|
|
32
|
-
:desc => 'Folder with the terraform project source files'
|
|
33
34
|
def build
|
|
34
35
|
add_folder(options[:test_folder])
|
|
35
36
|
add_folder(options[:environments_folder])
|
|
@@ -37,7 +38,7 @@ module Cloudspin
|
|
|
37
38
|
builder.build
|
|
38
39
|
end
|
|
39
40
|
|
|
40
|
-
desc '
|
|
41
|
+
desc 'package', 'Package the files'
|
|
41
42
|
def package
|
|
42
43
|
builder.package
|
|
43
44
|
end
|
|
@@ -70,7 +71,13 @@ module Cloudspin
|
|
|
70
71
|
end
|
|
71
72
|
|
|
72
73
|
def stack_definition
|
|
73
|
-
|
|
74
|
+
Cloudspin::Stack::Definition.from_file(stack_definition_file)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def stack_definition_file
|
|
78
|
+
raise NoStackDefinitionFolder unless Dir.exists? options[:source]
|
|
79
|
+
raise NoStackDefinitionConfigurationFile unless File.exists? "#{options[:source]}/stack-definition.yaml"
|
|
80
|
+
"#{options[:source]}/stack-definition.yaml"
|
|
74
81
|
end
|
|
75
82
|
end
|
|
76
83
|
|
|
@@ -80,6 +87,9 @@ module Cloudspin
|
|
|
80
87
|
|
|
81
88
|
end
|
|
82
89
|
|
|
90
|
+
class NoStackDefinitionFolder < StandardError; end
|
|
91
|
+
class NoStackDefinitionConfigurationFile < StandardError; end
|
|
92
|
+
|
|
83
93
|
end
|
|
84
94
|
|
|
85
95
|
end
|