Skip to content

Commit

Permalink
do not configure platform-specific image-tags
Browse files Browse the repository at this point in the history
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).
  • Loading branch information
ccwienk committed Oct 21, 2024
1 parent f4dab07 commit 08d0b89
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
5 changes: 1 addition & 4 deletions concourse/resources/defaults.mako
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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)
Expand Down
3 changes: 1 addition & 2 deletions concourse/resources/email.mako
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
1 change: 0 additions & 1 deletion concourse/templates/default.mako
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ else:
% else:
${task_image_defaults(
registry_cfg=default_container_registry,
platform=job_step.platform,
indent=4,
)}
% endif
Expand Down

0 comments on commit 08d0b89

Please sign in to comment.