Skip to content

Commit

Permalink
DSOS-2871: stop automated nomis ami builds (#810)
Browse files Browse the repository at this point in the history
* DSOS-2871: make schedule build optional

* remove scheduled pipeline

* fix
  • Loading branch information
drobinson-moj authored Jun 20, 2024
1 parent da1abeb commit 95fa976
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 21 deletions.
9 changes: 6 additions & 3 deletions modules/imagebuilder/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,11 @@ resource "aws_imagebuilder_image_pipeline" "this" {
image_tests_configuration {
image_tests_enabled = false
}
schedule {
schedule_expression = var.image_pipeline.schedule.schedule_expression
pipeline_execution_start_condition = var.image_pipeline.schedule.pipeline_execution_start_condition
dynamic "schedule" {
for_each = var.image_pipeline.schedule != null ? [var.image_pipeline.schedule] : []
content {
schedule_expression = schedule.value.schedule_expression
pipeline_execution_start_condition = schedule.value.pipeline_execution_start_condition
}
}
}
8 changes: 5 additions & 3 deletions modules/imagebuilder/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,17 @@ variable "systems_manager_agent" {

variable "image_pipeline" {
type = object({
schedule = object({
schedule = optional(object({
schedule_expression = string
pipeline_execution_start_condition = string
})
}))
})
description = "Pipeline configuration, see aws_imagebuilder_image_pipeline documentation for details on the parameters"
default = {
schedule = null
}
}


variable "launch_permission_account_names" {
type = list(string)
description = "List of accounts that can launch the image"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
region = "eu-west-2"
ami_name_prefix = "nomis"
ami_base_name = "rhel_6_10_weblogic_appserver_10_3"
configuration_version = "0.2.15"
configuration_version = "0.2.16"
release_or_patch = "release" # or "patch", see nomis AMI image building strategy doc
description = "nomis rhel 6.10 weblogic appserver image"

Expand Down Expand Up @@ -51,10 +51,6 @@ infrastructure_configuration = {
}

image_pipeline = {
schedule = {
schedule_expression = "cron(0 0 2 * ? *)"
pipeline_execution_start_condition = "EXPRESSION_MATCH_ONLY"
}
}

launch_template_exists = false
Expand Down
6 changes: 1 addition & 5 deletions teams/nomis/rhel_7_9_oracledb_11_2/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
region = "eu-west-2"
ami_name_prefix = "nomis"
ami_base_name = "rhel_7_9_oracledb_11_2"
configuration_version = "0.4.8"
configuration_version = "0.4.9"
release_or_patch = "release" # or "patch", see nomis AMI image building strategy doc
description = "nomis rhel 7.9 oracleDB 11.2 image"

Expand Down Expand Up @@ -91,10 +91,6 @@ infrastructure_configuration = {
}

image_pipeline = {
schedule = {
schedule_expression = "cron(0 0 2 * ? *)"
pipeline_execution_start_condition = "EXPRESSION_MATCH_ONLY"
}
}

accounts_to_distribute_ami_by_branch = {
Expand Down
6 changes: 1 addition & 5 deletions teams/nomis/rhel_7_9_weblogic_xtag_10_3/terraform.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
region = "eu-west-2"
ami_name_prefix = "nomis"
ami_base_name = "rhel_7_9_weblogic_xtag_10_3"
configuration_version = "0.0.8"
configuration_version = "0.0.9"
release_or_patch = "release" # or "patch", see nomis AMI image building strategy doc
description = "nomis rhel 7.9 weblogic XTAG image"

Expand Down Expand Up @@ -47,10 +47,6 @@ infrastructure_configuration = {
}

image_pipeline = {
schedule = {
schedule_expression = "cron(0 0 2 * ? *)"
pipeline_execution_start_condition = "EXPRESSION_MATCH_ONLY"
}
}

launch_template_exists = false
Expand Down

0 comments on commit 95fa976

Please sign in to comment.