Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

factor out repetitions in tags etc in docker-bake.hcl #221

Open
maxheld83 opened this issue Apr 7, 2023 · 0 comments
Open

factor out repetitions in tags etc in docker-bake.hcl #221

maxheld83 opened this issue Apr 7, 2023 · 0 comments

Comments

@maxheld83
Copy link
Owner

this stuff could use some factoring out, maybe via the stdlib standard library:

function "compose_cache_from_field" {
  params = [image_name_stage]
  // should also cache from other registries, tracked in #219
  result = [
    "type=registry,ref=${REGISTRY_PREFIX_CI}/${IMAGE_OWNER}/${IMAGE_NAME_ROOT}/${image_name_stage}/cache/linux/arm64:${TAG_FROM_GIT_REF_NAME}",
    "type=registry,ref=${REGISTRY_PREFIX_CI}/${IMAGE_OWNER}/${IMAGE_NAME_ROOT}/${image_name_stage}/cache/linux/amd64:${TAG_FROM_GIT_REF_NAME}",
    "type=registry,ref=${REGISTRY_PREFIX_CI}/${IMAGE_OWNER}/${IMAGE_NAME_ROOT}/${image_name_stage}/cache/linux/arm64:${DEFAULT_BRANCH}",
    "type=registry,ref=${REGISTRY_PREFIX_CI}/${IMAGE_OWNER}/${IMAGE_NAME_ROOT}/${image_name_stage}/cache/linux/amd64:${DEFAULT_BRANCH}"
  ]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant