From 2acebc07c4238b7140a3e7d0d3276b904d3b0626 Mon Sep 17 00:00:00 2001 From: Sleep Kuntz Date: Fri, 20 Nov 2026 08:28:18 -0600 Subject: [PATCH 1/5] Add initial buildspec file to run imgproxy build in codebuild --- buildspec.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 buildspec.yml diff --git a/buildspec.yml b/buildspec.yml new file mode 100644 index 0000000000..569f07ac28 --- /dev/null +++ b/buildspec.yml @@ -0,0 +1,15 @@ +version: 0.2 + +phases: + + pre_build: + commands: + - echo "Logging into Amazon ECR" + - aws ecr get-login-password --region $AWS_REGION | docker login --username AWS --password-stdin 452499883540.dkr.ecr.$AWS_REGION.amazonaws.com + - echo "Logging into DockerHub" + - docker login --username $DOCKER_HUB_USERNAME --password $DOCKER_HUB_PASSWORD + + build: + commands: + - echo "Building imgproxy started on $(date)" + - ./pushd_build.sh From 4b8178fbc1e32787cc0855f69a682ed255d32fe2 Mon Sep 17 00:00:00 2001 From: Sleep Kuntz Date: Fri, 20 Nov 2026 08:36:38 -0600 Subject: [PATCH 2/5] fetch aws account id automatically --- pushd_build.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/pushd_build.sh b/pushd_build.sh index 492d40975e..c8d596ae94 100755 --- a/pushd_build.sh +++ b/pushd_build.sh @@ -1,5 +1,10 @@ #!/bin/bash -xe # This script is for building and pushing to pushd ECR docker repo. +# # get aws account id from sts if not set +if [[ "${AWS_ACCOUNT_ID}x" == "x" ]]; then + AWS_ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) +fi + docker buildx build --platform linux/amd64 -t $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/pushd/imgproxy:$(git rev-parse HEAD) -f docker/Dockerfile . -docker push $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/pushd/imgproxy:$(git rev-parse HEAD) \ No newline at end of file +# docker push $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/pushd/imgproxy:$(git rev-parse HEAD) From 1583fdcabaab045189a8a562452ae8bcb1c499f2 Mon Sep 17 00:00:00 2001 From: Sleep Kuntz Date: Fri, 20 Nov 2026 08:57:13 -0600 Subject: [PATCH 3/5] didn't mean to remove the push, that was just for local testing --- pushd_build.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pushd_build.sh b/pushd_build.sh index c8d596ae94..93eb597b6a 100755 --- a/pushd_build.sh +++ b/pushd_build.sh @@ -7,4 +7,4 @@ if [[ "${AWS_ACCOUNT_ID}x" == "x" ]]; then fi docker buildx build --platform linux/amd64 -t $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/pushd/imgproxy:$(git rev-parse HEAD) -f docker/Dockerfile . -# docker push $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/pushd/imgproxy:$(git rev-parse HEAD) +docker push $AWS_ACCOUNT_ID.dkr.ecr.us-east-1.amazonaws.com/pushd/imgproxy:$(git rev-parse HEAD) From 0f776a558a4c2674d3abebfcb6fe01ab1c9898a2 Mon Sep 17 00:00:00 2001 From: Sleep Kuntz Date: Fri, 20 Nov 2026 09:33:45 -0600 Subject: [PATCH 4/5] configure submodule support properly for codebuild --- buildspec.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/buildspec.yml b/buildspec.yml index 569f07ac28..e97a7d1d8c 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -11,5 +11,14 @@ phases: build: commands: + - echo "init submodules to add to git config" + - git submodule init + + - echo "Configure submodule to pull with http" + - git config submodule.plugins/pushd-dither.url "https://github/com/pushd/pushd-dither.git" + + - echo "Fetch submodule source" + - git submodule update + - echo "Building imgproxy started on $(date)" - ./pushd_build.sh From 6fc9f3fae4d914ec0d4fc0da5fbc0c0b7bb556e3 Mon Sep 17 00:00:00 2001 From: Sleep Kuntz Date: Fri, 20 Nov 2026 09:36:17 -0600 Subject: [PATCH 5/5] spelling error --- buildspec.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildspec.yml b/buildspec.yml index e97a7d1d8c..e28c343070 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -15,7 +15,7 @@ phases: - git submodule init - echo "Configure submodule to pull with http" - - git config submodule.plugins/pushd-dither.url "https://github/com/pushd/pushd-dither.git" + - git config submodule.plugins/pushd-dither.url "https://github.com/pushd/pushd-dither.git" - echo "Fetch submodule source" - git submodule update