mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-21 05:40:27 +00:00
fix
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
"workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
|
||||
"features": {
|
||||
"ghcr.io/devcontainers/features/go:1": {
|
||||
"version": "1.22"
|
||||
"version": "1.24"
|
||||
},
|
||||
"ghcr.io/devcontainers/features/node:1": {},
|
||||
"ghcr.io/guiyomh/features/golangci-lint:0": {},
|
||||
|
@@ -6,6 +6,9 @@ RUN yarn install && yarn generate
|
||||
COPY console/ .
|
||||
COPY docs/frameworks.json ../docs/frameworks.json
|
||||
|
||||
FROM scratch AS generate
|
||||
COPY --from=base /app/src/app/proto/generated/ /console/src/app/proto/generated/
|
||||
|
||||
FROM base AS build
|
||||
RUN yarn build
|
||||
|
||||
|
@@ -14,22 +14,27 @@ COPY openapi/ openapi/
|
||||
COPY pkg/ pkg/
|
||||
COPY proto/ proto/
|
||||
COPY statik/ statik/
|
||||
COPY --from=console ./ internal/api/ui/console/static
|
||||
RUN go version
|
||||
RUN go mod download \
|
||||
&& go install tool \
|
||||
&& go install github.com/goreleaser/goreleaser/v2@latest \
|
||||
&& buf generate && cp -r .artifacts/grpc/github.com/zitadel/zitadel/pkg/grpc/* pkg/grpc/ \
|
||||
&& go generate ./... \
|
||||
&& go run internal/api/assets/generator/asset_generator.go -directory=internal/api/assets/generator/ -assets=docs/apis/assets/assets.md
|
||||
|
||||
FROM scratch AS generate
|
||||
COPY --from=base /app/pkg/grpc/ /pkg/grpc/
|
||||
COPY --from=base /app/openapi/ /openapi/
|
||||
COPY --from=base /app/internal/api/assets/generator/ /internal/api/assets/generator/
|
||||
|
||||
FROM base AS build
|
||||
COPY --from=console ./ internal/api/ui/console/static
|
||||
COPY .goreleaser.yaml ./
|
||||
RUN goreleaser release --snapshot --clean
|
||||
# RUN CGO_ENABLED=0 go build -o zitadel -v -ldflags="-s -w -X 'github.com/zitadel/zitadel/cmd/build.commit=${COMMIT_SHA}' -X 'github.com/zitadel/zitadel/cmd/build.date=${now}' -X 'github.com/zitadel/zitadel/cmd/build.version=${VERSION}' " \
|
||||
# && chmod +x zitadel
|
||||
|
||||
FROM base AS lint
|
||||
COPY --from=console ./ internal/api/ui/console/static
|
||||
COPY .golangci.yaml ./
|
||||
COPY .git/ ./.git/
|
||||
RUN make core_lint
|
||||
@@ -38,7 +43,8 @@ FROM scratch AS output
|
||||
COPY --from=build /app/zitadel .
|
||||
|
||||
FROM base AS unit
|
||||
RUN make core_unit_test
|
||||
COPY --from=console ./ internal/api/ui/console/static
|
||||
RUN go test -race -coverprofile=profile.cov -coverpkg=./internal/... ./...
|
||||
|
||||
FROM debian:latest AS base-image
|
||||
ENV ZITADEL_ARGS=
|
||||
|
@@ -14,6 +14,10 @@ group "build" {
|
||||
targets = ["console-build", "core-build"]
|
||||
}
|
||||
|
||||
group "generate" {
|
||||
targets = ["console-generate" , "core-generate"]
|
||||
}
|
||||
|
||||
group "output" {
|
||||
targets = ["console-output", "core-output"]
|
||||
}
|
||||
@@ -43,31 +47,35 @@ target "console" {
|
||||
name = "console-${tgt}"
|
||||
inherits = ["_console"]
|
||||
matrix = {
|
||||
tgt = ["build", "output", "lint", "image"]
|
||||
tgt = ["build", "output", "lint", "image", "generate"]
|
||||
}
|
||||
output = {
|
||||
"build" = ["type=cacheonly"]
|
||||
"output" = ["type=local,dest=.build/console"]
|
||||
"lint" = ["type=cacheonly"]
|
||||
"image" = ["type=docker"]
|
||||
"generate" = ["type=local,dest=./"]
|
||||
}[tgt]
|
||||
tags = {
|
||||
"build" = []
|
||||
"output" = []
|
||||
"lint" = []
|
||||
"image" = ["${REGISTRY}/console:${GITHUB_SHA}"]
|
||||
"generate" = []
|
||||
}[tgt]
|
||||
cache-to = {
|
||||
"build" = ["type=gha,ignore-error=true,mode=max,scope=console-${tgt}"]
|
||||
"output" = ["type=gha,ignore-error=true,mode=max,scope=console-${tgt}"]
|
||||
"lint" = ["type=gha,ignore-error=true,mode=max,scope=console-${tgt}"]
|
||||
"image" = ["type=gha,ignore-error=true,mode=max,scope=console-${tgt}"]
|
||||
"generate" = ["type=gha,ignore-error=true,mode=max,scope=console-${tgt}"]
|
||||
}[tgt]
|
||||
cache-from = {
|
||||
"build" = ["type=gha,scope=console-${tgt}"]
|
||||
"output" = ["type=gha,scope=console-${tgt}"]
|
||||
"lint" = ["type=gha,scope=console-${tgt}"]
|
||||
"image" = ["type=gha,scope=console-${tgt}"]
|
||||
"generate" = ["type=gha,scope=console-${tgt}"]
|
||||
}[tgt]
|
||||
target = tgt
|
||||
}
|
||||
@@ -90,7 +98,7 @@ target "core" {
|
||||
name = "core-${tgt}"
|
||||
inherits = ["_core"]
|
||||
matrix = {
|
||||
tgt = ["build", "output", "lint", "image", "unit"]
|
||||
tgt = ["build", "output", "lint", "image", "generate", "unit"]
|
||||
}
|
||||
output = {
|
||||
"build" = ["type=cacheonly"]
|
||||
@@ -98,6 +106,7 @@ target "core" {
|
||||
"lint" = ["type=cacheonly"]
|
||||
"unit" = ["type=cacheonly"]
|
||||
"image" = ["type=docker"]
|
||||
"generate" = ["type=local,dest=./"]
|
||||
}[tgt]
|
||||
tags = {
|
||||
"build" = []
|
||||
@@ -105,6 +114,7 @@ target "core" {
|
||||
"lint" = []
|
||||
"unit" = []
|
||||
"image" = ["${REGISTRY}/zitadel:${GITHUB_SHA}"]
|
||||
"generate" = []
|
||||
}[tgt]
|
||||
cache-to = {
|
||||
"build" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
|
||||
@@ -112,6 +122,7 @@ target "core" {
|
||||
"lint" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
|
||||
"unit" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
|
||||
"image" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
|
||||
"generate" = ["type=gha,ignore-error=true,mode=max,scope=core-${tgt}"]
|
||||
}[tgt]
|
||||
cache-from = {
|
||||
"build" = ["type=gha,scope=core-${tgt}"]
|
||||
@@ -119,6 +130,7 @@ target "core" {
|
||||
"lint" = ["type=gha,scope=core-${tgt}"]
|
||||
"unit" = ["type=gha,scope=core-${tgt}"]
|
||||
"image" = ["type=gha,scope=core-${tgt}"]
|
||||
"generate" = ["type=gha,scope=core-${tgt}"]
|
||||
}[tgt]
|
||||
target = tgt
|
||||
}
|
@@ -45,7 +45,7 @@ func oidcError(err error) error {
|
||||
return op.NewStatusError(
|
||||
newOidcErr().
|
||||
WithParent(err).
|
||||
WithDescription(zError.GetMessage()),
|
||||
WithDescription("%s", zError.GetMessage()),
|
||||
statusCode,
|
||||
)
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ func main() {
|
||||
}
|
||||
|
||||
// Write the response to stdout, to be picked up by protoc
|
||||
fmt.Fprintf(os.Stdout, string(out))
|
||||
fmt.Fprintf(os.Stdout, "%s", out)
|
||||
}
|
||||
|
||||
func loadTemplate(templateData []byte) *template.Template {
|
||||
|
Reference in New Issue
Block a user