mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 17:57:33 +00:00
Merge commit '1bb01f82de263c9f5ecec34004de5697d782b9bb' into integrate-login
This commit is contained in:
@@ -1,14 +1,16 @@
|
|||||||
XDG_CACHE_HOME ?= $(HOME)/.cache
|
XDG_CACHE_HOME ?= $(HOME)/.cache
|
||||||
export CACHE_DIR ?= $(XDG_CACHE_HOME)/zitadel-make
|
export CACHE_DIR ?= $(XDG_CACHE_HOME)/zitadel-make
|
||||||
|
|
||||||
|
export LOGIN_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
|
||||||
|
|
||||||
export BAKE_CLI ?= docker buildx bake
|
export BAKE_CLI ?= docker buildx bake
|
||||||
BAKE_CLI_WITH_COMMON_ARGS := $(BAKE_CLI) --file ./docker-bake.hcl --file ./apps/login-test-acceptance/docker-compose.yaml
|
BAKE_CLI_WITH_COMMON_ARGS := $(BAKE_CLI) --file $(LOGIN_DIR)docker-bake.hcl --file $(LOGIN_DIR)apps/login-test-acceptance/docker-compose.yaml
|
||||||
|
|
||||||
export COMPOSE_BAKE=true
|
export COMPOSE_BAKE=true
|
||||||
export UID := $(id -u)
|
export UID := $(id -u)
|
||||||
export GID := $(id -g)
|
export GID := $(id -g)
|
||||||
|
|
||||||
export LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT := apps/login-test-acceptance
|
export LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT := $(LOGIN_DIR)apps/login-test-acceptance
|
||||||
|
|
||||||
export DOCKER_METADATA_OUTPUT_VERSION ?= local
|
export DOCKER_METADATA_OUTPUT_VERSION ?= local
|
||||||
export LOGIN_TAG := login:${DOCKER_METADATA_OUTPUT_VERSION}
|
export LOGIN_TAG := login:${DOCKER_METADATA_OUTPUT_VERSION}
|
||||||
@@ -50,17 +52,17 @@ login-test-integration-build:
|
|||||||
$(BAKE_CLI_WITH_COMMON_ARGS) core-mock login-test-integration login-standalone
|
$(BAKE_CLI_WITH_COMMON_ARGS) core-mock login-test-integration login-standalone
|
||||||
|
|
||||||
login-test-integration-dev: login-test-integration-cleanup
|
login-test-integration-dev: login-test-integration-cleanup
|
||||||
$(BAKE_CLI_WITH_COMMON_ARGS) core-mock && docker compose --file ./apps/login-test-integration/docker-compose.yaml run --service-ports --rm core-mock
|
$(BAKE_CLI_WITH_COMMON_ARGS) core-mock && docker compose --file $(LOGIN_DIR)apps/login-test-integration/docker-compose.yaml run --service-ports --rm core-mock
|
||||||
|
|
||||||
login-test-integration-run: login-test-integration-cleanup
|
login-test-integration-run: login-test-integration-cleanup
|
||||||
docker compose --file ./apps/login-test-integration/docker-compose.yaml run --rm integration
|
docker compose --file $(LOGIN_DIR)apps/login-test-integration/docker-compose.yaml run --rm integration
|
||||||
|
|
||||||
login-test-integration-cleanup:
|
login-test-integration-cleanup:
|
||||||
docker compose --file ./apps/login-test-integration/docker-compose.yaml down --volumes
|
docker compose --file $(LOGIN_DIR)apps/login-test-integration/docker-compose.yaml down --volumes
|
||||||
|
|
||||||
.PHONY: login-test-integration
|
.PHONY: login-test-integration
|
||||||
login-test-integration: login-test-integration-build
|
login-test-integration: login-test-integration-build
|
||||||
./scripts/run_or_skip.sh login-test-integration-run \
|
$(LOGIN_DIR)scripts/run_or_skip.sh login-test-integration-run \
|
||||||
"$(LOGIN_TAG) \
|
"$(LOGIN_TAG) \
|
||||||
$(CORE_MOCK_TAG) \
|
$(CORE_MOCK_TAG) \
|
||||||
$(LOGIN_TEST_INTEGRATION_TAG)"
|
$(LOGIN_TEST_INTEGRATION_TAG)"
|
||||||
@@ -75,16 +77,16 @@ login-test-acceptance-build: login-test-acceptance-build-compose login-test-acce
|
|||||||
@:
|
@:
|
||||||
|
|
||||||
login-test-acceptance-dev: login-test-acceptance-build-compose login-test-acceptance-cleanup
|
login-test-acceptance-dev: login-test-acceptance-build-compose login-test-acceptance-cleanup
|
||||||
docker compose --file ./apps/login-test-acceptance/docker-compose.yaml up zitadel setup traefik setup sink
|
docker compose --file $(LOGIN_DIR)apps/login-test-acceptance/docker-compose.yaml up zitadel setup traefik setup sink
|
||||||
|
|
||||||
login-test-acceptance-run: login-test-acceptance-cleanup
|
login-test-acceptance-run: login-test-acceptance-cleanup
|
||||||
docker compose --file ./apps/login-test-acceptance/docker-compose.yaml --file ./apps/login-test-acceptance/docker-compose-ci.yaml run --rm --service-ports acceptance
|
docker compose --file $(LOGIN_DIR)apps/login-test-acceptance/docker-compose.yaml --file $(LOGIN_DIR)apps/login-test-acceptance/docker-compose-ci.yaml run --rm --service-ports acceptance
|
||||||
|
|
||||||
login-test-acceptance-cleanup:
|
login-test-acceptance-cleanup:
|
||||||
docker compose --file ./apps/login-test-acceptance/docker-compose.yaml --file ./apps/login-test-acceptance/docker-compose-ci.yaml down --volumes
|
docker compose --file $(LOGIN_DIR)apps/login-test-acceptance/docker-compose.yaml --file $(LOGIN_DIR)apps/login-test-acceptance/docker-compose-ci.yaml down --volumes
|
||||||
|
|
||||||
login-test-acceptance: login-test-acceptance-build
|
login-test-acceptance: login-test-acceptance-build
|
||||||
./scripts/run_or_skip.sh login-test-acceptance-run \
|
$(LOGIN_DIR)scripts/run_or_skip.sh login-test-acceptance-run \
|
||||||
"$(LOGIN_TAG) \
|
"$(LOGIN_TAG) \
|
||||||
$(ZITADEL_TAG) \
|
$(ZITADEL_TAG) \
|
||||||
$(POSTGRES_TAG) \
|
$(POSTGRES_TAG) \
|
||||||
|
@@ -1,30 +1,43 @@
|
|||||||
|
variable "LOGIN_DIR" {
|
||||||
|
default = "./"
|
||||||
|
}
|
||||||
|
|
||||||
|
variable "DOCKERFILES_DIR" {
|
||||||
|
default = "dockerfiles/"
|
||||||
|
}
|
||||||
|
|
||||||
target "login-pnpm" {
|
target "login-pnpm" {
|
||||||
dockerfile = "dockerfiles/login-pnpm.Dockerfile"
|
context = "${LOGIN_DIR}"
|
||||||
}
|
dockerfile = "${DOCKERFILES_DIR}login-pnpm.Dockerfile"
|
||||||
|
}
|
||||||
|
|
||||||
target "login-dev-base" {
|
target "login-dev-base" {
|
||||||
dockerfile = "dockerfiles/login-dev-base.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-dev-base.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-pnpm = "target:login-pnpm"
|
login-pnpm = "target:login-pnpm"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target "login-lint" {
|
target "login-lint" {
|
||||||
dockerfile = "dockerfiles/login-lint.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-lint.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-dev-base = "target:login-dev-base"
|
login-dev-base = "target:login-dev-base"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target "login-test-unit" {
|
target "login-test-unit" {
|
||||||
dockerfile = "dockerfiles/login-test-unit.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-test-unit.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-client = "target:login-client"
|
login-client = "target:login-client"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
target "login-client" {
|
target "login-client" {
|
||||||
dockerfile = "dockerfiles/login-client.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-client.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-pnpm = "target:login-pnpm"
|
login-pnpm = "target:login-pnpm"
|
||||||
typescript-proto-client = "target:typescript-proto-client"
|
typescript-proto-client = "target:typescript-proto-client"
|
||||||
@@ -32,18 +45,20 @@ target "login-client" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target "typescript-proto-client" {
|
target "typescript-proto-client" {
|
||||||
dockerfile = "dockerfiles/typescript-proto-client.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}typescript-proto-client.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
# We directly generate and download the client server-side with buf, so we don't need the proto files
|
# We directly generate and download the client server-side with buf, so we don't need the proto files
|
||||||
login-pnpm = "target:login-pnpm"
|
login-pnpm = "target:login-pnpm"
|
||||||
}
|
}
|
||||||
output = ["type=docker"]
|
output = ["type=docker"]
|
||||||
}
|
}
|
||||||
|
|
||||||
# proto-files is only used to build core-mock against which the integration tests run.
|
# proto-files is only used to build core-mock against which the integration tests run.
|
||||||
# To build the proto-client, we use buf to generate and download the client code directly.
|
# To build the proto-client, we use buf to generate and download the client code directly.
|
||||||
target "proto-files" {
|
target "proto-files" {
|
||||||
dockerfile = "dockerfiles/proto-files.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}proto-files.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-pnpm = "target:login-pnpm"
|
login-pnpm = "target:login-pnpm"
|
||||||
}
|
}
|
||||||
@@ -54,11 +69,11 @@ variable "CORE_MOCK_TAG" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target "core-mock" {
|
target "core-mock" {
|
||||||
context = "apps/login-test-integration/core-mock"
|
context = "${LOGIN_DIR}apps/login-test-integration/core-mock"
|
||||||
contexts = {
|
contexts = {
|
||||||
protos = "target:proto-files"
|
protos = "target:proto-files"
|
||||||
}
|
}
|
||||||
tags = ["${CORE_MOCK_TAG}"]
|
tags = ["${CORE_MOCK_TAG}"]
|
||||||
output = ["type=docker"]
|
output = ["type=docker"]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,11 +82,12 @@ variable "LOGIN_TEST_INTEGRATION_TAG" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target "login-test-integration" {
|
target "login-test-integration" {
|
||||||
dockerfile = "dockerfiles/login-test-integration.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-test-integration.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-pnpm = "target:login-pnpm"
|
login-pnpm = "target:login-pnpm"
|
||||||
}
|
}
|
||||||
tags = ["${LOGIN_TEST_INTEGRATION_TAG}"]
|
tags = ["${LOGIN_TEST_INTEGRATION_TAG}"]
|
||||||
output = ["type=docker"]
|
output = ["type=docker"]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -80,11 +96,12 @@ variable "LOGIN_TEST_ACCEPTANCE_TAG" {
|
|||||||
}
|
}
|
||||||
|
|
||||||
target "login-test-acceptance" {
|
target "login-test-acceptance" {
|
||||||
dockerfile = "dockerfiles/login-test-acceptance.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-test-acceptance.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-pnpm = "target:login-pnpm"
|
login-pnpm = "target:login-pnpm"
|
||||||
}
|
}
|
||||||
tags = ["${LOGIN_TEST_ACCEPTANCE_TAG}"]
|
tags = ["${LOGIN_TEST_ACCEPTANCE_TAG}"]
|
||||||
output = ["type=docker"]
|
output = ["type=docker"]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -96,11 +113,12 @@ target "docker-metadata-action" {}
|
|||||||
|
|
||||||
# We run integration and acceptance tests against the next standalone server for docker.
|
# We run integration and acceptance tests against the next standalone server for docker.
|
||||||
target "login-standalone" {
|
target "login-standalone" {
|
||||||
inherits = ["docker-metadata-action"]
|
inherits = ["docker-metadata-action"]
|
||||||
dockerfile = "dockerfiles/login-standalone.Dockerfile"
|
dockerfile = "${DOCKERFILES_DIR}login-standalone.Dockerfile"
|
||||||
|
context = "${LOGIN_DIR}"
|
||||||
contexts = {
|
contexts = {
|
||||||
login-client = "target:login-client"
|
login-client = "target:login-client"
|
||||||
}
|
}
|
||||||
tags = ["${LOGIN_TAG}"]
|
tags = ["${LOGIN_TAG}"]
|
||||||
output = ["type=docker"]
|
output = ["type=docker"]
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user