terraspace 1.1.6 → 1.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/.cody/all/bin/build.sh +33 -0
- data/.cody/all/buildspec.yml +10 -0
- data/.cody/all/project.rb +2 -0
- data/.cody/all/role.rb +6 -0
- data/.pipedream/pipeline.rb +1 -0
- data/CHANGELOG.md +4 -0
- data/lib/terraspace/all/runner.rb +2 -1
- data/lib/terraspace/builder/children.rb +6 -7
- data/lib/terraspace/builder.rb +7 -1
- data/lib/terraspace/version.rb +1 -1
- metadata +6 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 82379236de38c541366efe70b69e9393490f5da74a4aecd4a975b3b9be0af907
|
|
4
|
+
data.tar.gz: b5cb25d94d6015f01768ec6970b66221b78851ef72ef5614f0a5e54e774aaa94
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 917fc2cd69a9eab564e2c8a69e9493a04e0a2e424784e09217a79f5c3433b9a790a1bfc9669e9b68a0f53cce32565900aeb4134861faf9a9266b91d847fea39d
|
|
7
|
+
data.tar.gz: a2977e19c20a1841892f4b275623e080837ccd10359282108475cad9bdd993ccaac3d7d1f0f7e38a530b823ab4c8c2816e9564b882cb482618bd7701e306da6d
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
set -eu
|
|
4
|
+
|
|
5
|
+
# will build from /tmp because terraspace/Gemfile may interfere
|
|
6
|
+
cd /tmp
|
|
7
|
+
|
|
8
|
+
export PATH=~/bin:$PATH # ~/bin/terraspace wrapper
|
|
9
|
+
|
|
10
|
+
set -x
|
|
11
|
+
|
|
12
|
+
git clone https://github.com/boltops-tools/terraspace-graph-demo
|
|
13
|
+
cd terraspace-graph-demo
|
|
14
|
+
|
|
15
|
+
# Rewrite the Gemfile to use the local terraspace gem for testing
|
|
16
|
+
cat << EOF > Gemfile
|
|
17
|
+
source "https://rubygems.org"
|
|
18
|
+
gem "terraspace", path: "$CODEBUILD_SRC_DIR", submodules: true
|
|
19
|
+
gem "rspec-terraspace", git: "https://github.com/boltops-tools/rspec-terraspace", branch: "master"
|
|
20
|
+
gem "terraspace_plugin_aws", git: "https://github.com/boltops-tools/terraspace_plugin_aws", branch: "master"
|
|
21
|
+
EOF
|
|
22
|
+
bundle
|
|
23
|
+
|
|
24
|
+
# Uncomment to enable logger level debug
|
|
25
|
+
# cat << EOF > config/app.rb
|
|
26
|
+
# Terraspace.configure do |config|
|
|
27
|
+
# config.logger.level = :debug
|
|
28
|
+
# end
|
|
29
|
+
# EOF
|
|
30
|
+
|
|
31
|
+
terraspace all up -y
|
|
32
|
+
terraspace clean all -y
|
|
33
|
+
terraspace all down -y
|
data/.cody/all/role.rb
ADDED
data/.pipedream/pipeline.rb
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
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
|
+
## [1.1.7] - 2022-02-22
|
|
7
|
+
- [#215](https://github.com/boltops-tools/terraspace/pull/215) fix all down by building child nodes
|
|
8
|
+
- [#216](https://github.com/boltops-tools/terraspace/pull/216) add codebuild project with acceptance test for terraspace all
|
|
9
|
+
|
|
6
10
|
## [1.1.6] - 2022-02-21
|
|
7
11
|
- [#213](https://github.com/boltops-tools/terraspace/pull/213) ability to show layers for debugging
|
|
8
12
|
|
|
@@ -68,7 +68,8 @@ module Terraspace::All
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def build_stack(name)
|
|
71
|
-
|
|
71
|
+
include_stacks = @command == "down" ? :root_with_children : :root_only
|
|
72
|
+
builder = Terraspace::Builder.new(@options.merge(mod: name, clean: false, quiet: true, include_stacks: include_stacks))
|
|
72
73
|
builder.build(modules: false)
|
|
73
74
|
end
|
|
74
75
|
|
|
@@ -8,19 +8,18 @@ class Terraspace::Builder
|
|
|
8
8
|
end
|
|
9
9
|
|
|
10
10
|
def build
|
|
11
|
-
dependencies = Terraspace::Dependency::Registry.data
|
|
12
11
|
# Find out if current deploy stack contains dependency
|
|
13
|
-
|
|
12
|
+
dependencies = Terraspace::Dependency::Registry.data
|
|
13
|
+
root = dependencies.find do |parent_child|
|
|
14
14
|
parent, _ = parent_child.split(':')
|
|
15
15
|
parent == @mod.name
|
|
16
16
|
end
|
|
17
|
-
return unless
|
|
17
|
+
return unless root
|
|
18
18
|
|
|
19
|
-
# Go down graph
|
|
20
|
-
|
|
21
|
-
node = Terraspace::Dependency::Node.find_by(name:
|
|
19
|
+
# Go down dependency graph to build a queue for processing
|
|
20
|
+
name, _ = root.split(':')
|
|
21
|
+
node = Terraspace::Dependency::Node.find_by(name: name)
|
|
22
22
|
build_queue(node)
|
|
23
|
-
|
|
24
23
|
logger.debug "Terraspace::Builder::Children @queue #{@queue}"
|
|
25
24
|
|
|
26
25
|
# Process queue in reverse order to build leaf nodes first
|
data/lib/terraspace/builder.rb
CHANGED
|
@@ -6,9 +6,15 @@ module Terraspace
|
|
|
6
6
|
|
|
7
7
|
# @include_stacks can be 3 values: root_with_children, none, root_only
|
|
8
8
|
#
|
|
9
|
+
# terraspace all:
|
|
10
|
+
#
|
|
9
11
|
# none: dont build any stacks at all. used by `terraspace all up`
|
|
10
12
|
# root_only: only build root stack. used by `terraspace all up`
|
|
11
|
-
# root_with_children: build all
|
|
13
|
+
# root_with_children: build all children stacks as well as the root stack. normal `terraspace all down`
|
|
14
|
+
#
|
|
15
|
+
# terraspace up:
|
|
16
|
+
#
|
|
17
|
+
# root_with_children: build all children stacks as well as the root stack. normal `terraspace up`
|
|
12
18
|
#
|
|
13
19
|
def initialize(options={})
|
|
14
20
|
super
|
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: 1.1.
|
|
4
|
+
version: 1.1.7
|
|
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-02-
|
|
11
|
+
date: 2022-02-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -341,6 +341,10 @@ extensions: []
|
|
|
341
341
|
extra_rdoc_files: []
|
|
342
342
|
files:
|
|
343
343
|
- ".cody/README.md"
|
|
344
|
+
- ".cody/all/bin/build.sh"
|
|
345
|
+
- ".cody/all/buildspec.yml"
|
|
346
|
+
- ".cody/all/project.rb"
|
|
347
|
+
- ".cody/all/role.rb"
|
|
344
348
|
- ".cody/aws/bin/build.sh"
|
|
345
349
|
- ".cody/aws/buildspec.yml"
|
|
346
350
|
- ".cody/aws/project.rb"
|