Просмотр исходного кода

Merge pull request #373 from mdr-engineering/feature/ftd_MSOCI-2002_AllowSubmodules

Adds submodule support in code generator projects
Frederick Damstra 3 лет назад
Родитель
Сommit
6a78384995

+ 2 - 1
base/codebuild_ecr_project/main.tf

@@ -15,8 +15,9 @@ resource "aws_codebuild_project" "this_no_artifact" {
     type                = "GITHUB_ENTERPRISE"
     location            = data.github_repository.this.http_clone_url
     report_build_status = true
+    git_clone_depth     = 1
     git_submodules_config {
-      fetch_submodules = false
+      fetch_submodules = var.fetch_submodules
     }
   }
 

+ 6 - 0
base/codebuild_ecr_project/vars.tf

@@ -4,6 +4,12 @@ variable "tags" {
   default     = { }
 }
 
+variable "fetch_submodules" {
+  description = "Fetch submodules for git?"
+  type = bool
+  default = false
+}
+
 variable "source_version" {
   description = "Tag or branch for the git repository."
   type = string

+ 4 - 0
base/codebuild_splunk_apps/main.tf

@@ -18,6 +18,10 @@ resource "aws_codebuild_project" "this" {
     location            = data.github_repository.this.http_clone_url
     report_build_status = true
     git_clone_depth     = 1
+
+    git_submodules_config {
+      fetch_submodules = true
+    }
   }
 
   source_version = var.source_version