CircleCI-Public / cimg-postgres

MIT License
8 stars 25 forks source link

Add Postgres 12.10 image #42

Closed blimmer closed 2 years ago

JalexChen commented 2 years ago

Hi @blimmer

Thanks for putting in the time to request this PR. Would you mind editing only the Dockerfile.template and use the gen-dockerfiles script to generate the resulting Dockerfiles and appropriate folders?

blimmer commented 2 years ago

@JalexChen - when I ran:

> ./shared/gen-dockerfiles.sh 12.10

it produced a diff that removed all the other files. Is that intentional?

diff --git a/build-images.sh b/build-images.sh
index 457a112..c4f21b5 100755
--- a/build-images.sh
+++ b/build-images.sh
@@ -1,14 +1,5 @@
 #!/usr/bin/env bash
+# Do not edit by hand; please use build scripts/templates to make changes

-docker build --file 9.6/Dockerfile -t cimg/postgres:9.6.24  -t cimg/postgres:9.6 .
-docker build --file 9.6/postgis/Dockerfile -t cimg/postgres:9.6.24-postgis  -t cimg/postgres:9.6-postgis .
-docker build --file 10.19/Dockerfile -t cimg/postgres:10.19 .
-docker build --file 10.19/postgis/Dockerfile -t cimg/postgres:10.19-postgis .
-docker build --file 11.4/Dockerfile -t cimg/postgres:11.4 .
-docker build --file 11.4/postgis/Dockerfile -t cimg/postgres:11.4-postgis .
-docker build --file 12.9/Dockerfile -t cimg/postgres:12.9 .
-docker build --file 12.9/postgis/Dockerfile -t cimg/postgres:12.9-postgis .
-docker build --file 13.5/Dockerfile -t cimg/postgres:13.5 .
-docker build --file 13.5/postgis/Dockerfile -t cimg/postgres:13.5-postgis .
-docker build --file 14.1/Dockerfile -t cimg/postgres:14.1 .
-docker build --file 14.1/postgis/Dockerfile -t cimg/postgres:14.1-postgis .
+docker build --file 12.10/Dockerfile -t cimg/postgres:12.10 .
+docker build --file 12.10/postgis/Dockerfile -t cimg/postgres:12.10-postgis .
diff --git a/push-images.sh b/push-images.sh
index 658d7ff..eba947f 100755
--- a/push-images.sh
+++ b/push-images.sh
@@ -1,21 +1,5 @@
 #!/usr/bin/env bash
+# Do not edit by hand; please use build scripts/templates to make changes

-docker push cimg/postgres:9.6.24
-docker push cimg/postgres:9.6
-docker push cimg/postgres:9.6.24-postgis
-docker push cimg/postgres:9.6-postgis
-
-docker push cimg/postgres:10.19
-docker push cimg/postgres:10.19-postgis
-
-docker push cimg/postgres:11.4
-docker push cimg/postgres:11.4-postgis
-
-docker push cimg/postgres:12.9
-docker push cimg/postgres:12.9-postgis
-
-docker push cimg/postgres:13.5
-docker push cimg/postgres:13.5-postgis
-
-docker push cimg/postgres:14.1
-docker push cimg/postgres:14.1-postgis
+docker push cimg/postgres:12.10
+docker push cimg/postgres:12.10-postgis
JalexChen commented 2 years ago

Hi @blimmer,

Yes, that is intentional. I've gone ahead and submitted a PR for the existing PRs that are adding versions since we would need to trigger the build on our end anyway, but in the future, the scripts that we have automate everything for every iteration.

I gave you somewhat incorrect information with the gen-dockerfiles.sh instructions when it should have been release.sh (which includes gen-dockerfiles.sh functionality).

In your specific instance, updating Dockerfile.template then running ./shared/release.sh 12.10 would generate new build and push images scripts (as you noticed) and create new dockerfiles within a new (or existing directory, per major/minor semver tags).

While this won't be validated through CircleCI, we can trigger this run again with the correct permissions to update and have you included as a contributor.

Additionally, this workflow is also documented in the README, if you'd like to take a look.

Appreciate you calling this to our attention and hope to see future contributions.

blimmer commented 2 years ago

Great - thanks! I'll close in favor of #43