chore(console): buf stub build (#5215)

* buf gen yaml

* dep, buildcmd

* deps

* buf yml

* buf work

* gen yml

* buf

* buf mod update

* path

* chore: fix buf

* npm package

* build as prodbuild

* trigger

* temp rm basepath

* base href

* generate as prelint

* proto proto

* rm unused gitignore

---------

Co-authored-by: Florian Forster <florian@zitadel.com>
Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Max Peintner
2023-02-17 15:09:11 +01:00
committed by GitHub
parent 0ca5760557
commit 40ad36f5fd
10 changed files with 212 additions and 76 deletions

View File

@@ -14,24 +14,14 @@ RUN npm ci
# Sources
COPY console .
COPY --from=zitadel-base:local /proto /proto
COPY --from=zitadel-base:local /usr/local/bin /usr/local/bin/.
COPY build/console build/console/
RUN build/console/generate-grpc.sh
#######################
## copy for local dev
#######################
FROM scratch as npm-copy
COPY --from=npm-base /console/src/app/proto/generated /console/src/app/proto/generated
COPY proto/ /proto/
#######################
## angular lint workspace and prod build
#######################
FROM npm-base as angular-build
RUN npm run lint
RUN npm run prodbuild
RUN npm run build
#######################
## Only Copy Assets

View File

@@ -1,17 +0,0 @@
#!/bin/sh
set -eux
GEN_PATH=src/app/proto/generated
echo "Create folders"
mkdir -p $GEN_PATH
echo "Generate grpc"
protoc \
-I=/proto/include \
-I=node_modules/google-proto-files \
--js_out=import_style=commonjs,binary:$GEN_PATH \
--grpc-web_out=import_style=typescript,mode=grpcweb:$GEN_PATH \
$(find /proto/include -iname "*.proto")