terraspace 1.1.7 → 2.0.0
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/{role.rb → iam_role.rb} +0 -0
- data/.cody/all/project.rb +6 -2
- data/.cody/aws/bin/build.sh +5 -0
- data/.cody/aws/{role.rb → iam_role.rb} +0 -0
- data/.cody/aws/project.rb +6 -2
- data/.cody/azurerm/bin/build.sh +5 -0
- data/.cody/azurerm/{role.rb → iam_role.rb} +0 -0
- data/.cody/azurerm/project.rb +5 -3
- data/.cody/google/bin/build.sh +5 -0
- data/.cody/google/{role.rb → iam_role.rb} +0 -0
- data/.cody/google/project.rb +5 -3
- data/.cody/none/bin/build.sh +5 -0
- data/.cody/none/{role.rb → iam_role.rb} +0 -0
- data/.cody/none/project.rb +6 -2
- data/.cody/shared/script/install/terraform.sh +2 -1
- data/.cody/shared/script/update/gemfile.sh +2 -0
- data/.cody/unit/project.rb +2 -2
- data/.gitignore +2 -0
- data/.pipedream/pipeline.rb +3 -3
- data/CHANGELOG.md +24 -0
- data/exe/terraspace +0 -7
- data/lib/templates/base/project/config/app.rb +3 -0
- data/lib/templates/plugin/ci/%gem_name%.gemspec.tt +32 -0
- data/lib/templates/plugin/ci/.gitignore +12 -0
- data/lib/templates/plugin/{.rspec → ci/.rspec} +0 -0
- data/lib/templates/plugin/ci/.rubocop.yml +13 -0
- data/lib/templates/plugin/ci/CHANGELOG.md.tt +5 -0
- data/lib/templates/plugin/ci/Gemfile +10 -0
- data/lib/templates/plugin/ci/LICENSE.txt +21 -0
- data/lib/templates/plugin/ci/README.md.tt +19 -0
- data/lib/templates/plugin/ci/Rakefile +12 -0
- data/lib/templates/plugin/ci/lib/%gem_name%/autoloader.rb.tt +23 -0
- data/lib/templates/plugin/ci/lib/%gem_name%/interface.rb.tt +15 -0
- data/lib/templates/plugin/ci/lib/%gem_name%/pr.rb.tt +15 -0
- data/lib/templates/plugin/ci/lib/%gem_name%/vars.rb.tt +26 -0
- data/lib/templates/plugin/ci/lib/%gem_name%/version.rb.tt +5 -0
- data/lib/templates/plugin/ci/lib/%gem_name%.rb.tt +17 -0
- data/lib/templates/plugin/ci/spec/%gem_name%_spec.rb.tt +7 -0
- data/lib/templates/plugin/ci/spec/spec_helper.rb.tt +15 -0
- data/lib/templates/plugin/{.gitignore → core/.gitignore} +0 -0
- data/lib/templates/plugin/core/.rspec +3 -0
- data/lib/templates/plugin/{CHANGELOG.md → core/CHANGELOG.md} +0 -0
- data/lib/templates/plugin/{Gemfile → core/Gemfile} +0 -0
- data/lib/templates/plugin/{LICENSE.txt → core/LICENSE.txt} +0 -0
- data/lib/templates/plugin/{README.md.tt → core/README.md.tt} +0 -0
- data/lib/templates/plugin/{Rakefile → core/Rakefile} +0 -0
- data/lib/templates/plugin/{bin → core/bin}/console.tt +0 -0
- data/lib/templates/plugin/{bin → core/bin}/setup +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/module/main.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/module/outputs.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/module/variables.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/project/config/terraform/backend.tf.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/project/config/terraform/provider.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/stack/main.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/stack/outputs.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/hcl/stack/variables.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/module/main.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/module/outputs.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/module/variables.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/project/config/terraform/backend.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/project/config/terraform/provider.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/stack/main.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/stack/outputs.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/ruby/stack/variables.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/.rspec +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/Gemfile +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/fixtures/stack/main.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/fixtures/stack/outputs.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/fixtures/stack/variables.tf +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/main_spec.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/spec_helper.rb +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/autoloader.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/clients.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/interfaces/backend.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/interfaces/config.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/interfaces/expander.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/interfaces/layer.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/version.rb.tt +0 -0
- data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%.rb.tt +0 -0
- data/lib/templates/plugin/{spec → core/spec}/spec_helper.rb.tt +0 -0
- data/lib/templates/plugin/{spec → core/spec}/terraspace_provider_%name%_spec.rb.tt +0 -0
- data/lib/templates/plugin/{terraspace_plugin_%name%.gemspec.tt → core/terraspace_plugin_%name%.gemspec.tt} +0 -0
- data/lib/terraspace/all/runner.rb +2 -0
- data/lib/terraspace/all/summary.rb +2 -0
- data/lib/terraspace/app.rb +23 -4
- data/lib/terraspace/builder.rb +1 -1
- data/lib/terraspace/cli/concerns/plan_path.rb +8 -0
- data/lib/terraspace/cli/down.rb +4 -0
- data/lib/terraspace/cli/init.rb +1 -1
- data/lib/terraspace/cli/new/ci.rb +121 -0
- data/lib/terraspace/cli/new/example.rb +1 -1
- data/lib/terraspace/cli/new/helpers/plugin_gem.rb +1 -1
- data/lib/terraspace/cli/new/plugin/ci.rb +46 -0
- data/lib/terraspace/cli/new/plugin/core.rb +26 -0
- data/lib/terraspace/cli/new/plugin/helper.rb +4 -1
- data/lib/terraspace/cli/new/plugin.rb +8 -15
- data/lib/terraspace/cli/new/test.rb +1 -1
- data/lib/terraspace/cli/new.rb +17 -13
- data/lib/terraspace/cli/plan.rb +13 -0
- data/lib/terraspace/cli/setup/check.rb +8 -0
- data/lib/terraspace/cli/up.rb +8 -12
- data/lib/terraspace/cli.rb +2 -2
- data/lib/terraspace/cloud/api/cani.rb +30 -0
- data/lib/terraspace/cloud/api/concern/errors.rb +12 -0
- data/lib/terraspace/cloud/api/concern/record.rb +18 -0
- data/lib/terraspace/cloud/api/concern.rb +38 -0
- data/lib/terraspace/cloud/api/http_methods.rb +116 -0
- data/lib/terraspace/cloud/api/validate.rb +24 -0
- data/lib/terraspace/cloud/api.rb +33 -0
- data/lib/terraspace/cloud/base.rb +97 -0
- data/lib/terraspace/cloud/ci/generic.rb +25 -0
- data/lib/terraspace/cloud/ci/manual.rb +81 -0
- data/lib/terraspace/cloud/ci/vcs/base.rb +36 -0
- data/lib/terraspace/cloud/ci/vcs/bitbucket.rb +11 -0
- data/lib/terraspace/cloud/ci/vcs/github.rb +11 -0
- data/lib/terraspace/cloud/ci/vcs/gitlab.rb +11 -0
- data/lib/terraspace/cloud/ci/vcs.rb +18 -0
- data/lib/terraspace/cloud/ci.rb +56 -0
- data/lib/terraspace/cloud/context.rb +14 -0
- data/lib/terraspace/cloud/folder/base.rb +17 -0
- data/lib/terraspace/cloud/folder/package.rb +33 -0
- data/lib/terraspace/cloud/folder/tidy.rb +54 -0
- data/lib/terraspace/cloud/folder/uploader.rb +37 -0
- data/lib/terraspace/cloud/folder.rb +11 -0
- data/lib/terraspace/cloud/plan.rb +47 -0
- data/lib/terraspace/cloud/update.rb +37 -0
- data/lib/terraspace/command.rb +16 -1
- data/lib/terraspace/compiler/dsl/syntax/mod.rb +2 -2
- data/lib/terraspace/compiler/dsl/syntax/tfvar.rb +1 -1
- data/lib/terraspace/compiler/expander/backend.rb +1 -1
- data/lib/terraspace/compiler/expander.rb +1 -1
- data/lib/terraspace/compiler/strategy/tfvar/layer.rb +56 -29
- data/lib/terraspace/core.rb +36 -3
- data/lib/terraspace/ext/core/module.rb +9 -4
- data/lib/terraspace/hooks/builder.rb +1 -1
- data/lib/terraspace/logger.rb +32 -5
- data/lib/terraspace/mod.rb +21 -9
- data/lib/terraspace/plugin/expander/interface.rb +15 -11
- data/lib/terraspace/plugin.rb +14 -5
- data/lib/terraspace/shell.rb +7 -2
- data/lib/terraspace/terraform/args/thor.rb +8 -2
- data/lib/terraspace/terraform/ihooks/after/apply.rb +8 -0
- data/lib/terraspace/terraform/ihooks/after/destroy.rb +8 -0
- data/lib/terraspace/terraform/ihooks/after/plan.rb +31 -2
- data/lib/terraspace/terraform/ihooks/base.rb +7 -3
- data/lib/terraspace/terraform/ihooks/before/apply.rb +8 -0
- data/lib/terraspace/terraform/ihooks/before/destroy.rb +8 -0
- data/lib/terraspace/terraform/ihooks/before/plan.rb +11 -3
- data/lib/terraspace/terraform/runner.rb +19 -5
- data/lib/terraspace/version.rb +1 -1
- data/lib/terraspace.rb +2 -0
- data/terraspace.gemspec +1 -0
- metadata +116 -52
- data/.pipedream/schedule.rb +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e2e48b2824f50628986b242f0d8f751795b755f54ae1cf3cda72bf7ff2447807
|
|
4
|
+
data.tar.gz: cdaec82517675a111b57f15ef081f930bc4f4712003109452dda9c79222b2ee5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6cc7d06b5e877b2ff3a5dccf2a19c1a94028ed34f83ce8067600c1b6a0e1ba9b3a1dd27d558a7a3d6916af346b09a7eb5248536b4afc162e4268862a484b710f
|
|
7
|
+
data.tar.gz: c4293d7b1b496ea38c839113c1845d95552d11da8b041ff115ae1ecaab3b11e659a4e7f906b7b704150144ac70e48faa689e35cb75642b583db7e19a3c36ff79
|
|
File without changes
|
data/.cody/all/project.rb
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
github("boltops-tools/terraspace")
|
|
2
|
+
image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
|
|
3
|
+
env_vars(
|
|
4
|
+
TS_ORG: "qa",
|
|
5
|
+
TS_TOKEN: "ssm:/#{Cody.env}/TS_TOKEN",
|
|
6
|
+
)
|
data/.cody/aws/bin/build.sh
CHANGED
|
@@ -10,6 +10,11 @@ export PATH=~/bin:$PATH # ~/bin/terraspace wrapper
|
|
|
10
10
|
set -x
|
|
11
11
|
terraspace new project infra --examples
|
|
12
12
|
cd infra
|
|
13
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
14
|
+
|
|
13
15
|
terraspace new test demo --type stack
|
|
14
16
|
cd app/stacks/demo
|
|
17
|
+
cd test
|
|
18
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
19
|
+
cd -
|
|
15
20
|
terraspace test
|
|
File without changes
|
data/.cody/aws/project.rb
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
github("boltops-tools/terraspace")
|
|
2
|
+
image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
|
|
3
|
+
env_vars(
|
|
4
|
+
TS_ORG: "qa",
|
|
5
|
+
TS_TOKEN: "ssm:/#{Cody.env}/TS_TOKEN",
|
|
6
|
+
)
|
data/.cody/azurerm/bin/build.sh
CHANGED
|
@@ -17,6 +17,11 @@ export ARM_TENANT_ID=$(cat ~/.azure/app-client.json | jq -r '.tenant_id')
|
|
|
17
17
|
set -x
|
|
18
18
|
terraspace new project infra --examples --plugin azurerm
|
|
19
19
|
cd infra
|
|
20
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
21
|
+
|
|
20
22
|
terraspace new test demo --type stack
|
|
21
23
|
cd app/stacks/demo
|
|
24
|
+
cd test
|
|
25
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
26
|
+
cd -
|
|
22
27
|
terraspace test
|
|
File without changes
|
data/.cody/azurerm/project.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
github("boltops-tools/terraspace")
|
|
2
|
+
image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
|
|
3
|
+
env_vars(
|
|
4
4
|
# Used by .cody/azurerm/bin/az/configure.sh
|
|
5
5
|
AZURE_APP_CLIENT_JSON: ssm("/terraspace/#{Cody.env}/azure_app_client_json"),
|
|
6
|
+
TS_ORG: "qa",
|
|
7
|
+
TS_TOKEN: "ssm:/#{Cody.env}/TS_TOKEN",
|
|
6
8
|
)
|
data/.cody/google/bin/build.sh
CHANGED
|
@@ -14,6 +14,11 @@ export GOOGLE_PROJECT=$(cat $GOOGLE_APPLICATION_CREDENTIALS | jq -r '.project_id
|
|
|
14
14
|
set -x
|
|
15
15
|
terraspace new project infra --examples --plugin google
|
|
16
16
|
cd infra
|
|
17
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
18
|
+
|
|
17
19
|
terraspace new test demo --type stack
|
|
18
20
|
cd app/stacks/demo
|
|
21
|
+
cd test
|
|
22
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
23
|
+
cd -
|
|
19
24
|
terraspace test
|
|
File without changes
|
data/.cody/google/project.rb
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
github("boltops-tools/terraspace")
|
|
2
|
+
image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
|
|
3
|
+
env_vars(
|
|
4
4
|
# Used by .cody/google/bin/gcloud/configure.sh
|
|
5
5
|
GOOGLE_CREDS_JSON: ssm("/terraspace/#{Cody.env}/google_creds_json"),
|
|
6
|
+
TS_ORG: "qa",
|
|
7
|
+
TS_TOKEN: "ssm:/#{Cody.env}/TS_TOKEN",
|
|
6
8
|
)
|
data/.cody/none/bin/build.sh
CHANGED
|
@@ -10,6 +10,11 @@ export PATH=~/bin:$PATH # ~/bin/terraspace wrapper
|
|
|
10
10
|
set -x
|
|
11
11
|
terraspace new project infra --plugin none --examples
|
|
12
12
|
cd infra
|
|
13
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
14
|
+
|
|
13
15
|
terraspace new test demo --type stack
|
|
14
16
|
cd app/stacks/demo
|
|
17
|
+
cd test
|
|
18
|
+
$CODEBUILD_SRC_DIR/.cody/shared/script/update/gemfile.sh
|
|
19
|
+
cd -
|
|
15
20
|
terraspace test
|
|
File without changes
|
data/.cody/none/project.rb
CHANGED
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
github("boltops-tools/terraspace")
|
|
2
|
+
image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
|
|
3
|
+
env_vars(
|
|
4
|
+
TS_ORG: "qa",
|
|
5
|
+
TS_TOKEN: "ssm:/#{Cody.env}/TS_TOKEN",
|
|
6
|
+
)
|
data/.cody/unit/project.rb
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
github("boltops-tools/terraspace")
|
|
2
|
+
image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
|
data/.gitignore
CHANGED
data/.pipedream/pipeline.rb
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
stage "Source" do
|
|
2
2
|
github(
|
|
3
|
-
|
|
4
|
-
#
|
|
5
|
-
|
|
3
|
+
Source: "boltops-tools/terraspace",
|
|
4
|
+
# Branch: "master", # branch defaults to "master" or the `pipe deploy --branch` option
|
|
5
|
+
AuthToken: ssm("/github/boltopsbot/token")
|
|
6
6
|
)
|
|
7
7
|
end
|
|
8
8
|
|
data/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,30 @@
|
|
|
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.0] - 2022-06-10
|
|
7
|
+
* Terraspace Cloud Support
|
|
8
|
+
|
|
9
|
+
Highlights:
|
|
10
|
+
* Record updates to Terraspace Cloud API
|
|
11
|
+
* CI plugin support
|
|
12
|
+
* CI plugin generator
|
|
13
|
+
* VCS manual support in core for github, gitlab, bitbucket
|
|
14
|
+
|
|
15
|
+
More:
|
|
16
|
+
* Backend expander variables handle env vars in general
|
|
17
|
+
* Remove config.build.cache_root option
|
|
18
|
+
* Clean up Terraspace::Plugin.autodetect
|
|
19
|
+
* cloud.record = "changes". dont create cloud record when no changes
|
|
20
|
+
* ci generic
|
|
21
|
+
* edge case TS_ENV=''
|
|
22
|
+
* .cody/cloud test
|
|
23
|
+
* cloud warning message when TS_TOKEN is confiugred but cloud is not yet
|
|
24
|
+
* API expodential retry logic
|
|
25
|
+
* plugin autodetect cleanup
|
|
26
|
+
* TS_EXTRA in favor of instance option, deprecate instance option
|
|
27
|
+
* handle ctrl-c
|
|
28
|
+
* improve acceptannce codebuild scripts
|
|
29
|
+
|
|
6
30
|
## [1.1.7] - 2022-02-22
|
|
7
31
|
- [#215](https://github.com/boltops-tools/terraspace/pull/215) fix all down by building child nodes
|
|
8
32
|
- [#216](https://github.com/boltops-tools/terraspace/pull/216) add codebuild project with acceptance test for terraspace all
|
data/exe/terraspace
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
# Docs: https://terraspace.cloud/docs/config/reference/
|
|
2
2
|
Terraspace.configure do |config|
|
|
3
3
|
config.logger.level = :info
|
|
4
|
+
|
|
5
|
+
# config.cloud.org = "ORG" # replace with your org. only letters, numbers, underscore and dashes allowed
|
|
6
|
+
# config.cloud.project = "main" # optional. main is the default project name. only letters, numbers, underscore and dashes allowed
|
|
4
7
|
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/<%= gem_name %>/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "<%= gem_name %>"
|
|
7
|
+
spec.version = <%= gem_class_name %>::VERSION
|
|
8
|
+
spec.authors = ["Author Name"]
|
|
9
|
+
spec.email = ["example@email.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "Terraspace CI <%= name %> support"
|
|
12
|
+
spec.homepage = "https://github.com/ORG/<%= gem_name %>"
|
|
13
|
+
spec.license = "MIT"
|
|
14
|
+
spec.required_ruby_version = ">= 2.6.0"
|
|
15
|
+
|
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
|
+
spec.metadata["source_code_uri"] = "https://github.com/ORG/<%= gem_name %>"
|
|
18
|
+
spec.metadata["changelog_uri"] = "https://github.com/ORG/<%= gem_name %>/blob/master/CHANGELOG.md"
|
|
19
|
+
|
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
22
|
+
spec.files = Dir.chdir(__dir__) do
|
|
23
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
24
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
spec.bindir = "exe"
|
|
28
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
29
|
+
spec.require_paths = ["lib"]
|
|
30
|
+
|
|
31
|
+
spec.add_dependency "zeitwerk"
|
|
32
|
+
end
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# <%= gem_name %>
|
|
2
|
+
|
|
3
|
+
Provides Terraspace CI support for <%= name %>.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
Add gem to your Terraspace project
|
|
8
|
+
|
|
9
|
+
Gemfile
|
|
10
|
+
|
|
11
|
+
gem <%= gem_name %>
|
|
12
|
+
|
|
13
|
+
Then to install run
|
|
14
|
+
|
|
15
|
+
bundle
|
|
16
|
+
|
|
17
|
+
## Contributing
|
|
18
|
+
|
|
19
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ORG/<%= gem_name %>/
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
require "zeitwerk"
|
|
2
|
+
|
|
3
|
+
module <%= gem_class_name %>
|
|
4
|
+
class Autoloader
|
|
5
|
+
class Inflector < Zeitwerk::Inflector
|
|
6
|
+
def camelize(basename, _abspath)
|
|
7
|
+
map = { version: "VERSION" }
|
|
8
|
+
map[basename.to_sym] || super
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
class << self
|
|
13
|
+
def setup
|
|
14
|
+
loader = Zeitwerk::Loader.new
|
|
15
|
+
loader.inflector = Inflector.new
|
|
16
|
+
loader.push_dir(File.dirname(__dir__)) # lib
|
|
17
|
+
loader.log! if ENV["<%= gem_name.underscore.upcase %>_AUTOLOAD_LOG"]
|
|
18
|
+
loader.setup
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module <%= gem_class_name %>
|
|
2
|
+
class Pr
|
|
3
|
+
# Implement this method.
|
|
4
|
+
# Method should update existing comment instead of always creating new comment.
|
|
5
|
+
# Otherwise it gets noisy.
|
|
6
|
+
# Remember to also uncomment out the definition in
|
|
7
|
+
#
|
|
8
|
+
# <%= gem_class_name %>::Interface#comment(url)
|
|
9
|
+
#
|
|
10
|
+
# If CI system does not support PRs and comments. Can delete this class entirely.
|
|
11
|
+
#
|
|
12
|
+
def comment(url)
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
module <%= gem_class_name %>
|
|
2
|
+
class Vars
|
|
3
|
+
# Interface method. Hash of properties to be stored
|
|
4
|
+
# Usually available from env vars.
|
|
5
|
+
# Provide as many CI system as possible.
|
|
6
|
+
def data
|
|
7
|
+
{
|
|
8
|
+
build_system: "REPLACE_ME",
|
|
9
|
+
host: ENV['REPLACE_ME'],
|
|
10
|
+
full_repo: ENV['REPLACE_ME'],
|
|
11
|
+
branch_name: ENV['REPLACE_ME'],
|
|
12
|
+
# urls
|
|
13
|
+
pr_url: ENV['REPLACE_ME'],
|
|
14
|
+
build_url: ENV['REPLACE_ME'],
|
|
15
|
+
# additional properties
|
|
16
|
+
build_type: ENV['REPLACE_ME'],
|
|
17
|
+
pr_number: ENV['REPLACE_ME'],
|
|
18
|
+
sha: ENV['REPLACE_ME'],
|
|
19
|
+
# additional properties
|
|
20
|
+
commit_message: ENV['REPLACE_ME'],
|
|
21
|
+
build_id: ENV['REPLACE_ME'],
|
|
22
|
+
build_number: ENV['REPLACE_ME'],
|
|
23
|
+
}
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "<%= gem_name %>/autoloader"
|
|
4
|
+
<%= gem_class_name %>::Autoloader.setup
|
|
5
|
+
|
|
6
|
+
require "json"
|
|
7
|
+
|
|
8
|
+
module <%= gem_class_name %>
|
|
9
|
+
class Error < StandardError; end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
Terraspace::Cloud::Ci.register(
|
|
13
|
+
name: "<%= name %>",
|
|
14
|
+
env_key: "<%= name.upcase %>", # IMPORTANT: Env var used for CI detection. Probably have to change.
|
|
15
|
+
root: __dir__,
|
|
16
|
+
# exe: "bin", # terraspace new ci NAME generator will make files in this folder executable
|
|
17
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "<%= gem_name %>"
|
|
4
|
+
|
|
5
|
+
RSpec.configure do |config|
|
|
6
|
+
# Enable flags like --only-failures and --next-failure
|
|
7
|
+
config.example_status_persistence_file_path = ".rspec_status"
|
|
8
|
+
|
|
9
|
+
# Disable RSpec exposing methods globally on `Module` and `main`
|
|
10
|
+
config.disable_monkey_patching!
|
|
11
|
+
|
|
12
|
+
config.expect_with :rspec do |c|
|
|
13
|
+
c.syntax = :expect
|
|
14
|
+
end
|
|
15
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/templates/hcl/project/config/terraform/backend.tf.tt
RENAMED
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/templates/hcl/project/config/terraform/provider.tf
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/templates/ruby/project/config/terraform/backend.rb.tt
RENAMED
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/templates/ruby/project/config/terraform/provider.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/main_spec.rb
RENAMED
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/templates/test/rspec/module/test/spec/spec_helper.rb
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/interfaces/backend.rb.tt
RENAMED
|
File without changes
|
|
File without changes
|
data/lib/templates/plugin/{lib → core/lib}/terraspace_plugin_%name%/interfaces/expander.rb.tt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|