Heavily inspired on Terragrunt Atlantis Configuration - This will read a Terragrunt-like directory layout and will parse an input template which should be a valid .gitlab-ci.yml
file.
This is very work in progress
> terragrunt-gitlab-cicd-config generate --help
Created GitLab CICD Dynamic configuration to be run as part of an external trigger. Use carefully
Usage:
terragrunt-atlantis-config generate [flags]
Flags:
--apply-requirements atlantis apply Requirements that must be satisfied before atlantis apply can be run. Currently the only supported requirements are `approved` and `mergeable`. Can be overridden by locals
--cascade-dependencies When true, dependencies will cascade, meaning that a module will be declared to depend not only on its dependencies, but all dependencies of its dependencies all the way down. Default is true (default true)
--environment root Name of the environment folder within root directory. Default is ""
-h, --help help for generate
--ignore-dependency-blocks dependency When true, dependencies found in dependency blocks will be ignored
--input string Path of the file where Go Template configuration will be inputted. Default is .gitlab-ci.yml
--output string Path of the file where configuration will be generated. Default is not to write to file (default ".gitlab-ci.yml")
--parallel Enables plans and applies to happen in parallel. Default is enabled (default true)
--root string Path to the root directory of the git repo you want to build config for. Default is current dir (default "/home/msoutullo/projects/iv/terragrunt-gitlab-cicd-config")
Global Flags:
-v, --verbosity string Log level (debug, info, warn, error, fatal, panic (default "info")
Using go get:
go get -u github.com/kitos9112/terragrunt-gitlab-cicd-config
Or download the binary from the releases page.
# Linux
curl -L https://github.com/kitos9112/terragrunt-gitlab-cicd-config/releases/download/1.0.3/terragrunt-gitlab-cicd-config_1.0.3_linux_x86_64.tar.gz | tar xz
# OS X
curl -L https://github.com/kitos9112/terragrunt-gitlab-cicd-config/releases/download/1.0.3/terragrunt-gitlab-cicd-config_1.0.3_osx_x86_64.tar.gz | tar xz
# Windows
curl -LO https://github.com/kitos9112/terragrunt-gitlab-cicd-config/releases/download/1.0.3/terragrunt-gitlab-cicd-config_1.0.3_windows_x86_64.zip
unzip terragrunt-gitlab-cicd-config_1.0.3_windows_x86_64.zip
terragrunt-gitlab-cicd-config [OPTIONS] [COMMAND [ARGS...]]
/bin/sh: terragrunt-gitlab-cicd-config: not found
WIP