Skip to content

Commit

Permalink
fix: update versions (#31)
Browse files Browse the repository at this point in the history
* fix: update ZITADEL to version 1.31.1

* fix: update ZITADEL to version 1.31.1

* fix: update ZITADEL to version 1.41.3

* update versions

* update versions
  • Loading branch information
livio-a authored Sep 23, 2021
1 parent 0c48f93 commit bffcf99
Show file tree
Hide file tree
Showing 32 changed files with 37,823 additions and 21,873 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-18.04
strategy:
matrix:
go: ['1.14', '1.15', '1.16']
go: ['1.14', '1.15', '1.16', '1.17']
name: Go ${{ matrix.go }} test
steps:
- uses: actions/checkout@v2
Expand Down
26 changes: 11 additions & 15 deletions build/zitadel/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
ARG GO_VERSION=1.15.8
ARG NODE_VERSION=15.8.0
ARG GO_VERSION=1.17

#######################
## These steps set platform / arch type specific variables
Expand All @@ -17,8 +16,10 @@ ENV PROTOC_ARCH x86_64
## protoc and protoc-gen-grpc-web for later use
#######################
FROM ${BUILDARCH}-base AS base
ARG PROTOC_VERSION=3.13.0
ARG PROTOC_VERSION=3.18.0
ARG PROTOC_ZIP=protoc-${PROTOC_VERSION}-linux-${PROTOC_ARCH}.zip
ARG GATEWAY_VERSION=2.6.0
ARG VALIDATOR_VERSION=0.6.1
ARG TAG_NAME=main


Expand All @@ -32,9 +33,9 @@ RUN curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v${PR
&& rm -f $PROTOC_ZIP

#proto dependencies
RUN curl https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/v0.5.1/validate/validate.proto --create-dirs -o include/validate/validate.proto \
&& curl https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/v2.2.0/protoc-gen-openapiv2/options/annotations.proto --create-dirs -o include/protoc-gen-openapiv2/options/annotations.proto \
&& curl https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/v2.2.0/protoc-gen-openapiv2/options/openapiv2.proto --create-dirs -o include/protoc-gen-openapiv2/options/openapiv2.proto \
RUN curl https://raw.githubusercontent.com/envoyproxy/protoc-gen-validate/v${VALIDATOR_VERSION}/validate/validate.proto --create-dirs -o include/validate/validate.proto \
&& curl https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/v${GATEWAY_VERSION}/protoc-gen-openapiv2/options/annotations.proto --create-dirs -o include/protoc-gen-openapiv2/options/annotations.proto \
&& curl https://raw.githubusercontent.com/grpc-ecosystem/grpc-gateway/v${GATEWAY_VERSION}/protoc-gen-openapiv2/options/openapiv2.proto --create-dirs -o include/protoc-gen-openapiv2/options/openapiv2.proto \
&& curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/annotations.proto --create-dirs -o include/google/api/annotations.proto \
&& curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/http.proto --create-dirs -o include/google/api/http.proto \
&& curl https://raw.githubusercontent.com/googleapis/googleapis/master/google/api/field_behavior.proto --create-dirs -o include/google/api/field_behavior.proto
Expand All @@ -52,11 +53,8 @@ FROM golang:${GO_VERSION} as go-dep
COPY --from=base /proto/include /proto/include

WORKDIR /go/src/github.com/caos/zitadel-go
COPY tools ./tools
COPY ./go.* .

RUN go mod download
RUN ./tools/install.sh
RUN go install google.golang.org/grpc/cmd/[email protected]
RUN go install google.golang.org/protobuf/cmd/[email protected]

#######################
## Go base build
Expand All @@ -72,12 +70,10 @@ RUN mkdir -p /go/src/github.com/caos/zitadel/pkg/grpc/authoption
## generate all pb files and copy them to a new directory
RUN ./build/zitadel/generate-grpc-client.sh ${PROJECT_PATH} \
&& mkdir /zitadel-api \
&& find /go/src/github.com/caos/zitadel/pkg/grpc -iname '*.pb.go' -exec cp --parents \{\} /zitadel-api \;


&& find /go/src/github.com/caos/zitadel-go/pkg/client/zitadel -iname '*.pb.go' -exec cp --parents \{\} /zitadel-api \;
#######################
## prepare generated files for output
#######################
FROM scratch as zitadel-copy
ARG PROJECT_PATH
COPY --from=zitadel-client /zitadel-api/go/src/github.com/caos/zitadel/pkg/grpc /zitadel
COPY --from=zitadel-client /zitadel-api/go/src/github.com/caos/zitadel-go/pkg/client/zitadel /zitadel
5 changes: 5 additions & 0 deletions build/zitadel/generate-grpc-client.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,18 +18,23 @@ protoc \
-I=/proto/include \
--go_opt=module=$PREFIX \
--go-grpc_opt=module=$PREFIX \
--go_opt=Mzitadel/admin.proto=${ZITADEL_IMPORT}/admin \
--go_opt=Mzitadel/app.proto=${ZITADEL_IMPORT}/app \
--go_opt=Mzitadel/auth.proto=${ZITADEL_IMPORT}/auth \
--go_opt=Mzitadel/auth_n_key.proto=${ZITADEL_IMPORT}/authn \
--go_opt=Mzitadel/change.proto=${ZITADEL_IMPORT}/change \
--go_opt=Mzitadel/features.proto=${ZITADEL_IMPORT}/features \
--go_opt=Mzitadel/idp.proto=${ZITADEL_IMPORT}/idp \
--go_opt=Mzitadel/management.proto=${ZITADEL_IMPORT}/management \
--go_opt=Mzitadel/member.proto=${ZITADEL_IMPORT}/member \
--go_opt=Mzitadel/message.proto=${ZITADEL_IMPORT}/message \
--go_opt=Mzitadel/metadata.proto=${ZITADEL_IMPORT}/metadata \
--go_opt=Mzitadel/object.proto=${ZITADEL_IMPORT}/object \
--go_opt=Mzitadel/options.proto=${ZITADEL_IMPORT}/authoption \
--go_opt=Mzitadel/org.proto=${ZITADEL_IMPORT}/org \
--go_opt=Mzitadel/policy.proto=${ZITADEL_IMPORT}/policy \
--go_opt=Mzitadel/project.proto=${ZITADEL_IMPORT}/project \
--go_opt=Mzitadel/text.proto=${ZITADEL_IMPORT}/text \
--go_opt=Mzitadel/user.proto=${ZITADEL_IMPORT}/user \
--go_opt=Mzitadel/text.proto=${ZITADEL_IMPORT}/text \
--go_out /go/src \
Expand Down
5 changes: 3 additions & 2 deletions example/admin/admin.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ func main() {
//- scopes (including the ZITADEL project ID),
//- path to your key json (if not provided by environment variable)
client, err := admin.NewClient(
[]string{oidc.ScopeOpenID, zitadel.ScopeZitadelAPI()},
//zitadel.WithKeyPath("key.json"),
[]string{oidc.ScopeOpenID, zitadel.ScopeProjectID("124406231057084973")},
zitadel.WithCustomURL("http://localhost:50002/oauth/v2", "localhost:50001"),
zitadel.WithInsecure(),
)
if err != nil {
log.Fatalln("could not create client", err)
Expand Down
4 changes: 3 additions & 1 deletion example/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ func main() {
//- scopes (including the ZITADEL project ID),
//- path to your key json (if not provided by environment variable)
client, err := auth.NewClient(
[]string{oidc.ScopeOpenID, zitadel.ScopeZitadelAPI()},
[]string{oidc.ScopeOpenID, zitadel.ScopeProjectID("124406231057084973")},
zitadel.WithCustomURL("http://localhost:50002/oauth/v2", "localhost:50001"),
zitadel.WithInsecure(),
//zitadel.WithKeyPath("key.json"),
)
if err != nil {
Expand Down
17 changes: 10 additions & 7 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@ module github.com/caos/zitadel-go
go 1.16

require (
github.com/caos/oidc v0.15.3
github.com/caos/oidc v0.15.10
github.com/envoyproxy/protoc-gen-validate v0.6.1
github.com/golang/protobuf v1.5.2
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.4.0
golang.org/x/oauth2 v0.0.0-20210427180440-81ed05c6b58c
google.golang.org/genproto v0.0.0-20210426193834-eac7f76ac494
google.golang.org/grpc v1.38.0
google.golang.org/protobuf v1.26.0
github.com/grpc-ecosystem/grpc-gateway/v2 v2.6.0
golang.org/x/net v0.0.0-20210917221730-978cfadd31cf // indirect
golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f
golang.org/x/sys v0.0.0-20210923061019-b8560ed6a9b7 // indirect
golang.org/x/text v0.3.7 // indirect
google.golang.org/genproto v0.0.0-20210921142501-181ce0d877f6
google.golang.org/grpc v1.40.0
google.golang.org/protobuf v1.27.1
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
)
Loading

0 comments on commit bffcf99

Please sign in to comment.