mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-21 09:40:49 +00:00
remove old ci
This commit is contained in:
@@ -8,8 +8,7 @@ COPY openapi/ openapi/
|
|||||||
COPY pkg/ pkg/
|
COPY pkg/ pkg/
|
||||||
COPY proto/ proto/
|
COPY proto/ proto/
|
||||||
COPY statik/ statik/
|
COPY statik/ statik/
|
||||||
RUN go version
|
COPY --from=console ./ internal/api/ui/console/static
|
||||||
RUN go env
|
|
||||||
RUN go mod download \
|
RUN go mod download \
|
||||||
&& go install tool \
|
&& go install tool \
|
||||||
&& buf generate && cp -r .artifacts/grpc/github.com/zitadel/zitadel/pkg/grpc/* pkg/grpc/ \
|
&& buf generate && cp -r .artifacts/grpc/github.com/zitadel/zitadel/pkg/grpc/* pkg/grpc/ \
|
||||||
@@ -26,7 +25,6 @@ ARG OS=
|
|||||||
ARG ARCH=
|
ARG ARCH=
|
||||||
ARG COMMIT_SHA=
|
ARG COMMIT_SHA=
|
||||||
ARG VERSION=
|
ARG VERSION=
|
||||||
COPY --from=console ./ internal/api/ui/console/static
|
|
||||||
RUN CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -o zitadel-${OS}-${ARCH} -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}' " \
|
RUN CGO_ENABLED=0 GOOS=${OS} GOARCH=${ARCH} go build -o zitadel-${OS}-${ARCH} -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-${OS}-${ARCH}
|
&& chmod +x zitadel-${OS}-${ARCH}
|
||||||
|
|
||||||
@@ -45,12 +43,24 @@ RUN golangci-lint run \
|
|||||||
--concurrency=$(getconf _NPROCESSORS_ONLN)
|
--concurrency=$(getconf _NPROCESSORS_ONLN)
|
||||||
|
|
||||||
FROM base AS unit-test
|
FROM base AS unit-test
|
||||||
COPY --from=console ./ internal/api/ui/console/static
|
|
||||||
RUN go test -race -coverprofile=profile.cov -coverpkg=./internal/... ./...
|
RUN go test -race -coverprofile=profile.cov -coverpkg=./internal/... ./...
|
||||||
|
|
||||||
FROM scratch AS unit
|
FROM scratch AS unit
|
||||||
COPY --from=unit-test /app/profile.cov .
|
COPY --from=unit-test /app/profile.cov .
|
||||||
|
|
||||||
|
FROM base AS integration
|
||||||
|
ENV DOCKER_HOST=tcp://docker:2375
|
||||||
|
#RUN go build -cover -race -tags integration -o zitadel.test main.go
|
||||||
|
RUN docker-compose -f internal/integration/config/docker-compose.yaml up --pull always --wait cache
|
||||||
|
RUN GORACE="halt_on_error=1" ./zitadel.test init --config internal/integration/config/zitadel.yaml --config internal/integration/config/postgres.yaml
|
||||||
|
RUN GORACE="halt_on_error=1" ./zitadel.test setup --masterkeyFromEnv --init-projections --config internal/integration/config/zitadel.yaml --config internal/integration/config/postgres.yaml --steps internal/integration/config/steps.yaml
|
||||||
|
RUN GORACE="log_path=tmp/race.log" \
|
||||||
|
./zitadel.test start --masterkeyFromEnv --config internal/integration/config/zitadel.yaml --config internal/integration/config/postgres.yaml \
|
||||||
|
> tmp/zitadel.log 2>&1 \
|
||||||
|
& printf $$! > tmp/zitadel.pid
|
||||||
|
RUN go test -race -count 1 -tags integration -timeout 30m $$(go list -tags integration ./... | grep "integration_test")
|
||||||
|
RUN docker-compose -f internal/integration/config/docker-compose.yaml down
|
||||||
|
|
||||||
FROM debian:latest AS base-image
|
FROM debian:latest AS base-image
|
||||||
ENV ZITADEL_ARGS=
|
ENV ZITADEL_ARGS=
|
||||||
ARG TARGETOS
|
ARG TARGETOS
|
||||||
|
Reference in New Issue
Block a user