Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 103 additions & 28 deletions .github/workflows/container-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,24 +42,66 @@ jobs:
use-gha-cache: true

- name: Build Nix-owned application images
run: >-
nix build
.#packages.x86_64-linux.mcpx-container
.#packages.x86_64-linux.identity-image
.#packages.x86_64-linux.identity-provider-image
--print-build-logs
run: |
# Bounded retry (#17390, pattern from #14859 in fleet-smoke.yml):
# a GitHub Actions cache rate limit throttles Magic Nix Cache
# (HTTP 418), which disables the magic-nix-cache substituter
# mid-build; that attempt then fails on paths no remaining
# substituter can supply. A fresh attempt re-queries the
# substituter once the short rate-limit window passes and
# reuses whatever the failed attempt already fetched or built
# into the local store. Three attempts bound the cost of a
# genuinely broken build.
for attempt in 1 2 3; do
if nix build \
.#packages.x86_64-linux.mcpx-container \
.#packages.x86_64-linux.identity-image \
.#packages.x86_64-linux.identity-provider-image \
--print-build-logs; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::container image build failed after 3 attempts"
exit 1
fi
echo "::warning::build attempt $attempt failed; retrying in 60s"
sleep 60
done

- name: Build generic ID/fleet images (#6076)
run: >-
nix build
.#packages.x86_64-linux.generic-runtime
.#packages.x86_64-linux.generic-js-runtime
.#packages.x86_64-linux.generic-python-runtime
--print-build-logs
run: |
# Bounded retry (#17390): see the first build step's note.
for attempt in 1 2 3; do
if nix build \
.#packages.x86_64-linux.generic-runtime \
.#packages.x86_64-linux.generic-js-runtime \
.#packages.x86_64-linux.generic-python-runtime \
--print-build-logs; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::build failed after 3 attempts"
exit 1
fi
echo "::warning::build attempt $attempt failed; retrying in 60s"
sleep 60
done

- name: Build Lab Ops Hub image
working-directory: pkgs/lab-ops-hub
run: nix build -f container-image.nix --print-build-logs
run: |
# Bounded retry (#17390): see the first build step's note.
for attempt in 1 2 3; do
if nix build -f container-image.nix --print-build-logs; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::build failed after 3 attempts"
exit 1
fi
echo "::warning::build attempt $attempt failed; retrying in 60s"
sleep 60
done

publish-generic:
name: "publish: generic ID/fleet images to GHCR (#6076)"
Expand Down Expand Up @@ -93,25 +135,58 @@ jobs:
use-gha-cache: true

- name: Build generic images
run: >-
nix build
.#packages.x86_64-linux.generic-runtime
--out-link generic-runtime.tar.gz
--print-build-logs
run: |
# Bounded retry (#17390): see the build job's first step note.
for attempt in 1 2 3; do
if nix build \
.#packages.x86_64-linux.generic-runtime \
--out-link generic-runtime.tar.gz \
--print-build-logs; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::build failed after 3 attempts"
exit 1
fi
echo "::warning::build attempt $attempt failed; retrying in 60s"
sleep 60
done

- name: Build generic JS runtime image
run: >-
nix build
.#packages.x86_64-linux.generic-js-runtime
--out-link generic-js-runtime.tar.gz
--print-build-logs
run: |
# Bounded retry (#17390): see the build job's first step note.
for attempt in 1 2 3; do
if nix build \
.#packages.x86_64-linux.generic-js-runtime \
--out-link generic-js-runtime.tar.gz \
--print-build-logs; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::build failed after 3 attempts"
exit 1
fi
echo "::warning::build attempt $attempt failed; retrying in 60s"
sleep 60
done

- name: Build generic Python runtime image
run: >-
nix build
.#packages.x86_64-linux.generic-python-runtime
--out-link generic-python-runtime.tar.gz
--print-build-logs
run: |
# Bounded retry (#17390): see the build job's first step note.
for attempt in 1 2 3; do
if nix build \
.#packages.x86_64-linux.generic-python-runtime \
--out-link generic-python-runtime.tar.gz \
--print-build-logs; then
break
fi
if [ "$attempt" -eq 3 ]; then
echo "::error::build failed after 3 attempts"
exit 1
fi
echo "::warning::build attempt $attempt failed; retrying in 60s"
sleep 60
done

- name: Push generic images to GHCR (v1 + commit SHA tags)
env:
Expand Down
Loading