From 00ee51c4d7f686759d9c302b350fa9c6abf61777 Mon Sep 17 00:00:00 2001 From: Sergio Garcia <47090312+singiamtel@users.noreply.github.com> Date: Fri, 10 Jan 2025 17:28:41 +0100 Subject: [PATCH] Don't auto push on packer build (#277) --- .github/workflows/push-docker-image.yml | 1 + arm64-builder/packer.json | 5 ++++- centos7-alicerpms/packer.json | 6 +++++- cs8-builder/packer.json | 6 +++++- curator/packer.json | 6 +++++- docker-builder/packer.json | 6 +++++- elasticsearch/packer.json | 6 +++++- jenkins/packer.json | 6 +++++- marathon/packer.json | 6 +++++- power8-builder/packer.json | 6 +++++- publisher/packer.json | 6 +++++- riemann/packer.json | 6 +++++- rsync/packer.json | 6 +++++- slc7-builder/packer.json | 6 +++++- slc7-daq-builder/packer.json | 6 +++++- slc7-devtoolset/packer.json | 6 +++++- slc8-builder/packer.json | 6 +++++- slc8-gpu-builder/packer.json.old | 6 +++++- slc9-arm-builder/packer.json | 6 +++++- slc9-builder/packer.json | 6 +++++- slc9-gpu-builder/packer.json | 6 +++++- ubuntu1804-builder/packer.json | 6 +++++- ubuntu2004-builder/packer.json | 6 +++++- ubuntu2204-builder/packer.json | 6 +++++- ubuntu2404-builder/packer.json | 6 +++++- vault-gatekeeper/packer.json | 6 +++++- vault/packer.json | 6 +++++- workqueue-scheduler/packer.json | 6 +++++- 28 files changed, 135 insertions(+), 27 deletions(-) diff --git a/.github/workflows/push-docker-image.yml b/.github/workflows/push-docker-image.yml index bcb5e8e..d2ba9e9 100644 --- a/.github/workflows/push-docker-image.yml +++ b/.github/workflows/push-docker-image.yml @@ -71,3 +71,4 @@ jobs: fi packer validate packer.json packer build packer.json + docker push registry.cern.ch/alisw/${{ github.event.inputs.image-name }} diff --git a/arm64-builder/packer.json b/arm64-builder/packer.json index 25d54d8..2a772c2 100644 --- a/arm64-builder/packer.json +++ b/arm64-builder/packer.json @@ -33,7 +33,10 @@ "repository": "{{user `project`}}/arm64-builder", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } ] ] } diff --git a/centos7-alicerpms/packer.json b/centos7-alicerpms/packer.json index ebf305f..c4d5b12 100644 --- a/centos7-alicerpms/packer.json +++ b/centos7-alicerpms/packer.json @@ -29,7 +29,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/centos7", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/cs8-builder/packer.json b/cs8-builder/packer.json index 7d596d6..d678ae3 100644 --- a/cs8-builder/packer.json +++ b/cs8-builder/packer.json @@ -32,7 +32,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/curator/packer.json b/curator/packer.json index 24723ac..79f263f 100644 --- a/curator/packer.json +++ b/curator/packer.json @@ -34,7 +34,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/curator", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/docker-builder/packer.json b/docker-builder/packer.json index d950229..d992091 100644 --- a/docker-builder/packer.json +++ b/docker-builder/packer.json @@ -40,7 +40,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/docker-builder", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/elasticsearch/packer.json b/elasticsearch/packer.json index 9a24456..05e759d 100644 --- a/elasticsearch/packer.json +++ b/elasticsearch/packer.json @@ -26,7 +26,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/elasticsearch", "tag": "{{user `elasticsearch_version`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/jenkins/packer.json b/jenkins/packer.json index 0228fc5..06e1920 100644 --- a/jenkins/packer.json +++ b/jenkins/packer.json @@ -33,7 +33,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `jenkins_version`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/marathon/packer.json b/marathon/packer.json index 0561c8a..e0e0052 100644 --- a/marathon/packer.json +++ b/marathon/packer.json @@ -39,7 +39,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/marathon", "tag": "{{user `marathon_version`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/power8-builder/packer.json b/power8-builder/packer.json index a591a0b..368b662 100644 --- a/power8-builder/packer.json +++ b/power8-builder/packer.json @@ -34,7 +34,11 @@ "repository": "{{user `project`}}/power8-builder", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/publisher/packer.json b/publisher/packer.json index da8ddfc..95d9f78 100644 --- a/publisher/packer.json +++ b/publisher/packer.json @@ -28,7 +28,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/riemann/packer.json b/riemann/packer.json index 6564cff..a5e73e7 100644 --- a/riemann/packer.json +++ b/riemann/packer.json @@ -39,7 +39,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/riemann", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/rsync/packer.json b/rsync/packer.json index 993a0d8..6a21204 100644 --- a/rsync/packer.json +++ b/rsync/packer.json @@ -32,7 +32,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc7-builder/packer.json b/slc7-builder/packer.json index 63a8825..21f5ffe 100644 --- a/slc7-builder/packer.json +++ b/slc7-builder/packer.json @@ -34,7 +34,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc7-daq-builder/packer.json b/slc7-daq-builder/packer.json index 1faa30b..3de2549 100644 --- a/slc7-daq-builder/packer.json +++ b/slc7-daq-builder/packer.json @@ -23,7 +23,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/slc7-daq-builder", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc7-devtoolset/packer.json b/slc7-devtoolset/packer.json index 240c057..80c21e5 100644 --- a/slc7-devtoolset/packer.json +++ b/slc7-devtoolset/packer.json @@ -28,7 +28,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/slc7-devtoolset", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc8-builder/packer.json b/slc8-builder/packer.json index aca55b2..1dba8ce 100644 --- a/slc8-builder/packer.json +++ b/slc8-builder/packer.json @@ -32,7 +32,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc8-gpu-builder/packer.json.old b/slc8-gpu-builder/packer.json.old index fdcdc69..29a5b2e 100644 --- a/slc8-gpu-builder/packer.json.old +++ b/slc8-gpu-builder/packer.json.old @@ -57,7 +57,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc9-arm-builder/packer.json b/slc9-arm-builder/packer.json index 8d95a03..dbf1d10 100644 --- a/slc9-arm-builder/packer.json +++ b/slc9-arm-builder/packer.json @@ -33,7 +33,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/slc9-builder/packer.json b/slc9-builder/packer.json index 26302cf..12ef6e6 100644 --- a/slc9-builder/packer.json +++ b/slc9-builder/packer.json @@ -33,7 +33,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } ] ] } + diff --git a/slc9-gpu-builder/packer.json b/slc9-gpu-builder/packer.json index 01b45cd..1b8c952 100644 --- a/slc9-gpu-builder/packer.json +++ b/slc9-gpu-builder/packer.json @@ -52,7 +52,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/ubuntu1804-builder/packer.json b/ubuntu1804-builder/packer.json index 21d1f5b..ca72d6e 100644 --- a/ubuntu1804-builder/packer.json +++ b/ubuntu1804-builder/packer.json @@ -24,7 +24,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/ubuntu2004-builder/packer.json b/ubuntu2004-builder/packer.json index 2a3e005..2444594 100644 --- a/ubuntu2004-builder/packer.json +++ b/ubuntu2004-builder/packer.json @@ -24,7 +24,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/ubuntu2204-builder/packer.json b/ubuntu2204-builder/packer.json index bf76609..dd163b5 100644 --- a/ubuntu2204-builder/packer.json +++ b/ubuntu2204-builder/packer.json @@ -24,7 +24,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/ubuntu2404-builder/packer.json b/ubuntu2404-builder/packer.json index 6ad3a12..9d8f325 100644 --- a/ubuntu2404-builder/packer.json +++ b/ubuntu2404-builder/packer.json @@ -24,7 +24,11 @@ "repository": "{{user `REPO`}}", "tag": "{{user `TAG`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/vault-gatekeeper/packer.json b/vault-gatekeeper/packer.json index cb43415..8d30ddb 100644 --- a/vault-gatekeeper/packer.json +++ b/vault-gatekeeper/packer.json @@ -27,7 +27,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/vault-gatekeeper", "tag": "{{user `vault_gatekeeper_version`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/vault/packer.json b/vault/packer.json index f669926..f1c5030 100644 --- a/vault/packer.json +++ b/vault/packer.json @@ -36,7 +36,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/vault", "tag": "{{user `vault_version`}}" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] } diff --git a/workqueue-scheduler/packer.json b/workqueue-scheduler/packer.json index 185c74e..0904175 100644 --- a/workqueue-scheduler/packer.json +++ b/workqueue-scheduler/packer.json @@ -25,7 +25,11 @@ "repository": "{{user `DOCKER_HUB_REPO`}}/workqueue-scheduler", "tag": "latest" }, - "docker-push" + { + "type": "shell-local", + "inline": ["echo 'The image was built successfully. To push the image to the registry, you can run: docker push {{user `REPO`}}:{{user `TAG`}}'"] + } + ] ] }