terraspace 2.0.0 → 2.0.3
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/.github/FUNDING.yml +1 -0
- data/CHANGELOG.md +17 -7
- data/lib/terraspace/cli/concerns/plan_path.rb +1 -1
- data/lib/terraspace/cli/logs/concern.rb +1 -1
- data/lib/terraspace/cloud/base.rb +1 -1
- data/lib/terraspace/cloud/folder/base.rb +1 -1
- data/lib/terraspace/cloud/folder/package.rb +1 -1
- data/lib/terraspace/cloud/update.rb +1 -1
- data/lib/terraspace/compiler/strategy/tfvar/layer.rb +1 -1
- data/lib/terraspace/core.rb +8 -0
- data/lib/terraspace/logger.rb +2 -1
- data/lib/terraspace/plugin/expander/interface.rb +5 -4
- data/lib/terraspace/terraform/ihooks/after/plan.rb +1 -1
- data/lib/terraspace/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fec1ba076567ee419169922ed9dd183f13bd998983776f603bf36b051d7a6a7
|
4
|
+
data.tar.gz: a2c710787cedca1d62b788c761a9cb3bb40f43511d04ccf51fdfe44a0cdff391
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3318d458250b2e33892740f9fd1fa47d363b2bcffb53a8c8dc8ac081e282bb3cd13be18b230841aa9c125d3fe5e832b53cf2294a51010c123ec96c831666d76d
|
7
|
+
data.tar.gz: 4acc67e5c612e584d96c2fd752a1b967c5fe9ce34069ec3149b5f1f6329dff56075f26a220106d20e22155d37279d50cb2e02db10bec873c7803fcadddc1e890
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
github: boltops-tools
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/), even before v1.0.
|
5
5
|
|
6
|
+
## [2.0.3] - 2022-07-04
|
7
|
+
- [#237](https://github.com/boltops-tools/terraspace/pull/237) remove duplicate paths in layering
|
8
|
+
- [#244](https://github.com/boltops-tools/terraspace/pull/244) rename _cache2 to .cache2
|
9
|
+
- [#245](https://github.com/boltops-tools/terraspace/pull/245) set utf8 in case system is not configured with LANG=en_US.UTF-8
|
10
|
+
|
11
|
+
## [2.0.2] - 2022-06-21
|
12
|
+
- [#242](https://github.com/boltops-tools/terraspace/pull/242) :PROJECT variable: TS_PROJECT as well as config.cloud.project
|
13
|
+
|
14
|
+
## [2.0.1] - 2022-06-14
|
15
|
+
- [#240](https://github.com/boltops-tools/terraspace/pull/240) add project expander variable
|
16
|
+
|
6
17
|
## [2.0.0] - 2022-06-10
|
7
18
|
* Terraspace Cloud Support
|
8
19
|
|
@@ -11,21 +22,20 @@ Highlights:
|
|
11
22
|
* CI plugin support
|
12
23
|
* CI plugin generator
|
13
24
|
* VCS manual support in core for github, gitlab, bitbucket
|
25
|
+
* Layering: simplified by removing provider layering by default.
|
26
|
+
* Layering: new default `config.layering.mode = "simple"`. Use `config.layering.mode = "provider"` for v1 behavior.
|
27
|
+
* Layering: easier to debug with config.layering.show
|
28
|
+
* Layering: App, Role, Extra level layering
|
14
29
|
|
15
30
|
More:
|
16
31
|
* Backend expander variables handle env vars in general
|
17
32
|
* Remove config.build.cache_root option
|
18
|
-
* Clean up Terraspace::Plugin.autodetect
|
19
33
|
* cloud.record = "changes". dont create cloud record when no changes
|
20
|
-
* ci generic
|
21
|
-
* edge case TS_ENV=''
|
22
|
-
* .cody/cloud test
|
23
34
|
* cloud warning message when TS_TOKEN is confiugred but cloud is not yet
|
24
|
-
* API expodential retry logic
|
25
|
-
* plugin autodetect cleanup
|
35
|
+
* Cloud API expodential retry logic
|
26
36
|
* TS_EXTRA in favor of instance option, deprecate instance option
|
27
37
|
* handle ctrl-c
|
28
|
-
* improve
|
38
|
+
* improve acceptance codebuild scripts
|
29
39
|
|
30
40
|
## [1.1.7] - 2022-02-22
|
31
41
|
- [#215](https://github.com/boltops-tools/terraspace/pull/215) fix all down by building child nodes
|
@@ -2,7 +2,7 @@ class Terraspace::CLI::Logs
|
|
2
2
|
module Concern
|
3
3
|
# Filters for lines that belong to the last ran process pid
|
4
4
|
def readlines(path)
|
5
|
-
lines = IO.readlines(path)
|
5
|
+
lines = IO.readlines(path).map { |l| l.force_encoding('UTF-8') }
|
6
6
|
found = lines.reverse.find do |line|
|
7
7
|
pid(line) # search in reverse order for lines with interesting info
|
8
8
|
end
|
@@ -62,7 +62,7 @@ module Terraspace::Cloud
|
|
62
62
|
# terraform plan can be a kind of apply or destroy
|
63
63
|
# terraform apply can be a kind of apply or destroy
|
64
64
|
kind = self.class.name.to_s.split('::').last.underscore # IE: apply or destroy
|
65
|
-
dir = "#{@mod.cache_dir}/.terraspace-cache
|
65
|
+
dir = "#{@mod.cache_dir}/.terraspace-cache/.cache2/#{kind}"
|
66
66
|
FileUtils.rm_rf(dir)
|
67
67
|
FileUtils.mkdir_p(dir)
|
68
68
|
end
|
@@ -12,7 +12,7 @@ class Terraspace::Cloud::Folder
|
|
12
12
|
FileUtils.rm_rf(artifacts_path)
|
13
13
|
FileUtils.mkdir_p(File.dirname(artifacts_path))
|
14
14
|
|
15
|
-
expr = "#{@mod.cache_dir}/.terraspace-cache
|
15
|
+
expr = "#{@mod.cache_dir}/.terraspace-cache/.cache2/#{@type}/*"
|
16
16
|
Dir.glob(expr).each do |src|
|
17
17
|
dest = "#{artifacts_path}/#{File.basename(src)}"
|
18
18
|
FileUtils.mkdir_p(File.dirname(dest))
|
@@ -23,7 +23,7 @@ module Terraspace::Cloud
|
|
23
23
|
clean_cache2_stage
|
24
24
|
# .terraspace-cache/dev/stacks/demo
|
25
25
|
Dir.chdir(@mod.cache_dir) do
|
26
|
-
cache2_path = ".terraspace-cache
|
26
|
+
cache2_path = ".terraspace-cache/.cache2/#{@kind}"
|
27
27
|
FileUtils.mkdir_p(cache2_path)
|
28
28
|
|
29
29
|
IO.write("#{cache2_path}/#{@kind}.log", Terraspace::Logger.logs)
|
@@ -41,7 +41,7 @@ class Terraspace::Compiler::Strategy::Tfvar
|
|
41
41
|
def paths
|
42
42
|
project_paths = full_paths(project_tfvars_dir)
|
43
43
|
stack_paths = full_paths(stack_tfvars_dir)
|
44
|
-
paths = project_paths + stack_paths
|
44
|
+
paths = (project_paths + stack_paths).uniq
|
45
45
|
show_layers(paths)
|
46
46
|
paths.select do |path|
|
47
47
|
File.exist?(path)
|
data/lib/terraspace/core.rb
CHANGED
@@ -18,6 +18,14 @@ module Terraspace
|
|
18
18
|
ENV['TS_EXTRA'] unless ENV['TS_EXTRA'].blank?
|
19
19
|
end
|
20
20
|
|
21
|
+
def project
|
22
|
+
if ENV['TS_PROJECT'].blank?
|
23
|
+
config.cloud.project
|
24
|
+
else
|
25
|
+
ENV['TS_PROJECT']
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
21
29
|
@@root = nil
|
22
30
|
def root
|
23
31
|
@@root ||= ENV['TS_ROOT'] || Dir.pwd
|
data/lib/terraspace/logger.rb
CHANGED
@@ -96,10 +96,11 @@ module Terraspace::Plugin::Expander
|
|
96
96
|
@mod.name
|
97
97
|
end
|
98
98
|
|
99
|
-
def app;
|
100
|
-
def
|
101
|
-
def
|
102
|
-
def
|
99
|
+
def app; Terraspace.app ; end
|
100
|
+
def env; Terraspace.env ; end
|
101
|
+
def extra; Terraspace.extra ; end
|
102
|
+
def project; Terraspace.project ; end
|
103
|
+
def role; Terraspace.role ; end
|
103
104
|
|
104
105
|
def type_instance
|
105
106
|
[type, instance].reject { |s| s.blank? }.join('-')
|
@@ -22,7 +22,7 @@ module Terraspace::Terraform::Ihooks::After
|
|
22
22
|
def cloud_create_plan
|
23
23
|
return unless Terraspace.cloud?
|
24
24
|
|
25
|
-
unless @mod.out_option.include?("
|
25
|
+
unless @mod.out_option.include?(".cache2/")
|
26
26
|
# copy absolute path directly
|
27
27
|
src = @mod.out_option.starts_with?('/') ? @mod.out_option : "#{@mod.cache_dir}/#{@mod.out_option}"
|
28
28
|
dest = "#{@mod.cache_dir}/#{plan_path}"
|
data/lib/terraspace/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: terraspace
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -388,6 +388,7 @@ files:
|
|
388
388
|
- ".cody/unit/bin/build.sh"
|
389
389
|
- ".cody/unit/buildspec.yml"
|
390
390
|
- ".cody/unit/project.rb"
|
391
|
+
- ".github/FUNDING.yml"
|
391
392
|
- ".github/ISSUE_TEMPLATE.md"
|
392
393
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
393
394
|
- ".github/ISSUE_TEMPLATE/documentation.md"
|