mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 20:37:30 +00:00
pin login dir
This commit is contained in:
22
Makefile
22
Makefile
@@ -1,14 +1,16 @@
|
||||
XDG_CACHE_HOME ?= $(HOME)/.cache
|
||||
export CACHE_DIR ?= $(XDG_CACHE_HOME)/zitadel-make
|
||||
|
||||
export LOGIN_DIR := $(dir $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST)))
|
||||
|
||||
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 UID := $(id -u)
|
||||
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 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
|
||||
|
||||
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
|
||||
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:
|
||||
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
|
||||
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) \
|
||||
$(CORE_MOCK_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
|
||||
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
|
||||
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:
|
||||
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
|
||||
./scripts/run_or_skip.sh login-test-acceptance-run \
|
||||
$(LOGIN_DIR)scripts/run_or_skip.sh login-test-acceptance-run \
|
||||
"$(LOGIN_TAG) \
|
||||
$(ZITADEL_TAG) \
|
||||
$(POSTGRES_TAG) \
|
||||
|
@@ -1,30 +1,43 @@
|
||||
variable "LOGIN_DIR" {
|
||||
default = "./"
|
||||
}
|
||||
|
||||
variable "DOCKERFILES_DIR" {
|
||||
default = "dockerfiles/"
|
||||
}
|
||||
|
||||
target "login-pnpm" {
|
||||
dockerfile = "dockerfiles/login-pnpm.Dockerfile"
|
||||
}
|
||||
context = "${LOGIN_DIR}"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-pnpm.Dockerfile"
|
||||
}
|
||||
|
||||
target "login-dev-base" {
|
||||
dockerfile = "dockerfiles/login-dev-base.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-dev-base.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-pnpm = "target:login-pnpm"
|
||||
}
|
||||
}
|
||||
|
||||
target "login-lint" {
|
||||
dockerfile = "dockerfiles/login-lint.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-lint.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-dev-base = "target:login-dev-base"
|
||||
}
|
||||
}
|
||||
|
||||
target "login-test-unit" {
|
||||
dockerfile = "dockerfiles/login-test-unit.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-test-unit.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-client = "target:login-client"
|
||||
}
|
||||
}
|
||||
|
||||
target "login-client" {
|
||||
dockerfile = "dockerfiles/login-client.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-client.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-pnpm = "target:login-pnpm"
|
||||
typescript-proto-client = "target:typescript-proto-client"
|
||||
@@ -32,7 +45,8 @@ target "login-client" {
|
||||
}
|
||||
|
||||
target "typescript-proto-client" {
|
||||
dockerfile = "dockerfiles/typescript-proto-client.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}typescript-proto-client.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
# We directly generate and download the client server-side with buf, so we don't need the proto files
|
||||
login-pnpm = "target:login-pnpm"
|
||||
@@ -43,7 +57,8 @@ target "typescript-proto-client" {
|
||||
# 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.
|
||||
target "proto-files" {
|
||||
dockerfile = "dockerfiles/proto-files.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}proto-files.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-pnpm = "target:login-pnpm"
|
||||
}
|
||||
@@ -54,7 +69,7 @@ variable "CORE_MOCK_TAG" {
|
||||
}
|
||||
|
||||
target "core-mock" {
|
||||
context = "apps/login-test-integration/core-mock"
|
||||
context = "${LOGIN_DIR}apps/login-test-integration/core-mock"
|
||||
contexts = {
|
||||
protos = "target:proto-files"
|
||||
}
|
||||
@@ -67,7 +82,8 @@ variable "LOGIN_TEST_INTEGRATION_TAG" {
|
||||
}
|
||||
|
||||
target "login-test-integration" {
|
||||
dockerfile = "dockerfiles/login-test-integration.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-test-integration.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-pnpm = "target:login-pnpm"
|
||||
}
|
||||
@@ -80,7 +96,8 @@ variable "LOGIN_TEST_ACCEPTANCE_TAG" {
|
||||
}
|
||||
|
||||
target "login-test-acceptance" {
|
||||
dockerfile = "dockerfiles/login-test-acceptance.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-test-acceptance.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-pnpm = "target:login-pnpm"
|
||||
}
|
||||
@@ -97,7 +114,8 @@ target "docker-metadata-action" {}
|
||||
# We run integration and acceptance tests against the next standalone server for docker.
|
||||
target "login-standalone" {
|
||||
inherits = ["docker-metadata-action"]
|
||||
dockerfile = "dockerfiles/login-standalone.Dockerfile"
|
||||
dockerfile = "${DOCKERFILES_DIR}login-standalone.Dockerfile"
|
||||
context = "${LOGIN_DIR}"
|
||||
contexts = {
|
||||
login-client = "target:login-client"
|
||||
}
|
||||
|
Reference in New Issue
Block a user