Pin registry auth realm host in build_cicd
Some checks failed
CICD / Build and Publish CICD Base Image (push) Successful in 21s
CICD / Build and Push CICD Image (push) Failing after 29s
CICD / Backend Tests (push) Has been skipped
CICD / Pre-commit Checks (push) Has been skipped
CICD / Frontend Tests (push) Has been skipped
CICD / Backend Doctests (push) Has been skipped
CICD / Build CICD Image Failure Postmortem (push) Successful in 18s
CICD / CICD Tests Complete (push) Failing after 8s
CICD / Source Lanes Failure Postmortem (push) Has been skipped
CICD / Build Backend Base Image (push) Has been skipped
CICD / Build Frontend Base Image (push) Has been skipped
CICD / Build Integration Tester Image (push) Has been skipped
CICD / Build E2E Tester Image (push) Has been skipped
CICD / Build Backend Main Image (push) Has been skipped
CICD / Build Frontend Main Image (push) Has been skipped
CICD / Build and Publish Runtime Images (Legacy Disabled) (push) Has been skipped
CICD / Runtime Images Failure Postmortem (push) Has been skipped
CICD / Production Images Complete (push) Failing after 29s
CICD / Runtime Black-Box Integration Tests (push) Has been skipped
CICD / End-to-End Tests (push) Has been skipped
CICD / Integration Tests Failure Postmortem (push) Has been skipped
CICD / E2E Tests Failure Postmortem (push) Has been skipped
Some checks failed
CICD / Build and Publish CICD Base Image (push) Successful in 21s
CICD / Build and Push CICD Image (push) Failing after 29s
CICD / Backend Tests (push) Has been skipped
CICD / Pre-commit Checks (push) Has been skipped
CICD / Frontend Tests (push) Has been skipped
CICD / Backend Doctests (push) Has been skipped
CICD / Build CICD Image Failure Postmortem (push) Successful in 18s
CICD / CICD Tests Complete (push) Failing after 8s
CICD / Source Lanes Failure Postmortem (push) Has been skipped
CICD / Build Backend Base Image (push) Has been skipped
CICD / Build Frontend Base Image (push) Has been skipped
CICD / Build Integration Tester Image (push) Has been skipped
CICD / Build E2E Tester Image (push) Has been skipped
CICD / Build Backend Main Image (push) Has been skipped
CICD / Build Frontend Main Image (push) Has been skipped
CICD / Build and Publish Runtime Images (Legacy Disabled) (push) Has been skipped
CICD / Runtime Images Failure Postmortem (push) Has been skipped
CICD / Production Images Complete (push) Failing after 29s
CICD / Runtime Black-Box Integration Tests (push) Has been skipped
CICD / End-to-End Tests (push) Has been skipped
CICD / Integration Tests Failure Postmortem (push) Has been skipped
CICD / E2E Tests Failure Postmortem (push) Has been skipped
This commit is contained in:
@@ -194,6 +194,27 @@ jobs:
|
||||
return 1
|
||||
}
|
||||
|
||||
ensure_registry_auth_realm_host() {
|
||||
if ! grep -q "${GITEA_REGISTRY_HOST}" /etc/hosts; then
|
||||
echo "${GITEA_REGISTRY_IP} ${GITEA_REGISTRY_HOST}" >> /etc/hosts
|
||||
fi
|
||||
|
||||
headers_file="$(mktemp)"
|
||||
if curl -sSI "http://${GITEA_REGISTRY}/v2/" >"${headers_file}"; then
|
||||
realm_url="$(sed -n 's/.*realm="\([^"]*\)".*/\1/p' "${headers_file}" | head -n 1)"
|
||||
if [ -n "${realm_url}" ]; then
|
||||
realm_host="$(printf '%s' "${realm_url}" | sed -E 's#^https?://([^/:]+).*$#\1#')"
|
||||
if [ -n "${realm_host}" ] && [ "${realm_host}" != "${GITEA_REGISTRY_HOST}" ]; then
|
||||
if ! grep -q "${realm_host}" /etc/hosts; then
|
||||
echo "${GITEA_REGISTRY_IP} ${realm_host}" >> /etc/hosts
|
||||
echo "Pinned registry auth realm host: ${realm_host} -> ${GITEA_REGISTRY_IP}"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
rm -f "${headers_file}"
|
||||
}
|
||||
|
||||
if ! grep -q "${GITEA_REGISTRY_HOST}" /etc/hosts; then
|
||||
echo "${GITEA_REGISTRY_IP} ${GITEA_REGISTRY_HOST}" >> /etc/hosts
|
||||
fi
|
||||
@@ -373,6 +394,8 @@ jobs:
|
||||
docker system df || true
|
||||
fi
|
||||
|
||||
ensure_registry_auth_realm_host
|
||||
|
||||
echo "${PACKAGE_ACCESS_TOKEN}" | docker login "http://${GITEA_REGISTRY}" -u "${REGISTRY_USER}" --password-stdin
|
||||
|
||||
RESOLVED_HEAD_SHA="$(trim_spaces "${HEAD_SHA:-}")"
|
||||
|
||||
Reference in New Issue
Block a user