mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-19 11:23:58 +00:00
initial compose setup
This commit is contained in:
12
build/e2e/Dockerfile
Normal file
12
build/e2e/Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ARG GO_VERSION=1.17
|
||||||
|
|
||||||
|
#######################
|
||||||
|
## run initialize setup step for ZITADEL tests
|
||||||
|
#######################
|
||||||
|
FROM golang:${GO_VERSION}
|
||||||
|
RUN mkdir -p /cmd/e2e-setup
|
||||||
|
WORKDIR /
|
||||||
|
|
||||||
|
# copy setup
|
||||||
|
COPY . .
|
||||||
|
RUN e2e/e2e-setup-compose.sh
|
12
e2e/compose.env
Normal file
12
e2e/compose.env
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
ZITADEL_E2E_CYPRESS_PORT=5000
|
||||||
|
ZITADEL_E2E_ORG=e2e-tests
|
||||||
|
ZITADEL_E2E_ORGOWNERPW=Password1!
|
||||||
|
ZITADEL_E2E_ORGOWNERVIEWERPW=Password1!
|
||||||
|
ZITADEL_E2E_ORGPROJECTCREATORPW=Password1!
|
||||||
|
ZITADEL_E2E_PASSWORDCOMPLEXITYUSERPW=Password1!
|
||||||
|
ZITADEL_E2E_LOGINPOLICYUSERPW=Password1!
|
||||||
|
ZITADEL_E2E_MACHINEKEYPATH="${projectRoot}/.keys/e2e.json"
|
||||||
|
ZITADEL_E2E_BASEURL="http://zitadel:8080"
|
||||||
|
ZITADEL_E2E_OTHERZITADELIDPINSTANCE=false
|
||||||
|
ZITADEL_E2E_ZITADELPROJECTRESOURCEID="bignumber-$(echo -n $(${projectRoot}/e2e/docker-compose.sh exec --no-TTY db cockroach sql --database zitadel --insecure --execute "select aggregate_id from eventstore.events where event_type = 'project.added' and event_data = '{\"name\": \"ZITADEL\"}';" --format tsv) | cut -d " " -f 2)"
|
||||||
|
ZITADEL_E2E_INSTANCEID="$(echo -n $(${projectRoot}/e2e/docker-compose.sh exec --no-TTY db cockroach sql --database zitadel --insecure --execute "select aggregate_id from eventstore.events where event_type = 'instance.added' and event_data = '{\"name\": \"Localhost\"}';" --format tsv) | cut -d " " -f 2)"
|
@@ -1,3 +1,29 @@
|
|||||||
services:
|
services:
|
||||||
zitadel:
|
zitadel:
|
||||||
image: 'zitadel:${BUILD_DATE}'
|
image: 'zitadel:${BUILD_DATE}'
|
||||||
|
e2e:
|
||||||
|
image: cypress/included:10.3.0
|
||||||
|
#build: ./e2e
|
||||||
|
container_name: cypress
|
||||||
|
depends_on:
|
||||||
|
- zitadel
|
||||||
|
# note: inside e2e container, the network allows accessing
|
||||||
|
# "zitadel" host under name "zitadel"
|
||||||
|
# so "curl http://web" would return whatever the webserver
|
||||||
|
# in the "web" container is cooking
|
||||||
|
# see https://docs.docker.com/compose/networking/
|
||||||
|
#environment:
|
||||||
|
# - CYPRESS_baseUrl=http://web
|
||||||
|
#command: npx cypress run
|
||||||
|
# mount the host directory e2e/cypress and the file e2e/cypress.config.js as
|
||||||
|
# volumes within the container
|
||||||
|
# this means that:
|
||||||
|
# 1. anything that Cypress writes to these folders (e.g., screenshots,
|
||||||
|
# videos) appears also on the Docker host's filesystem
|
||||||
|
# 2. any change that the developer applies to Cypress files on the host
|
||||||
|
# machine immediately takes effect within the e2e container (no docker
|
||||||
|
# rebuild required).
|
||||||
|
working_dir: /e2e
|
||||||
|
volumes:
|
||||||
|
- /Users/christianjakob/caos/internal/zitadel/console:/e2e
|
||||||
|
# - ./console/cypress.config.js:/e2e/cypress.config.js
|
||||||
|
11
e2e/e2e-setup-compose.sh
Executable file
11
e2e/e2e-setup-compose.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
export projectRoot="."
|
||||||
|
|
||||||
|
set -a
|
||||||
|
source ./e2e/compose.env
|
||||||
|
set +a
|
||||||
|
|
||||||
|
go run ./cmd/e2e-setup/*.go "$@"
|
Reference in New Issue
Block a user