Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ba0f97a8cc | |||
| 643e95754d | |||
| 71570dc24f | |||
| dd7bda8ead | |||
| 437123a00b | |||
| b9d45eff68 |
@@ -4,23 +4,25 @@ when:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# One entry per distro. Adding a distro: add distros/<name>/ and one entry here.
|
# One entry per distro. Adding a distro: add distros/<name>/ and one entry here.
|
||||||
|
# BASE_IMAGE must match the distro's distro.env; ci/check-distros.sh enforces it.
|
||||||
- DISTRO: alma9
|
- DISTRO: alma9
|
||||||
IMAGE: almalinux9
|
IMAGE: almalinux9
|
||||||
BASE_IMAGE: "docker.io/almalinux:9"
|
BASE_IMAGE: "artifactapi.k8s.syd1.au.unkin.net/dockerhub/library/almalinux:9"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: build
|
- name: build
|
||||||
image: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest"
|
image: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest"
|
||||||
settings:
|
settings:
|
||||||
|
# registry is what gets the internal CA into the buildkit container: the plugin
|
||||||
|
# writes a buildkit.toml pointing at /etc/docker/certs.d/<registry>/ca.crt only
|
||||||
|
# when it is set. The plugin has no buildkit_config setting.
|
||||||
|
registry: artifactapi.k8s.syd1.au.unkin.net
|
||||||
repo: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/${IMAGE}"
|
repo: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/${IMAGE}"
|
||||||
target: image
|
target: image
|
||||||
dry_run: true
|
dry_run: true
|
||||||
build_args:
|
build_args:
|
||||||
BASE_IMAGE: "${BASE_IMAGE}"
|
BASE_IMAGE: "${BASE_IMAGE}"
|
||||||
DISTRO: "${DISTRO}"
|
DISTRO: "${DISTRO}"
|
||||||
buildkit_config: |
|
|
||||||
[registry."artifactapi.k8s.syd1.au.unkin.net"]
|
|
||||||
ca = ["/etc/docker/certs.d/artifactapi.k8s.syd1.au.unkin.net/ca.crt"]
|
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
serviceAccountName: default
|
serviceAccountName: default
|
||||||
|
|||||||
@@ -5,26 +5,26 @@ when:
|
|||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
# One entry per distro. Adding a distro: add distros/<name>/ and one entry here.
|
# One entry per distro. Adding a distro: add distros/<name>/ and one entry here.
|
||||||
|
# BASE_IMAGE must match the distro's distro.env; ci/check-distros.sh enforces it.
|
||||||
- DISTRO: alma9
|
- DISTRO: alma9
|
||||||
IMAGE: almalinux9
|
IMAGE: almalinux9
|
||||||
BASE_IMAGE: "docker.io/almalinux:9"
|
BASE_IMAGE: "artifactapi.k8s.syd1.au.unkin.net/dockerhub/library/almalinux:9"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker
|
- name: docker
|
||||||
image: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest"
|
image: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/plugin-docker-buildx:latest"
|
||||||
settings:
|
settings:
|
||||||
|
# registry is what gets the internal CA into the buildkit container: the plugin
|
||||||
|
# writes a buildkit.toml pointing at /etc/docker/certs.d/<registry>/ca.crt only
|
||||||
|
# when it is set. The plugin has no buildkit_config setting.
|
||||||
registry: artifactapi.k8s.syd1.au.unkin.net
|
registry: artifactapi.k8s.syd1.au.unkin.net
|
||||||
repo: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/${IMAGE}"
|
repo: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/${IMAGE}"
|
||||||
target: image
|
target: image
|
||||||
build_args:
|
build_args:
|
||||||
BASE_IMAGE: "${BASE_IMAGE}"
|
BASE_IMAGE: "${BASE_IMAGE}"
|
||||||
DISTRO: "${DISTRO}"
|
DISTRO: "${DISTRO}"
|
||||||
buildkit_config: |
|
|
||||||
[registry."artifactapi.k8s.syd1.au.unkin.net"]
|
|
||||||
ca = ["/etc/docker/certs.d/artifactapi.k8s.syd1.au.unkin.net/ca.crt"]
|
|
||||||
tags:
|
tags:
|
||||||
- "${CI_COMMIT_TAG##v}"
|
- "${CI_COMMIT_TAG##v}"
|
||||||
- latest
|
|
||||||
backend_options:
|
backend_options:
|
||||||
kubernetes:
|
kubernetes:
|
||||||
serviceAccountName: default
|
serviceAccountName: default
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ when:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: pre-commit
|
- name: pre-commit
|
||||||
image: "git.unkin.net/unkin/almalinux9-gobuilder:20260606"
|
image: "artifactapi.k8s.syd1.au.unkin.net/docker-internal/gobuilder:0.1.0-alma9"
|
||||||
commands:
|
commands:
|
||||||
- uvx pre-commit run --all-files
|
- uvx pre-commit run --all-files
|
||||||
backend_options:
|
backend_options:
|
||||||
|
|||||||
@@ -14,6 +14,25 @@ for d in distros/*/; do
|
|||||||
done
|
done
|
||||||
for wf in "${WORKFLOWS[@]}"; do
|
for wf in "${WORKFLOWS[@]}"; do
|
||||||
grep -q "DISTRO: ${n}\$" "$wf" || { echo "${wf}: distro ${n} missing from matrix"; fail=1; }
|
grep -q "DISTRO: ${n}\$" "$wf" || { echo "${wf}: distro ${n} missing from matrix"; fail=1; }
|
||||||
|
|
||||||
|
# A matrix entry that restates a distro.env key must not drift from it — a stale
|
||||||
|
# BASE_IMAGE here silently overrides distro.env for every CI build.
|
||||||
|
while IFS='=' read -r k v; do
|
||||||
|
[ -n "$k" ] || continue
|
||||||
|
grep -q "^${k}=" "${d}distro.env" || continue
|
||||||
|
ev=$(sed -n "s/^${k}=//p" "${d}distro.env" | head -1 | sed 's/^"//;s/"$//')
|
||||||
|
[ "$v" = "$ev" ] || { echo "${wf}: matrix ${k}=\"${v}\" for ${n} disagrees with ${d}distro.env (\"${ev}\")"; fail=1; }
|
||||||
|
done <<EOF
|
||||||
|
$(awk -v d="$n" '
|
||||||
|
$0 ~ "^[[:space:]]*-[[:space:]]+DISTRO:[[:space:]]*"d"[[:space:]]*$" { inb=1; next }
|
||||||
|
inb && /^[[:space:]]*-/ { inb=0 }
|
||||||
|
inb && match($0, /^[[:space:]]+[A-Z_]+:/) {
|
||||||
|
k=$1; sub(/:$/,"",k)
|
||||||
|
v=$0; sub(/^[[:space:]]*[A-Z_]+:[[:space:]]*/,"",v); gsub(/^"|"$/,"",v)
|
||||||
|
print k "=" v
|
||||||
|
}
|
||||||
|
' "$wf")
|
||||||
|
EOF
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user