terraspace 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/terraspace/app.rb +2 -1
- data/lib/terraspace/terraform/api.rb +6 -1
- data/lib/terraspace/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bb1f738f3830420427da3a1ac7ba6b2bcf946da8cce8348d28ba67f7eb692cf3
|
4
|
+
data.tar.gz: c88c1ce153617f68acc92d89b8fc1d82e193fa2271d701b658737069511a0c2c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '097c4a70ac24ecfdf0e6a87b844688adf82bc6f41699a903877af054136a00bf9614ace775cb2c431dbbafc92b981218ece247e691b4db079191b080133032eb'
|
7
|
+
data.tar.gz: fb0e6162ebb0f48f3e46f441163d94cf93e0186a6a32917071f9cbf5b1f27cec679ac582c39f35a9e61000373ba1bbd074797d7fdf941a2887b6d36463dc2e5d
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
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
|
+
## [0.2.2]
|
7
|
+
* #36 cloud.relative_root setting
|
8
|
+
|
6
9
|
## [0.2.1]
|
7
10
|
* #35 fix summary bug when ran multiple times with different envs
|
8
11
|
|
data/lib/terraspace/app.rb
CHANGED
@@ -17,8 +17,9 @@ module Terraspace
|
|
17
17
|
config.cloud = ActiveSupport::OrderedOptions.new
|
18
18
|
config.cloud.overwrite = true
|
19
19
|
config.cloud.overwrite_sensitive = true
|
20
|
+
config.cloud.relative_root = nil
|
20
21
|
config.build = ActiveSupport::OrderedOptions.new
|
21
|
-
config.build.cache_root = nil # defaults to
|
22
|
+
config.build.cache_root = nil # defaults to /full/path/to/.terraspace-cache
|
22
23
|
config.build.cache_dir = ":CACHE_ROOT/:REGION/:ENV/:BUILD_DIR"
|
23
24
|
config
|
24
25
|
end
|
@@ -12,7 +12,6 @@ module Terraspace::Terraform
|
|
12
12
|
|
13
13
|
# Docs: https://www.terraform.io/docs/cloud/api/workspaces.html
|
14
14
|
def set_working_dir
|
15
|
-
working_directory = @mod.cache_dir.sub("#{Terraspace.root}/", '')
|
16
15
|
return if working_directory == workspace['attributes']['working-directory']
|
17
16
|
|
18
17
|
payload = {
|
@@ -26,6 +25,12 @@ module Terraspace::Terraform
|
|
26
25
|
http.patch("organizations/#{@organization}/workspaces/#{@workspace_name}", payload)
|
27
26
|
end
|
28
27
|
|
28
|
+
def working_directory
|
29
|
+
cache_dir = @mod.cache_dir.sub("#{Terraspace.root}/", '')
|
30
|
+
relative_root = Terraspace.config.cloud.relative_root # prepended to TFC Working Directory
|
31
|
+
relative_root ? "#{relative_root}/#{cache_dir}" : cache_dir
|
32
|
+
end
|
33
|
+
|
29
34
|
def set_env_vars
|
30
35
|
Vars.new(@mod, workspace).run
|
31
36
|
end
|
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: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-08-
|
11
|
+
date: 2020-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|