Deploy IFT: bootstrap-build aux images when :ift tag is missing.
CI / test (push) Successful in 11m1s

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-10 13:44:05 +03:00
parent 78a9f3043e
commit ff285ef867
+18 -9
View File
@@ -7,6 +7,21 @@ REGISTRY="${1:?registry}"
TAG="${2:?sha-tag}"
FILES="${3:-}"
rebuild_image() {
local name="$1"
local context="$2"
local dockerfile="$3"
local reason="$4"
echo "== ${name}: rebuild (${reason})"
bash scripts/retry-docker-build.sh 3 30 -- \
docker buildx build -f "${dockerfile}" --push \
-t "${REGISTRY}/${name}:${TAG}" \
-t "${REGISTRY}/${name}:ift" \
--provenance=false --sbom=false \
"${context}"
}
publish_image() {
local name="$1"
local path_pattern="$2"
@@ -19,20 +34,14 @@ publish_image() {
fi
if echo "${FILES}" | grep -qE "${path_pattern}"; then
echo "== ${name}: rebuild (matched: ${path_pattern})"
bash scripts/retry-docker-build.sh 3 30 -- \
docker buildx build -f "${dockerfile}" --push \
-t "${REGISTRY}/${name}:${TAG}" \
-t "${REGISTRY}/${name}:ift" \
--provenance=false --sbom=false \
"${context}"
rebuild_image "${name}" "${context}" "${dockerfile}" "matched: ${path_pattern}"
return
fi
echo "== ${name}: unchanged, promote :ift -> ${TAG}"
if ! docker buildx imagetools inspect "${REGISTRY}/${name}:ift" >/dev/null 2>&1; then
echo "ERROR: ${name}:ift not found and no matching changes in this commit"
exit 1
rebuild_image "${name}" "${context}" "${dockerfile}" "bootstrap: :ift not found"
return
fi
docker buildx imagetools create \
-t "${REGISTRY}/${name}:${TAG}" \