Skip to content

Commit 1fc4bdb

Browse files
authored
Merge pull request #5 from rearc/mwkaufman/codebuild_image
Parameterize build_image and e2e_image
2 parents e4d31d0 + f52049f commit 1fc4bdb

File tree

2 files changed

+18
-6
lines changed

2 files changed

+18
-6
lines changed

codebuild.tf

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ resource "aws_codebuild_project" "build" {
2626

2727
environment {
2828
compute_type = "BUILD_GENERAL1_SMALL"
29-
image = "aws/codebuild/standard:2.0"
29+
image = var.build_image
3030
type = "LINUX_CONTAINER"
3131
image_pull_credentials_type = "CODEBUILD"
3232
privileged_mode = "true"
@@ -112,7 +112,7 @@ resource "aws_codebuild_project" "e2e_tests" {
112112

113113
environment {
114114
compute_type = "BUILD_GENERAL1_SMALL"
115-
image = "cypress/browsers:chrome69"
115+
image = var.e2e_image
116116
type = "LINUX_CONTAINER"
117117
image_pull_credentials_type = "CODEBUILD"
118118
privileged_mode = "true"
@@ -199,7 +199,7 @@ resource "aws_codebuild_project" "unit_tests" {
199199

200200
environment {
201201
compute_type = "BUILD_GENERAL1_SMALL"
202-
image = "aws/codebuild/standard:2.0"
202+
image = var.build_image
203203
type = "LINUX_CONTAINER"
204204
image_pull_credentials_type = "CODEBUILD"
205205
privileged_mode = "true"
@@ -286,7 +286,7 @@ resource "aws_codebuild_project" "publish" {
286286

287287
environment {
288288
compute_type = "BUILD_GENERAL1_SMALL"
289-
image = "aws/codebuild/standard:2.0"
289+
image = var.build_image
290290
type = "LINUX_CONTAINER"
291291
image_pull_credentials_type = "CODEBUILD"
292292
privileged_mode = "true"
@@ -373,7 +373,7 @@ resource "aws_codebuild_project" "db_migrate" {
373373

374374
environment {
375375
compute_type = "BUILD_GENERAL1_SMALL"
376-
image = "aws/codebuild/standard:2.0"
376+
image = var.build_image
377377
type = "LINUX_CONTAINER"
378378
image_pull_credentials_type = "CODEBUILD"
379379
privileged_mode = "true"
@@ -460,7 +460,7 @@ resource "aws_codebuild_project" "update_service" {
460460

461461
environment {
462462
compute_type = "BUILD_GENERAL1_SMALL"
463-
image = "aws/codebuild/standard:2.0"
463+
image = var.build_image
464464
type = "LINUX_CONTAINER"
465465
image_pull_credentials_type = "CODEBUILD"
466466
privileged_mode = "true"

variables.tf

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,4 +136,16 @@ variable "task_role_arn" {
136136
type = string
137137
description = "IAM role for task to run as"
138138
default = ""
139+
}
140+
141+
variable "build_image" {
142+
type = string
143+
default = "aws/codebuild/standard:3.0"
144+
description = "Docker image for build stages"
145+
}
146+
147+
variable "e2e_image" {
148+
type = string
149+
default = "cypress/browsers:chrome69"
150+
description = "Docker image for e2e stages"
139151
}

0 commit comments

Comments
 (0)