From 08d0b89b424e9f72aca13dab9c93e1b0837b4ccf Mon Sep 17 00:00:00 2001 From: Christian Cwienk Date: Mon, 21 Oct 2024 19:19:44 +0200 Subject: [PATCH] do not configure platform-specific image-tags Containerd (the container-runtime used to run containers for concourse-pipelines) is well capable of choosing correct platform-specific image from "image-index"-manifests (as is the case for "cc-job-image"). Hence, remove unnecessary logic from pipeline-template, and thus remove hard-coding assumption about platform-specific image-tags being set (the latter making migration to GitHub-Actions-based pipelines slightly easier). --- concourse/resources/defaults.mako | 5 +---- concourse/resources/email.mako | 3 +-- concourse/templates/default.mako | 1 - 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/concourse/resources/defaults.mako b/concourse/resources/defaults.mako index 097ce58fa..7e277d9f9 100644 --- a/concourse/resources/defaults.mako +++ b/concourse/resources/defaults.mako @@ -1,5 +1,5 @@ <%namespace file="/resources/image.mako" import="task_image_resource"/> -<%def name='task_image_defaults(registry_cfg, platform=None, indent=0)' +<%def name='task_image_defaults(registry_cfg, indent=0)' filter="indent_func(indent),trim"> <% # platform: model.concourse.Platform @@ -12,9 +12,6 @@ if not (job_image_tag := os.environ.get('CC_JOB_IMAGE_TAG', '')): with open(concourse.paths.last_released_tag_file) as f: job_image_tag = f.read().strip() -if platform: - job_image_tag = f'{job_image_tag}-{platform.normalised_oci_platform_tag_suffix}' - # registry_cfg must be of type ContainerRegistryConfig (cc-utils) repository = 'europe-docker.pkg.dev/gardener-project/releases/cicd/job-image' registry_cfg = mcr.find_config(image_reference=repository) diff --git a/concourse/resources/email.mako b/concourse/resources/email.mako index 8cc05309c..3263cc1ed 100644 --- a/concourse/resources/email.mako +++ b/concourse/resources/email.mako @@ -16,7 +16,6 @@ from makoutil import indent_func concourse_cfg = cfg_set.concourse() node_cfg = concourse_cfg.worker_node_cfg -platform = node_cfg.default_platform %> - task: '${job_step.name}.failed' config: @@ -28,7 +27,7 @@ platform = node_cfg.default_platform % for key, value in env_vars.items(): ${key}: ${value} % endfor - ${task_image_defaults(cfg_set.container_registry(), platform=platform, indent=4)} + ${task_image_defaults(cfg_set.container_registry(), indent=4)} run: path: /usr/bin/env args: diff --git a/concourse/templates/default.mako b/concourse/templates/default.mako index 178d8b0e8..8ebc8c728 100644 --- a/concourse/templates/default.mako +++ b/concourse/templates/default.mako @@ -376,7 +376,6 @@ else: % else: ${task_image_defaults( registry_cfg=default_container_registry, - platform=job_step.platform, indent=4, )} % endif