Strip sha256 hash
This commit is contained in:
1 parent
9fd543ddcb
commit
bf9f7c3041
4 files changed
+5
-23
No files matched your search
@@ -37,10 +37,6 @@ jobs:
|
||||
curl --fail --silent --show-error --location \
|
||||
--output "${RUNNER_TEMP}/kubectl" \
|
||||
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl"
|
||||
curl --fail --silent --show-error --location \
|
||||
--output "${RUNNER_TEMP}/kubectl.sha256" \
|
||||
"https://dl.k8s.io/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl.sha256"
|
||||
printf '%s %s\n' "$(cat "${RUNNER_TEMP}/kubectl.sha256")" "${RUNNER_TEMP}/kubectl" | sha256sum --check
|
||||
chmod 0700 "${RUNNER_TEMP}/kubectl"
|
||||
|
||||
- name: Configure Kubernetes access
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ spec:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: asciinema
|
||||
image: ghcr.io/asciinema/asciinema-server:20260626@sha256:0474b2186be46b23f5e16dbd4319727dbb68f27a303705fbe632821bf524b313
|
||||
image: ghcr.io/asciinema/asciinema-server:20260626
|
||||
imagePullPolicy: IfNotPresent
|
||||
envFrom:
|
||||
- configMapRef:
|
||||
|
||||
+1
-1
@@ -50,7 +50,7 @@ spec:
|
||||
type: RuntimeDefault
|
||||
containers:
|
||||
- name: postgresql
|
||||
image: postgres:17.6-alpine@sha256:ef257d85f76e48da1c64832459b59fcaba1a4dac97bf5d7450c77753542eee94
|
||||
image: postgres:17.6-alpine
|
||||
imagePullPolicy: IfNotPresent
|
||||
env:
|
||||
- name: POSTGRES_DB
|
||||
|
||||
@@ -8,20 +8,6 @@ bash -n "${project_dir}/install.sh"
|
||||
bash -n "${project_dir}/create-ci-kubeconfig.sh"
|
||||
bash -n "${project_dir}/test.sh"
|
||||
|
||||
image=$(sed -n 's|^[[:space:]]*image: \(ghcr.io/asciinema/asciinema-server[^[:space:]]*\)$|\1|p' \
|
||||
"${project_dir}/asciinema.yaml")
|
||||
if [[ -z "${image}" || "${image}" == *:latest || "${image}" != *@sha256:* ]]; then
|
||||
echo "The asciinema server image must use a non-latest tag pinned by digest." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
postgres_image=$(sed -n 's|^[[:space:]]*image: \(postgres:[^[:space:]]*\)$|\1|p' \
|
||||
"${project_dir}/infrastructure.yaml")
|
||||
if [[ -z "${postgres_image}" || "${postgres_image}" == *:latest || "${postgres_image}" != *@sha256:* ]]; then
|
||||
echo "The PostgreSQL image must use a non-latest tag pinned by digest." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! grep -Fq 'storageClassName: rook-ceph-block-ec' "${project_dir}/infrastructure.yaml"; then
|
||||
echo "The dedicated PostgreSQL claim must use retained Ceph block storage." >&2
|
||||
exit 1
|
||||
@@ -53,11 +39,11 @@ validate_file() {
|
||||
kubeconform -strict -summary "$@" "${manifest}"
|
||||
elif command -v docker >/dev/null 2>&1; then
|
||||
docker run --rm --interactive \
|
||||
ghcr.io/yannh/kubeconform:v0.7.0@sha256:85dbef6b4b312b99133decc9c6fc9495e9fc5f92293d4ff3b7e1b30f5611823c \
|
||||
ghcr.io/yannh/kubeconform:v0.7.0 \
|
||||
-strict -summary "$@" < "${manifest}"
|
||||
elif command -v podman >/dev/null 2>&1; then
|
||||
podman run --rm --interactive \
|
||||
ghcr.io/yannh/kubeconform:v0.7.0@sha256:85dbef6b4b312b99133decc9c6fc9495e9fc5f92293d4ff3b7e1b30f5611823c \
|
||||
ghcr.io/yannh/kubeconform:v0.7.0 \
|
||||
-strict -summary "$@" < "${manifest}"
|
||||
else
|
||||
echo "Required command not found: install kubeconform, Docker, or Podman" >&2
|
||||
@@ -72,4 +58,4 @@ validate_file "${project_dir}/namespace.yaml"
|
||||
validate_file "${project_dir}/ceph-object-user.yaml" -ignore-missing-schemas
|
||||
validate_file "${project_dir}/ci-deployer.yaml"
|
||||
|
||||
echo "asciinema scripts and Kubernetes resources are valid for ${image}."
|
||||
echo "asciinema scripts and Kubernetes resources are valid."
|
||||
Reference in new issue
Block a user