Align CI/CD with shared infra/ci-workflows and drop compose-based CI.
Replace hand-rolled jobs with @v1 callers, capped bake/migrate CD, and remove the docker-compose.ci.yml bridge workaround.
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
# Invoked from the repo root. cwd:// keeps contexts relative to that
|
||||
# working directory, not this file.
|
||||
#
|
||||
# CD must cap the builder cgroup (scripts/cap-buildx-builder.sh)
|
||||
# and bake one target at a time. The runner host also runs Gitea.
|
||||
#
|
||||
# API Dockerfile ends with `final` and exposes scratch `migrate-bundle`.
|
||||
# Context for API is repo root (Dockerfile COPY paths assume that).
|
||||
|
||||
variable "REGISTRY" {}
|
||||
variable "TAG" {}
|
||||
|
||||
group "default" {
|
||||
targets = ["api", "ui", "migrate"]
|
||||
}
|
||||
|
||||
target "api" {
|
||||
context = "cwd://"
|
||||
dockerfile = "VigilCareRecordsAPI/Dockerfile"
|
||||
target = "final"
|
||||
tags = ["${REGISTRY}/vigilcare-records-api:${TAG}", "${REGISTRY}/vigilcare-records-api:latest"]
|
||||
cache-from = ["type=registry,ref=${REGISTRY}/vigilcare-records-api:buildcache"]
|
||||
cache-to = ["type=registry,ref=${REGISTRY}/vigilcare-records-api:buildcache,mode=max"]
|
||||
}
|
||||
|
||||
target "ui" {
|
||||
context = "cwd://vigilcare-records-web"
|
||||
dockerfile = "Dockerfile"
|
||||
target = "final"
|
||||
tags = ["${REGISTRY}/vigilcare-records-dashboard:${TAG}", "${REGISTRY}/vigilcare-records-dashboard:latest"]
|
||||
cache-from = ["type=registry,ref=${REGISTRY}/vigilcare-records-dashboard:buildcache"]
|
||||
cache-to = ["type=registry,ref=${REGISTRY}/vigilcare-records-dashboard:buildcache,mode=max"]
|
||||
}
|
||||
|
||||
target "migrate" {
|
||||
context = "cwd://"
|
||||
dockerfile = "VigilCareRecordsAPI/Dockerfile"
|
||||
target = "migrate-bundle"
|
||||
tags = ["vigilcare-records-migrate-bundle:local"]
|
||||
cache-from = ["type=registry,ref=${REGISTRY}/vigilcare-records-api:buildcache"]
|
||||
# no cache-to — api already exports this Dockerfile at mode=max
|
||||
}
|
||||
Reference in New Issue
Block a user