diff --git a/.claude/skills/upgrading-golang/SKILL.md b/.claude/skills/upgrading-golang/SKILL.md index 750ebb6e0..00d10ea6d 100644 --- a/.claude/skills/upgrading-golang/SKILL.md +++ b/.claude/skills/upgrading-golang/SKILL.md @@ -110,18 +110,12 @@ Extract the SHA256 digest from the output (format: `sha256:abc123...`). Pattern to replace: ```dockerfile -# from: arigaio/atlas:X.XX.X -# docker run arigaio/atlas@sha256:OLD_DIGEST version -# atlas version vX.XX.X -FROM arigaio/atlas@sha256:OLD_DIGEST as base +FROM arigaio/atlas:X.XX.X@sha256:OLD_DIGEST as base ``` With: ```dockerfile -# from: arigaio/atlas:X.XX.X -# docker run arigaio/atlas@sha256:NEW_DIGEST version -# atlas version vX.XX.X -FROM arigaio/atlas@sha256:NEW_DIGEST as base +FROM arigaio/atlas:X.XX.X@sha256:NEW_DIGEST as base ``` **7c. Update `./common.mk` for `make init`:** diff --git a/.claude/skills/upgrading-golang/files-to-update.md b/.claude/skills/upgrading-golang/files-to-update.md index 0674f061a..d9dbb5ace 100644 --- a/.claude/skills/upgrading-golang/files-to-update.md +++ b/.claude/skills/upgrading-golang/files-to-update.md @@ -41,10 +41,7 @@ Update patterns: **Dockerfile.migrations:** ```dockerfile -# from: arigaio/atlas:X.XX.X -# docker run arigaio/atlas@sha256:DIGEST version -# atlas version vX.XX.X -FROM arigaio/atlas@sha256:DIGEST as base +FROM arigaio/atlas:X.XX.X@sha256:DIGEST as base ``` **common.mk:** diff --git a/.claude/skills/vulnerability-remediation/SKILL.md b/.claude/skills/vulnerability-remediation/SKILL.md index 9343e8eaf..4cc55b01d 100644 --- a/.claude/skills/vulnerability-remediation/SKILL.md +++ b/.claude/skills/vulnerability-remediation/SKILL.md @@ -80,7 +80,7 @@ The binary path (e.g. `/atlas`, `/app`) tells you which binary inside the image **Source file**: `app/controlplane/Dockerfile.migrations` **Fix procedure**: -1. Check the current atlas version in the comment at the top of the Dockerfile (e.g. `# atlas version v1.2.0`) +1. Check the current atlas version in the tag of the `FROM` line of the Dockerfile (e.g. `arigaio/atlas:1.2.0@sha256:...`) 2. Find the latest available stable version: ```bash curl -s "https://registry.hub.docker.com/v2/repositories/arigaio/atlas/tags?page_size=20&ordering=last_updated" \ @@ -106,10 +106,7 @@ The binary path (e.g. `/atlas`, `/app`) tells you which binary inside the image ``` 6. Update `app/controlplane/Dockerfile.migrations`: ```dockerfile - # from: arigaio/atlas: - # docker run arigaio/atlas@sha256: version - # atlas version v - FROM arigaio/atlas@sha256: as base + FROM arigaio/atlas:@sha256: as base ``` 7. Update `ATLAS_VERSION` in the following files to match the latest **stable** version (used for CLI tool installation, not the Docker image): - `common.mk` — the `ATLAS_VERSION=vX.X.X` in the `init` target diff --git a/.github/dependabot.yml b/.github/dependabot.yml index d05673ace..d8bb720f1 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -29,3 +29,30 @@ updates: - "go" commit-message: prefix: "chore(deps)" + + # Docker base images. Dependabot scans each listed directory for Dockerfiles + # (non-recursive), so every directory with a Dockerfile needs an entry. + # Today this tracks the Atlas image in app/controlplane/Dockerfile.migrations. + # When it bumps Atlas, also bump ATLAS_VERSION in common.mk and + # .github/workflows/test.yml in the same PR. + - package-ecosystem: "docker" + directories: + - "/app/controlplane" + - "/app/cli" + - "/app/artifact-cas" + schedule: + interval: "weekly" + day: "monday" + open-pull-requests-limit: 10 + cooldown: + default-days: 7 + # Go version bumps are coordinated with go.mod through the upgrading-golang + # skill (.claude/skills/upgrading-golang). Dependabot bumps the image tag + # only and would drift it away from go.mod. + ignore: + - dependency-name: "golang" + labels: + - "dependencies" + - "docker" + commit-message: + prefix: "chore(deps)" diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 477d42e59..f98cf48eb 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -44,7 +44,7 @@ jobs: - name: Generate migrations if: ${{ matrix.app == 'controlplane' }} env: - ATLAS_VERSION: v1.3.4 + ATLAS_VERSION: v1.3.8 run: | wget -q https://release.ariga.io/atlas/atlas-linux-amd64-$ATLAS_VERSION -O /tmp/atlas sudo install /tmp/atlas /usr/local/bin/atlas diff --git a/app/controlplane/Dockerfile.migrations b/app/controlplane/Dockerfile.migrations index fc48f7ff7..c5790226b 100644 --- a/app/controlplane/Dockerfile.migrations +++ b/app/controlplane/Dockerfile.migrations @@ -1,9 +1,6 @@ # Container image built by go-releaser that's used to run migrations against the database during deployment # See https://atlasgo.io/guides/deploying/image -# from: arigaio/atlas:1.3.4 -# docker run arigaio/atlas@sha256:3cd6883d5ec2703741f750fd5f9efed3a61f8e164b9dcea93ab7a7be429a1b5b version -# atlas version v1.3.4 -FROM arigaio/atlas@sha256:3cd6883d5ec2703741f750fd5f9efed3a61f8e164b9dcea93ab7a7be429a1b5b as base +FROM arigaio/atlas:1.3.8@sha256:bed389f898bd36c518cfbc6e8dbd8f0bd4152ae3d2ea400e5440938ef2a2d256 as base FROM scratch # Update permissions to make it readable by the user diff --git a/common.mk b/common.mk index 8dd2cf591..dd16b3f10 100644 --- a/common.mk +++ b/common.mk @@ -9,7 +9,7 @@ init: init-api-tools # in the community version anymore https://github.com/ariga/atlas/issues/2388#issuecomment-1864287189 # install golangci-lint, keep in sync with .github/workflows/lint.yml curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v2.14.0 - curl -sSf https://atlasgo.sh | ATLAS_VERSION=v1.3.4 sh -s -- -y + curl -sSf https://atlasgo.sh | ATLAS_VERSION=v1.3.8 sh -s -- -y # initialize API tooling .PHONY: init-api-tools