Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add codebuild project with acceptance test for terraspace all #216

Merged
merged 1 commit into from
Feb 22, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .cody/all/bin/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

set -eu

# will build from /tmp because terraspace/Gemfile may interfere
cd /tmp

export PATH=~/bin:$PATH # ~/bin/terraspace wrapper

set -x

git clone https://github.com/boltops-tools/terraspace-graph-demo
cd terraspace-graph-demo

# Rewrite the Gemfile to use the local terraspace gem for testing
cat << EOF > Gemfile
source "https://rubygems.org"
gem "terraspace", path: "$CODEBUILD_SRC_DIR", submodules: true
gem "rspec-terraspace", git: "https://github.com/boltops-tools/rspec-terraspace", branch: "master"
gem "terraspace_plugin_aws", git: "https://github.com/boltops-tools/terraspace_plugin_aws", branch: "master"
EOF
bundle

# Uncomment to enable logger level debug
# cat << EOF > config/app.rb
# Terraspace.configure do |config|
# config.logger.level = :debug
# end
# EOF

terraspace all up -y
terraspace clean all -y
terraspace all down -y
10 changes: 10 additions & 0 deletions .cody/all/buildspec.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: 0.2

phases:
install:
runtime-versions:
ruby: latest
build:
commands:
- .cody/shared/script/install.sh
- .cody/all/bin/build.sh
2 changes: 2 additions & 0 deletions .cody/all/project.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github_url("https://github.com/boltops-tools/terraspace.git")
linux_image("aws/codebuild/amazonlinux2-x86_64-standard:3.0")
6 changes: 6 additions & 0 deletions .cody/all/role.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
iam_policy(
"dynamodb",
"logs",
"s3",
"ssm",
)
1 change: 1 addition & 0 deletions .pipedream/pipeline.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
stage "Build" do
# in parallel
codebuild(
"terraspace-all",
"terraspace-aws",
"terraspace-azurerm",
"terraspace-google",
Expand Down