Browse Source

MSOCI-2078 support for UF config-RPM builds

Duane Waddle 3 years ago
parent
commit
9ff8f8fa74
2 changed files with 18 additions and 7 deletions
  1. 7 6
      base/codebuild_artifact/main.tf
  2. 11 1
      base/codebuild_artifact/vars.tf

+ 7 - 6
base/codebuild_artifact/main.tf

@@ -24,12 +24,13 @@ resource "aws_codebuild_project" "this" {
   }
 
   artifacts {
-    type                = "S3"
-    location            = var.artifact_s3_bucket
-    name                = "/"
-    path                = var.name
-    namespace_type      = "BUILD_ID"
-    packaging           = "NONE"
+    type                   = "S3"
+    location               = var.artifact_s3_bucket
+    name                   = "/"
+    path                   = var.name
+    namespace_type         = var.artifact_namespace_type
+    override_artifact_name = var.override_artifact_name
+    packaging              = "NONE"
   }
 
   tags = merge(var.standard_tags, var.tags)

+ 11 - 1
base/codebuild_artifact/vars.tf

@@ -13,6 +13,16 @@ variable "service_role" { type = string }
 variable "artifact_s3_bucket" { type = string }
 variable "codebuild_image" {type = string }
 
+variable "artifact_namespace_type" {
+    type = string
+    default = "BUILD_ID"
+}
+
+variable "override_artifact_name" {
+    type = bool
+    default = false
+}
+
 variable "kms_key" {
     type = string
     default = ""
@@ -26,4 +36,4 @@ variable "badge_enabled" {
 variable "webhook_branch_filter" {
     type = string
     default = "^(master|develop)$"
-}
+}