From e38eb727066e96f79980c9ff794d6c7851d103ec Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Tue, 15 Aug 2023 16:22:39 -0400 Subject: [PATCH 1/3] Fully qualify image names --- images/manageiq-base-worker/Dockerfile | 2 +- images/manageiq-hotfix/Dockerfile | 4 +++- images/manageiq-orchestrator/Dockerfile | 2 +- images/manageiq-ui-worker/Dockerfile | 2 +- images/manageiq-webserver-worker/Dockerfile | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/images/manageiq-base-worker/Dockerfile b/images/manageiq-base-worker/Dockerfile index d8b8c8077..894ffd059 100644 --- a/images/manageiq-base-worker/Dockerfile +++ b/images/manageiq-base-worker/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM_REPO=manageiq +ARG FROM_REPO=docker.io/manageiq ARG FROM_TAG=latest-quinteros FROM ${FROM_REPO}/manageiq-base:${FROM_TAG} AS vddk diff --git a/images/manageiq-hotfix/Dockerfile b/images/manageiq-hotfix/Dockerfile index da776bb04..a765be1b0 100644 --- a/images/manageiq-hotfix/Dockerfile +++ b/images/manageiq-hotfix/Dockerfile @@ -1,4 +1,6 @@ -ARG FROM_IMAGE=docker.io/manageiq/manageiq-base:latest +ARG FROM_REPO=docker.io/manageiq +ARG FROM_TAG=latest +ARG FROM_IMAGE=${FROM_REPO}/manageiq-base:${FROM_TAG} FROM ${FROM_IMAGE} diff --git a/images/manageiq-orchestrator/Dockerfile b/images/manageiq-orchestrator/Dockerfile index d650515d4..38e8d1eae 100644 --- a/images/manageiq-orchestrator/Dockerfile +++ b/images/manageiq-orchestrator/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM_REPO=manageiq +ARG FROM_REPO=docker.io/manageiq ARG FROM_TAG=latest-quinteros FROM ${FROM_REPO}/manageiq-base:${FROM_TAG} diff --git a/images/manageiq-ui-worker/Dockerfile b/images/manageiq-ui-worker/Dockerfile index 0389d91da..bfb729819 100644 --- a/images/manageiq-ui-worker/Dockerfile +++ b/images/manageiq-ui-worker/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM_REPO=manageiq +ARG FROM_REPO=docker.io/manageiq ARG FROM_TAG=latest-quinteros FROM ${FROM_REPO}/manageiq-webserver-worker:${FROM_TAG} diff --git a/images/manageiq-webserver-worker/Dockerfile b/images/manageiq-webserver-worker/Dockerfile index 413210bb8..95f79808a 100644 --- a/images/manageiq-webserver-worker/Dockerfile +++ b/images/manageiq-webserver-worker/Dockerfile @@ -1,4 +1,4 @@ -ARG FROM_REPO=manageiq +ARG FROM_REPO=docker.io/manageiq ARG FROM_TAG=latest-quinteros FROM ${FROM_REPO}/manageiq-base-worker:${FROM_TAG} From 49886f7ec0c01f5df35a359deac7daf59cdefc14 Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Tue, 15 Aug 2023 16:23:09 -0400 Subject: [PATCH 2/3] Update release.rake for things missed in quinteros branch --- lib/tasks/release.rake | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/lib/tasks/release.rake b/lib/tasks/release.rake index 69a488f4e..94cf04e3d 100644 --- a/lib/tasks/release.rake +++ b/lib/tasks/release.rake @@ -48,7 +48,7 @@ namespace :release do # Modify deploy CRD deploy_crd = root.join("manageiq-operator", "config", "crd", "bases", "manageiq.org_manageiqs.yaml") content = deploy_crd.read - deploy_crd.write(content.sub(/(tag used for the orchestrator and worker deployments\n\s+\(default: )[^\)]+(\))/, "\\1latest-#{branch}\\2")) + deploy_crd.write(content.sub(/(worker deployments\s+\(default: )latest[^\)]*(\))/, "\\1latest-#{branch}\\2")) # Modify bin/build build_script = root.join("bin", "build") @@ -57,6 +57,13 @@ namespace :release do content.sub!(/(BUILD_REF:-)\w+(\})/, "\\1#{branch}\\2") build_script.write(content) + # Modify bin/build_hotfix + hotfix_script = root.join("bin", "build_hotfix") + content = hotfix_script.read + content.sub!(/^(TAG=).+$/, "\\1latest-#{branch}") + content.sub!(/(BUILD_REF:-)\w+(\})/, "\\1#{branch}\\2") + hotfix_script.write(content) + # Modify bin/remove_images remove_script = root.join("bin", "remove_images") content = remove_script.read @@ -72,15 +79,20 @@ namespace :release do base_dockerfile.write(content) # Modify Dockerfiles - dockerfiles = %w[manageiq-base-worker manageiq-webserver-worker manageiq-ui-worker manageiq-orchestrator].map do |worker| + dockerfiles = %w[manageiq-base-worker manageiq-webserver-worker manageiq-ui-worker manageiq-orchestrator manageiq-hotfix].map do |worker| root.join("images", worker, "Dockerfile").tap do |dockerfile| content = dockerfile.read dockerfile.write(content.sub(/^(ARG FROM_TAG=).+$/, "\\1latest-#{branch}")) end end + # Modify Workflows + build_workflow = root.join(".github", "workflows", "build_pods.yaml") + content = build_workflow.read + build_workflow.write(content.sub(/^(\s+run: bin\/build.*)latest(.+)$/, "\\1latest-#{branch}\\2")) + # Commit - files_to_update = [readme, operator_readme, cr, types, deploy_operator, deploy_crd, build_script, remove_script, base_dockerfile, *dockerfiles] + files_to_update = [readme, operator_readme, cr, types, deploy_operator, deploy_crd, build_script, hotfix_script, remove_script, build_workflow, base_dockerfile, *dockerfiles] exit $?.exitstatus unless system("git add #{files_to_update.join(" ")}") exit $?.exitstatus unless system("git commit -m 'Changes for new branch #{branch}'") From 86294d73803333de54f4a876ad96a682d8693cfc Mon Sep 17 00:00:00 2001 From: Brandon Dunne Date: Tue, 15 Aug 2023 17:28:29 -0400 Subject: [PATCH 3/3] Changes for new branch quinteros --- .github/workflows/build_pods.yaml | 2 +- bin/build_hotfix | 2 +- images/manageiq-hotfix/Dockerfile | 2 +- manageiq-operator/config/crd/bases/manageiq.org_manageiqs.yaml | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build_pods.yaml b/.github/workflows/build_pods.yaml index 621a20bb6..f8b1430b0 100644 --- a/.github/workflows/build_pods.yaml +++ b/.github/workflows/build_pods.yaml @@ -17,7 +17,7 @@ jobs: - name: Docker login run: echo ${{ secrets.DOCKER_REGISTRY_PASSWORD }} | docker login docker.io --password-stdin --username ${{ secrets.DOCKER_REGISTRY_USERNAME }} - name: Build pods containers - run: bin/build -t latest -n -p + run: bin/build -t latest-quinteros -n -p notify_builders: needs: build_pods if: github.repository_owner == 'ManageIQ' diff --git a/bin/build_hotfix b/bin/build_hotfix index 343ee04f8..604bc3f41 100755 --- a/bin/build_hotfix +++ b/bin/build_hotfix @@ -1,6 +1,6 @@ #!/bin/bash -TAG=latest +TAG=latest-quinteros ARCH=`uname -m` diff --git a/images/manageiq-hotfix/Dockerfile b/images/manageiq-hotfix/Dockerfile index a765be1b0..e84e8c8ea 100644 --- a/images/manageiq-hotfix/Dockerfile +++ b/images/manageiq-hotfix/Dockerfile @@ -1,5 +1,5 @@ ARG FROM_REPO=docker.io/manageiq -ARG FROM_TAG=latest +ARG FROM_TAG=latest-quinteros ARG FROM_IMAGE=${FROM_REPO}/manageiq-base:${FROM_TAG} FROM ${FROM_IMAGE} diff --git a/manageiq-operator/config/crd/bases/manageiq.org_manageiqs.yaml b/manageiq-operator/config/crd/bases/manageiq.org_manageiqs.yaml index 06a3a256a..38f54b330 100644 --- a/manageiq-operator/config/crd/bases/manageiq.org_manageiqs.yaml +++ b/manageiq-operator/config/crd/bases/manageiq.org_manageiqs.yaml @@ -240,7 +240,7 @@ spec: type: string orchestratorImageTag: description: 'Deprecated: Image tag used for the orchestrator and - worker deployments (default: latest)' + worker deployments (default: latest-quinteros)' type: string orchestratorInitialDelay: description: 'Number of seconds to wait before starting the orchestrator