feat(dependencies): add @redocly/cli and update CI workflows
quality / commitlint (push) Skipped
quality / changes (push) Successful in 20s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 2m54s
quality / web (push) Successful in 1m22s
quality / go (push) Successful in 3m37s
quality / bird2 (push) Successful in 15s
CD / quality (push) Successful in 8m37s
CD / publish (push) Failing after 1m51s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 20s
quality / docker-check (push) Skipped
quality / openapi (push) Successful in 2m54s
quality / web (push) Successful in 1m22s
quality / go (push) Successful in 3m37s
quality / bird2 (push) Successful in 15s
CD / quality (push) Successful in 8m37s
CD / publish (push) Failing after 1m51s
- Added `@redocly/cli` version 1.34.5 to `package.json` and `pnpm-lock.yaml` for OpenAPI linting. - Updated CI workflows to reflect changes in job names and processes, including adjustments to the `publish` job in the CD workflow. - Enhanced documentation to clarify the new CI/CD processes and Docker build configurations.
This commit is contained in:
+106
-24
@@ -1,7 +1,6 @@
|
||||
# Единая сборка образов EvoBGP (buildx bake: -f deploy/docker/docker-bake.hcl).
|
||||
# context = "../.." — корень репозитория (относительно этого файла).
|
||||
# dockerfile — путь от корня репозитория (относительно context).
|
||||
# Переменные: REGISTRY, IMAGE_TAG, CACHE_REF_GO, CACHE_REF_WEB
|
||||
# Переменные Bake читаются из окружения (см. docs.docker.com/build/bake/variables/).
|
||||
|
||||
variable "REGISTRY" {
|
||||
default = "git.shx.one/evobgp"
|
||||
@@ -35,14 +34,40 @@ variable "CACHE_REF_WEB" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "CACHE_REF_BIRDC" {
|
||||
default = ""
|
||||
}
|
||||
|
||||
variable "BASE_GOLANG" {
|
||||
default = "public.ecr.aws/docker/library/golang:1.24-alpine"
|
||||
}
|
||||
|
||||
variable "BASE_DEBIAN" {
|
||||
default = "public.ecr.aws/docker/library/debian:bookworm-slim"
|
||||
}
|
||||
|
||||
variable "BASE_DISTROLESS" {
|
||||
default = "gcr.io/distroless/static-debian12:nonroot"
|
||||
}
|
||||
|
||||
variable "BASE_NODE" {
|
||||
default = "public.ecr.aws/docker/library/node:22-alpine"
|
||||
}
|
||||
|
||||
variable "BASE_NGINX" {
|
||||
default = "public.ecr.aws/docker/library/nginx:1.27-alpine"
|
||||
}
|
||||
|
||||
variable "BASE_UBUNTU" {
|
||||
default = "public.ecr.aws/docker/library/ubuntu:noble"
|
||||
}
|
||||
|
||||
function "go-cache-from" {
|
||||
params = []
|
||||
result = notequal("", CACHE_REF_GO) ? ["type=registry,ref=${CACHE_REF_GO}"] : []
|
||||
}
|
||||
|
||||
# Экспорт кэша — только go-build-all / web-build (один writer на ref).
|
||||
# Несколько target с cache-to в один ref и mode=max дают гонку в registry
|
||||
# (content descriptor not found при параллельном bake).
|
||||
# Экспорт кэша — один writer на ref (параллельный cache-to в один ref ломает manifest).
|
||||
function "go-cache-to-export" {
|
||||
params = []
|
||||
result = notequal("", CACHE_REF_GO) ? ["type=registry,ref=${CACHE_REF_GO},mode=max"] : []
|
||||
@@ -58,6 +83,16 @@ function "web-cache-to-export" {
|
||||
result = notequal("", CACHE_REF_WEB) ? ["type=registry,ref=${CACHE_REF_WEB},mode=max"] : []
|
||||
}
|
||||
|
||||
function "birdc-cache-from" {
|
||||
params = []
|
||||
result = notequal("", CACHE_REF_BIRDC) ? ["type=registry,ref=${CACHE_REF_BIRDC}"] : []
|
||||
}
|
||||
|
||||
function "birdc-cache-to-export" {
|
||||
params = []
|
||||
result = notequal("", CACHE_REF_BIRDC) ? ["type=registry,ref=${CACHE_REF_BIRDC},mode=max"] : []
|
||||
}
|
||||
|
||||
group "default" {
|
||||
targets = ["go-images", "web-images", "evobgp-bird2"]
|
||||
}
|
||||
@@ -75,26 +110,38 @@ group "go-images" {
|
||||
]
|
||||
}
|
||||
|
||||
# web-deps / web-build — только зависимости (contexts), без tags; при --push в группе не указывать.
|
||||
group "web-images" {
|
||||
targets = ["evobgp-web", "evobgp-web-all"]
|
||||
}
|
||||
|
||||
target "_common" {
|
||||
platforms = ["linux/amd64"]
|
||||
pull = false
|
||||
}
|
||||
|
||||
target "_go-bases" {
|
||||
args = {
|
||||
BASE_GOLANG = BASE_GOLANG
|
||||
BASE_DEBIAN = BASE_DEBIAN
|
||||
BASE_DISTROLESS = BASE_DISTROLESS
|
||||
}
|
||||
}
|
||||
|
||||
# --- Go: go mod download → все cmd/* → birdc (один раз) → runtime-образы ---
|
||||
|
||||
target "go-deps" {
|
||||
inherits = ["_common", "_go-bases"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/gobinary/Dockerfile"
|
||||
target = "deps"
|
||||
platforms = ["linux/amd64"]
|
||||
cache-from = go-cache-from()
|
||||
}
|
||||
|
||||
target "go-build-all" {
|
||||
inherits = ["_common", "_go-bases"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/gobinary/Dockerfile"
|
||||
target = "build-all"
|
||||
platforms = ["linux/amd64"]
|
||||
args = {
|
||||
VERSION = VERSION
|
||||
GIT_SHA = notequal("", SHA_FULL) ? SHA_FULL : SHORT_SHA
|
||||
@@ -108,18 +155,19 @@ target "go-build-all" {
|
||||
}
|
||||
|
||||
target "go-birdc" {
|
||||
inherits = ["_common", "_go-bases"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/gobinary/Dockerfile"
|
||||
target = "birdc"
|
||||
platforms = ["linux/amd64"]
|
||||
cache-from = go-cache-from()
|
||||
cache-from = birdc-cache-from()
|
||||
cache-to = birdc-cache-to-export()
|
||||
}
|
||||
|
||||
target "_go-runtime" {
|
||||
inherits = ["_common", "_go-bases"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/gobinary/Dockerfile"
|
||||
target = "runtime"
|
||||
platforms = ["linux/amd64"]
|
||||
contexts = {
|
||||
build-all = "target:go-build-all"
|
||||
}
|
||||
@@ -127,15 +175,15 @@ target "_go-runtime" {
|
||||
}
|
||||
|
||||
target "_go-runtime-birdc" {
|
||||
inherits = ["_common", "_go-bases"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/gobinary/Dockerfile"
|
||||
target = "runtime-birdc"
|
||||
platforms = ["linux/amd64"]
|
||||
contexts = {
|
||||
build-all = "target:go-build-all"
|
||||
birdc = "target:go-birdc"
|
||||
}
|
||||
cache-from = go-cache-from()
|
||||
cache-from = concat(go-cache-from(), birdc-cache-from())
|
||||
}
|
||||
|
||||
function "image-tags" {
|
||||
@@ -198,32 +246,51 @@ target "evobgp-node" {
|
||||
tags = image-tags("evobgp-node")
|
||||
}
|
||||
|
||||
target "evobgp-bird2-base" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/bird2/Dockerfile"
|
||||
target = "bird2-base"
|
||||
args = {
|
||||
BASE_UBUNTU = BASE_UBUNTU
|
||||
}
|
||||
}
|
||||
|
||||
target "evobgp-agent" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/evobgp-agent/Dockerfile"
|
||||
platforms = ["linux/amd64"]
|
||||
contexts = {
|
||||
build-all = "target:go-build-all"
|
||||
build-all = "target:go-build-all"
|
||||
bird2-base = "target:evobgp-bird2-base"
|
||||
}
|
||||
cache-from = go-cache-from()
|
||||
tags = image-tags("evobgp-agent")
|
||||
}
|
||||
|
||||
# --- Web: npm ci (кэш) → build → nginx ---
|
||||
# --- Web ---
|
||||
|
||||
target "web-deps" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/evobgp-web/Dockerfile"
|
||||
target = "deps"
|
||||
platforms = ["linux/amd64"]
|
||||
args = {
|
||||
BASE_NODE = BASE_NODE
|
||||
BASE_NGINX = BASE_NGINX
|
||||
}
|
||||
cache-from = web-cache-from()
|
||||
}
|
||||
|
||||
target "web-build" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/evobgp-web/Dockerfile"
|
||||
target = "build"
|
||||
platforms = ["linux/amd64"]
|
||||
args = {
|
||||
BASE_NODE = BASE_NODE
|
||||
BASE_NGINX = BASE_NGINX
|
||||
}
|
||||
contexts = {
|
||||
deps = "target:web-deps"
|
||||
}
|
||||
@@ -232,34 +299,49 @@ target "web-build" {
|
||||
}
|
||||
|
||||
target "evobgp-web" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/evobgp-web/Dockerfile"
|
||||
target = "web"
|
||||
platforms = ["linux/amd64"]
|
||||
contexts = {
|
||||
web-artifacts = "target:web-build"
|
||||
}
|
||||
args = { EVOBGP_UPSTREAM = "evobgp-api" }
|
||||
args = {
|
||||
EVOBGP_UPSTREAM = "evobgp-api"
|
||||
BASE_NODE = BASE_NODE
|
||||
BASE_NGINX = BASE_NGINX
|
||||
}
|
||||
cache-from = web-cache-from()
|
||||
tags = image-tags("evobgp-web")
|
||||
}
|
||||
|
||||
target "evobgp-web-all" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/evobgp-web/Dockerfile"
|
||||
target = "web"
|
||||
platforms = ["linux/amd64"]
|
||||
contexts = {
|
||||
web-artifacts = "target:web-build"
|
||||
}
|
||||
args = { EVOBGP_UPSTREAM = "evobgp-all" }
|
||||
args = {
|
||||
EVOBGP_UPSTREAM = "evobgp-all"
|
||||
BASE_NODE = BASE_NODE
|
||||
BASE_NGINX = BASE_NGINX
|
||||
}
|
||||
cache-from = web-cache-from()
|
||||
tags = image-tags("evobgp-web-all")
|
||||
}
|
||||
|
||||
target "evobgp-bird2" {
|
||||
inherits = ["_common"]
|
||||
context = "../.."
|
||||
dockerfile = "deploy/docker/bird2/Dockerfile"
|
||||
platforms = ["linux/amd64"]
|
||||
tags = image-tags("evobgp-bird2")
|
||||
target = "bird2"
|
||||
args = {
|
||||
BASE_UBUNTU = BASE_UBUNTU
|
||||
}
|
||||
contexts = {
|
||||
bird2-base = "target:evobgp-bird2-base"
|
||||
}
|
||||
tags = image-tags("evobgp-bird2")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user