Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 2 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ Applied to: cloudflared, mailflow frontend + backend, n8n runner. `headscale` is
`ci/validate.sh` runs every check that CI runs: yamllint, ansible-lint,
`tofu validate` / `tofu fmt` for `tower`, a zizmor audit of the validation
workflow, `ci/n8n-versions-check.sh`, which fails unless web3's n8n and
`n8nio/runners` images are pinned to the same version, and
`n8nio/runners` images are pinned to the same version and the n8n sandbox
service API, runner and sandbox images to the same release, and
`ci/headscale-check.sh`, which runs the headscale image pinned in
`tower/containers/headscale/docker-compose.yml` (`configtest`, `policy check`)
against the committed config and policy and needs docker. Run it before pushing;
Expand Down
22 changes: 20 additions & 2 deletions ci/n8n-versions-check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# n8n image, and .github/workflows/n8n-sync-runners.yml then pins the runners
# to match, so this check fails a pull request until that has happened.
#
# It also fails unless the n8n sandbox service API, runner and sandbox images
# are on the same release: they are only supported together, and Renovate can
# open (and automerge) a group PR before all three have been published.
#
# Usage: ci/n8n-versions-check.sh [COMPOSE_FILE...]

set -euo pipefail
Expand All @@ -12,9 +16,10 @@ if [ "$#" -eq 0 ]; then
set -- web3/containers/n8n/docker-compose.yml
fi

# tag FILE IMAGE: the tag of IMAGE pinned in FILE, without the digest.
# tag FILE IMAGE: the tags of IMAGE pinned in FILE, without the digest, one
# per distinct tag. The sandbox image is set through an environment variable.
tag() {
sed -nE "s#^[[:space:]]*image:[[:space:]]*$2:([^@[:space:]]+).*#\1#p" "$1"
sed -nE "s#^[[:space:]]*(image|SANDBOX_RUNNER_DOCKER_SANDBOX_IMAGE):[[:space:]]*$2:([^@[:space:]]+).*#\2#p" "$1" | sort -u
}

status=0
Expand All @@ -30,5 +35,18 @@ for compose in "$@"; do
else
echo "$compose: n8n and task runners both at $n8n"
fi

api=$(tag "$compose" 'ghcr\.io/n8n-io/n8n-sandbox-service-api')
runner=$(tag "$compose" 'ghcr\.io/n8n-io/n8n-sandbox-service-runner-dind')
sandbox=$(tag "$compose" 'ghcr\.io/n8n-io/n8n-sandbox-service-sandbox')
if [ -z "$api" ] || [ -z "$runner" ] || [ -z "$sandbox" ]; then
echo "$compose: could not find the sandbox service API, runner and sandbox images" >&2
status=1
elif [ "$api" != "$runner" ] || [ "$api" != "$sandbox" ]; then
echo "$compose: sandbox service images differ: API ${api//$'\n'/ and }, runner $runner, sandbox $sandbox" >&2
status=1
else
echo "$compose: sandbox service API, runner and sandbox all at $api"
fi
done
exit "$status"
21 changes: 20 additions & 1 deletion renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -108,10 +108,29 @@
"ghcr.io/maathimself/mailflow-frontend",
"ghcr.io/maathimself/mailflow-backend",
"ghcr.io/tailscale/tailscale",
"ghcr.io/thundersquared/n8n"
"ghcr.io/thundersquared/n8n",
"ghcr.io/n8n-io/n8n-sandbox-service-api",
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
"ghcr.io/n8n-io/n8n-sandbox-service-runner-dind",
"ghcr.io/n8n-io/n8n-sandbox-service-sandbox",
"dunglas/frankenphp",
"ghcr.io/tashfeenahmed/freellmapi"
],
"matchUpdateTypes": ["patch", "digest", "pinDigest"],
"automerge": true
},
{
"description": "Also automerge minor updates for these images. Same caveats as the rule above.",
"matchDatasources": ["docker"],
"matchPackageNames": [
"ghcr.io/maathimself/mailflow-frontend",
"ghcr.io/maathimself/mailflow-backend",
"ghcr.io/n8n-io/n8n-sandbox-service-api",
"ghcr.io/n8n-io/n8n-sandbox-service-runner-dind",
"ghcr.io/n8n-io/n8n-sandbox-service-sandbox",
"ghcr.io/tashfeenahmed/freellmapi"
Comment thread
anatolinicolae marked this conversation as resolved.
Resolved
],
"matchUpdateTypes": ["minor"],
"automerge": true
}
],
"customManagers": [
Expand Down