mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 22:47:35 +00:00
generate from local protos
This commit is contained in:
@@ -1,12 +1,14 @@
|
|||||||
target "proto-files" {
|
|
||||||
context = "./"
|
|
||||||
dockerfile = "dockerfiles/proto-files.Dockerfile"
|
|
||||||
}
|
|
||||||
|
|
||||||
target "typescript-proto-client" {
|
target "typescript-proto-client" {
|
||||||
context = "./"
|
|
||||||
dockerfile = "dockerfiles/typescript-proto-client.Dockerfile"
|
|
||||||
contexts = {
|
contexts = {
|
||||||
proto-files = "target:proto-files"
|
proto-files = "target:proto-files"
|
||||||
}
|
}
|
||||||
|
output = [
|
||||||
|
"type=local,dest=login/packages/zitadel-proto"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
target "typescript-proto-client-out" {
|
||||||
|
output = [
|
||||||
|
"type=local,dest=login/packages/zitadel-proto"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
|
@@ -1,2 +1,8 @@
|
|||||||
FROM scratch AS proto-files
|
FROM bufbuild/buf:1.54.0 AS proto-files
|
||||||
|
RUN buf export https://github.com/envoyproxy/protoc-gen-validate.git --path validate --output /proto-files && \
|
||||||
|
buf export https://github.com/grpc-ecosystem/grpc-gateway.git --path protoc-gen-openapiv2 --output /proto-files && \
|
||||||
|
buf export https://github.com/googleapis/googleapis.git --path google/api/annotations.proto --path google/api/http.proto --path google/api/field_behavior.proto --output /proto-files
|
||||||
|
|
||||||
|
FROM scratch
|
||||||
|
COPY --from=proto-files /proto-files /
|
||||||
COPY ./proto /
|
COPY ./proto /
|
||||||
|
@@ -2,7 +2,13 @@ FROM login-pnpm AS typescript-proto-client
|
|||||||
COPY ./login/packages/zitadel-proto/package.json ./packages/zitadel-proto/
|
COPY ./login/packages/zitadel-proto/package.json ./packages/zitadel-proto/
|
||||||
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
RUN --mount=type=cache,id=pnpm,target=/pnpm/store \
|
||||||
pnpm install --frozen-lockfile --workspace-root --filter zitadel-proto
|
pnpm install --frozen-lockfile --workspace-root --filter zitadel-proto
|
||||||
COPY --from=proto-files / ./packages/zitadel-proto/proto
|
COPY --from=proto-files /buf.yaml /buf.lock /proto-files/
|
||||||
|
COPY --from=proto-files /zitadel /proto-files/zitadel
|
||||||
COPY ./login/packages/zitadel-proto/buf.gen.yaml ./packages/zitadel-proto/
|
COPY ./login/packages/zitadel-proto/buf.gen.yaml ./packages/zitadel-proto/
|
||||||
RUN ls -la packages/zitadel-proto
|
RUN ls /proto-files && cd packages/zitadel-proto && pnpm exec buf generate /proto-files
|
||||||
RUN cd packages/zitadel-proto && pnpm exec buf generate . --path ./proto/zitadel
|
|
||||||
|
FROM scratch AS typescript-proto-client-out
|
||||||
|
COPY --from=typescript-proto-client /build/packages/zitadel-proto/zitadel /zitadel
|
||||||
|
COPY --from=typescript-proto-client /build/packages/zitadel-proto/google /google
|
||||||
|
COPY --from=typescript-proto-client /build/packages/zitadel-proto/protoc-gen-openapiv2 /protoc-gen-openapiv2
|
||||||
|
COPY --from=typescript-proto-client /build/packages/zitadel-proto/validate /validate
|
||||||
|
Reference in New Issue
Block a user