Skip to content

Commit 85e708b

Browse files
update buildspec defs
1 parent 23d5bd9 commit 85e708b

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# ECR and base image configuration - extracted from CodeBuild environment
44
ARG ECR_ACCOUNT_ID=0123456789012
55
ARG ECR_REGION=us-east-1
6-
ARG BASE_IMAGE_NAME=civis-ubuntu-fips
6+
ARG BASE_IMAGE_NAME=docker-linuxserver-ubuntu-fips
77
ARG BASE_IMAGE_TAG=22.04
88
ARG ECR_URI=${ECR_ACCOUNT_ID}.dkr.ecr-fips.${ECR_REGION}.amazonaws.com/${BASE_IMAGE_NAME}:${BASE_IMAGE_TAG}
99

buildspec/merge_master.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ phases:
33
pre_build:
44
commands:
55
- export DOCKER_BUILDKIT=1
6-
- echo Logging in to Amazon ECR...
7-
- aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${FIPS_REPOSITORY_URI}
86
- export ECR_ACCOUNT_ID="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f1)"
97
- export ECR_REGION="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f4)"
108
build:
119
commands:
10+
- echo Logging in to Amazon ECR...
11+
- aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${FIPS_REPOSITORY_URI}
1212
- echo Building the Docker image...
1313
- docker build --build-arg ECR_ACCOUNT_ID=${ECR_ACCOUNT_ID} --build-arg ECR_REGION=${ECR_REGION} -t ${FIPS_REPOSITORY_URI}:latest .
1414
- docker image push --all-tags ${FIPS_REPOSITORY_URI}

buildspec/push.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ phases:
33
pre_build:
44
commands:
55
- export DOCKER_BUILDKIT=1
6+
- export ECR_ACCOUNT_ID="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f1)"
7+
- export ECR_REGION="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f4)"
68
build:
79
commands:
810
- echo Logging in to Amazon ECR...
911
- aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${FIPS_REPOSITORY_URI}
1012
- export COMMIT_HASH_SHORT="$(echo $COMMIT_HASH | cut -c 1-7)"
11-
- export ECR_ACCOUNT_ID="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f1)"
12-
- export ECR_REGION="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f4)"
1313
- echo Building the Docker image...
1414
- echo $COMMIT_HASH_SHORT
1515
- echo $BRANCH_NAME

buildspec/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ phases:
44
pre_build:
55
commands:
66
- export DOCKER_BUILDKIT=1
7+
- export ECR_ACCOUNT_ID="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f1)"
8+
- export ECR_REGION="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f4)"
79
build:
810
commands:
911
- echo Logging in to Amazon ECR...
1012
- aws ecr get-login-password --region ${AWS_DEFAULT_REGION} | docker login --username AWS --password-stdin ${FIPS_REPOSITORY_URI}
11-
- export ECR_ACCOUNT_ID="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f1)"
12-
- export ECR_REGION="$(echo $FIPS_REPOSITORY_URI | cut -d'.' -f4)"
1313
- PATCH_TAG=${TAG_NAME#"v"}
1414
- MINOR_TAG=${PATCH_TAG%.*}
1515
- MAJOR_TAG=${MINOR_TAG%.*}

0 commit comments

Comments
 (0)