mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 06:57:33 +00:00
acceptance
This commit is contained in:
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
@@ -43,7 +43,7 @@ jobs:
|
|||||||
- run: make login-quality
|
- run: make login-quality
|
||||||
env:
|
env:
|
||||||
# latest if branch is main, otherwise image version which is the pull request number
|
# latest if branch is main, otherwise image version which is the pull request number
|
||||||
BAKE_CLI: depot bake --file docker-bake.hcl --file docker-bake-ci.hcl
|
BAKE_CLI: depot bake --file docker-bake.hcl --file docker-bake-ci.hcl --file ./apps/login-test-acceptance/docker-compose.yaml --file ./apps/login-test-acceptance/docker-compose-ci.yaml
|
||||||
DEPOT_PROJECT_ID: jp837jn3fm
|
DEPOT_PROJECT_ID: jp837jn3fm
|
||||||
REF_TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
REF_TAG: ${{ github.ref == 'refs/heads/main' && 'latest' || fromJSON(steps.meta.outputs.json).labels['org.opencontainers.image.version'] }}
|
||||||
CACHE_DIR: ${{ runner.temp }}/login-make-cache
|
CACHE_DIR: ${{ runner.temp }}/login-make-cache
|
||||||
|
10
Makefile
10
Makefile
@@ -1,7 +1,7 @@
|
|||||||
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 BAKE_CLI ?= docker buildx bake --file ./docker-bake.hcl
|
export BAKE_CLI ?= docker buildx bake --file ./docker-bake.hcl --file ./apps/login-test-acceptance/docker-compose.yaml
|
||||||
export REF_TAG ?= local
|
export REF_TAG ?= local
|
||||||
export LOGIN_TAG := login:${REF_TAG}
|
export LOGIN_TAG := login:${REF_TAG}
|
||||||
export LOGIN_TEST_UNIT_TAG := login-test-unit:${REF_TAG}
|
export LOGIN_TEST_UNIT_TAG := login-test-unit:${REF_TAG}
|
||||||
@@ -35,13 +35,13 @@ login-help:
|
|||||||
@echo " clean-cache-keys - Remove all cache keys."
|
@echo " clean-cache-keys - Remove all cache keys."
|
||||||
|
|
||||||
login-lint:
|
login-lint:
|
||||||
$(BAKE_CLI) login-lint --print && $(BAKE_CLI) login-lint
|
$(BAKE_CLI) login-lint
|
||||||
|
|
||||||
login-test-unit:
|
login-test-unit:
|
||||||
$(BAKE_CLI) login-test-unit --print && $(BAKE_CLI) login-test-unit
|
$(BAKE_CLI) login-test-unit
|
||||||
|
|
||||||
login-test-integration-build:
|
login-test-integration-build:
|
||||||
$(BAKE_CLI) core-mock login-test-integration --print && $(BAKE_CLI) core-mock login-test-integration
|
$(BAKE_CLI) core-mock login-test-integration
|
||||||
|
|
||||||
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 ./apps/login-test-integration/docker-compose.yaml run --rm integration
|
||||||
@@ -57,7 +57,7 @@ login-test-integration: login-standalone-build login-test-integration-build
|
|||||||
$(LOGIN_TEST_INTEGRATION_TAG)"
|
$(LOGIN_TEST_INTEGRATION_TAG)"
|
||||||
|
|
||||||
login-test-acceptance-build: login-standalone-build
|
login-test-acceptance-build: login-standalone-build
|
||||||
$(BAKE_CLI) --file ./apps/login-test-acceptance/docker-compose.yaml setup sink oidcrp oidcop samlsp samlidp login-test-acceptance
|
$(BAKE_CLI) setup sink oidcrp samlsp login-test-acceptance
|
||||||
|
|
||||||
login-test-acceptance-run: login-acceptance-cleanup
|
login-test-acceptance-run: login-acceptance-cleanup
|
||||||
docker compose --file ./apps/login-test-acceptance/docker-compose.yaml run --rm --service-ports acceptance
|
docker compose --file ./apps/login-test-acceptance/docker-compose.yaml run --rm --service-ports acceptance
|
||||||
|
36
apps/login-test-acceptance/docker-compose-ci.yaml
Normal file
36
apps/login-test-acceptance/docker-compose-ci.yaml
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
services:
|
||||||
|
setup:
|
||||||
|
build:
|
||||||
|
x-bake:
|
||||||
|
cache-to:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-setup-buildcache:${REF_TAG},mode=max,oci-mediatypes=true
|
||||||
|
|
||||||
|
sink:
|
||||||
|
build:
|
||||||
|
x-bake:
|
||||||
|
cache-to:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-sink-buildcache:${REF_TAG},mode=max,oci-mediatypes=true
|
||||||
|
|
||||||
|
oidcrp:
|
||||||
|
build:
|
||||||
|
x-bake:
|
||||||
|
cache-to:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-oidcrp-buildcache:${REF_TAG},mode=max,oci-mediatypes=true
|
||||||
|
|
||||||
|
oidcop:
|
||||||
|
build:
|
||||||
|
x-bake:
|
||||||
|
cache-to:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-oidcop-buildcache:${REF_TAG},mode=max,oci-mediatypes=true
|
||||||
|
|
||||||
|
samlsp:
|
||||||
|
build:
|
||||||
|
x-bake:
|
||||||
|
cache-to:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-samlsp-buildcache:${REF_TAG},mode=max,oci-mediatypes=true
|
||||||
|
|
||||||
|
samlidp:
|
||||||
|
build:
|
||||||
|
x-bake:
|
||||||
|
cache-to:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-samlidp-buildcache:${REF_TAG},mode=max,oci-mediatypes=true
|
@@ -71,11 +71,16 @@ services:
|
|||||||
condition: "service_completed_successfully"
|
condition: "service_completed_successfully"
|
||||||
|
|
||||||
setup:
|
setup:
|
||||||
container_name: acceptance-setup
|
|
||||||
image: ${LOGIN_TEST_ACCEPTANCE_SETUP_TAG:-login-test-acceptance-setup:local}
|
image: ${LOGIN_TEST_ACCEPTANCE_SETUP_TAG:-login-test-acceptance-setup:local}
|
||||||
|
container_name: acceptance-setup
|
||||||
build:
|
build:
|
||||||
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/setup"
|
context: "${LOGIN_TEST_ACCEPTANCE_BUILD_CONTEXT:-.}/setup"
|
||||||
dockerfile: ../go-command.Dockerfile
|
dockerfile: ../go-command.Dockerfile
|
||||||
|
x-bake:
|
||||||
|
output: "type=docker"
|
||||||
|
cache-from:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-setup-buildcache:${REF_TAG}
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-setup-buildcache:latest
|
||||||
entrypoint: "./setup.sh"
|
entrypoint: "./setup.sh"
|
||||||
environment:
|
environment:
|
||||||
PAT_FILE: /pat/zitadel-admin-sa.pat
|
PAT_FILE: /pat/zitadel-admin-sa.pat
|
||||||
@@ -120,6 +125,11 @@ services:
|
|||||||
dockerfile: ../go-command.Dockerfile
|
dockerfile: ../go-command.Dockerfile
|
||||||
args:
|
args:
|
||||||
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
||||||
|
x-bake:
|
||||||
|
output: "type=docker"
|
||||||
|
cache-from:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-sink-buildcache:${REF_TAG}
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-sink-buildcache:latest
|
||||||
environment:
|
environment:
|
||||||
PORT: '3333'
|
PORT: '3333'
|
||||||
command:
|
command:
|
||||||
@@ -145,6 +155,11 @@ services:
|
|||||||
dockerfile: ../go-command.Dockerfile
|
dockerfile: ../go-command.Dockerfile
|
||||||
args:
|
args:
|
||||||
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
||||||
|
x-bake:
|
||||||
|
output: "type=docker"
|
||||||
|
cache-from:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-oidcrp-buildcache:${REF_TAG}
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-oidcrp-buildcache:latest
|
||||||
environment:
|
environment:
|
||||||
API_URL: 'http://traefik'
|
API_URL: 'http://traefik'
|
||||||
API_DOMAIN: 'traefik'
|
API_DOMAIN: 'traefik'
|
||||||
@@ -172,6 +187,11 @@ services:
|
|||||||
dockerfile: ../../go-command.Dockerfile
|
dockerfile: ../../go-command.Dockerfile
|
||||||
args:
|
args:
|
||||||
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
||||||
|
x-bake:
|
||||||
|
output: "type=docker"
|
||||||
|
cache-from:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-oidcop-buildcache:${REF_TAG}
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-oidcop-buildcache:latest
|
||||||
environment:
|
environment:
|
||||||
API_URL: 'http://traefik'
|
API_URL: 'http://traefik'
|
||||||
API_DOMAIN: 'traefik'
|
API_DOMAIN: 'traefik'
|
||||||
@@ -197,6 +217,11 @@ services:
|
|||||||
dockerfile: ../go-command.Dockerfile
|
dockerfile: ../go-command.Dockerfile
|
||||||
args:
|
args:
|
||||||
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
||||||
|
x-bake:
|
||||||
|
output: "type=docker"
|
||||||
|
cache-from:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-samlsp-buildcache:${REF_TAG}
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-samlsp-buildcache:latest
|
||||||
environment:
|
environment:
|
||||||
API_URL: 'http://traefik'
|
API_URL: 'http://traefik'
|
||||||
API_DOMAIN: 'traefik'
|
API_DOMAIN: 'traefik'
|
||||||
@@ -221,6 +246,11 @@ services:
|
|||||||
dockerfile: ../../go-command.Dockerfile
|
dockerfile: ../../go-command.Dockerfile
|
||||||
args:
|
args:
|
||||||
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
- LOGIN_TEST_ACCEPTANCE_GOLANG_TAG=${LOGIN_TEST_ACCEPTANCE_GOLANG_TAG:-golang:1.24-alpine}
|
||||||
|
x-bake:
|
||||||
|
output: "type=docker"
|
||||||
|
cache-from:
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-samlidp-buildcache:${REF_TAG}
|
||||||
|
- type=registry,ref=ghcr.io/zitadel/login-test-acceptance-samlidp-buildcache:latest
|
||||||
environment:
|
environment:
|
||||||
API_URL: 'http://traefik:8080'
|
API_URL: 'http://traefik:8080'
|
||||||
API_DOMAIN: 'traefik'
|
API_DOMAIN: 'traefik'
|
||||||
|
@@ -67,6 +67,7 @@ target "typescript-proto-client" {
|
|||||||
# 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"]
|
||||||
}
|
}
|
||||||
|
|
||||||
# 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.
|
||||||
|
Reference in New Issue
Block a user