mirror of
https://github.com/zitadel/zitadel.git
synced 2025-01-10 09:53:40 +00:00
cypress workflow with compose
This commit is contained in:
parent
bec1651c08
commit
2b258ac181
20
.github/workflows/cypress.yml
vendored
Normal file
20
.github/workflows/cypress.yml
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
name: CYPRESS e2e
|
||||
|
||||
on:
|
||||
# schedule:
|
||||
# - cron: '*/15 * * * *'
|
||||
workflow_dispatch:
|
||||
|
||||
|
||||
|
||||
env:
|
||||
WORKING_DIR=./
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-18.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v2
|
||||
- name: Build the docker-compose stack
|
||||
run: COMPOSE_DOCKER_CLI_BUILD=1 docker compose --verbose --file ${WORKING_DIR}/e2e/docker-compose-workdir.yaml --file ${WORKING_DIR}/docs/docs/guides/installation/run/docker-compose.yaml --file ${WORKING_DIR}/e2e/docker-compose-overwrite.yaml --env-file ${WORKING_DIR}/e2e/compose.env
|
@ -19,6 +19,26 @@ if ! command -v cypress &> /dev/null; then
|
||||
NPX="npx"
|
||||
fi
|
||||
|
||||
###############################
|
||||
function zitadel-health-check {
|
||||
###############################
|
||||
# this is needed to ensure zitadel has finished its startup
|
||||
i=1
|
||||
until [ $i -gt 10 ]; do
|
||||
HEALTHSTATUS=$(curl zitadel:8080/healthz | tail -n1)
|
||||
if [ $HEALTHSTATUS == '{"status":"ok"}' ]; then
|
||||
echo "ZITADEL is up and running"
|
||||
break
|
||||
else echo "ZITADEL is starting"
|
||||
sleep 1
|
||||
fi
|
||||
i=$[$i+1];
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
zitadel-health-check
|
||||
|
||||
$NPX cypress $ACTION \
|
||||
--port "${E2E_CYPRESSPORT}" \
|
||||
--env org="${ZITADEL_E2E_ORG}",org_owner_password="${ZITADEL_E2E_ORGOWNERPW}",org_owner_viewer_password="${ZITADEL_E2E_ORGOWNERVIEWERPW}",org_project_creator_password="${ZITADEL_E2E_ORGPROJECTCREATORPW}",login_policy_user_password="${ZITADEL_E2E_LOGINPOLICYUSERPW}",password_complexity_user_password="${ZITADEL_E2E_PASSWORDCOMPLEXITYUSERPW}",baseUrl="${ZITADEL_E2E_BASEURL}",serviceAccountKeyPath="${ZITADEL_E2E_MACHINEKEYPATH}",otherZitadelIdpInstance="${ZITADEL_E2E_OTHERZITADELIDPINSTANCE}",zitadelProjectResourceId="${ZITADEL_E2E_ZITADELPROJECTRESOURCEID}" \
|
||||
|
BIN
e2e/dbdump/BACKUP-STATISTICS
Normal file
BIN
e2e/dbdump/BACKUP-STATISTICS
Normal file
Binary file not shown.
BIN
e2e/dbdump/BACKUP_MANIFEST
Normal file
BIN
e2e/dbdump/BACKUP_MANIFEST
Normal file
Binary file not shown.
1
e2e/dbdump/BACKUP_MANIFEST-CHECKSUM
Normal file
1
e2e/dbdump/BACKUP_MANIFEST-CHECKSUM
Normal file
@ -0,0 +1 @@
|
||||
S<EFBFBD>><3E>
|
BIN
e2e/dbdump/data/782709337179422721.sst
Normal file
BIN
e2e/dbdump/data/782709337179422721.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/data/782709337201180673.sst
Normal file
BIN
e2e/dbdump/data/782709337201180673.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/data/782709337210486785.sst
Normal file
BIN
e2e/dbdump/data/782709337210486785.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/data/782709337234604033.sst
Normal file
BIN
e2e/dbdump/data/782709337234604033.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/data/782709337240076289.sst
Normal file
BIN
e2e/dbdump/data/782709337240076289.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/data/782709337253543937.sst
Normal file
BIN
e2e/dbdump/data/782709337253543937.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/fileinfo.sst
Normal file
BIN
e2e/dbdump/fileinfo.sst
Normal file
Binary file not shown.
BIN
e2e/dbdump/metadata.sst
Normal file
BIN
e2e/dbdump/metadata.sst
Normal file
Binary file not shown.
Binary file not shown.
@ -0,0 +1 @@
|
||||
<EFBFBD><0B>w
|
Binary file not shown.
@ -0,0 +1 @@
|
||||
@X<>
|
@ -1,35 +1,33 @@
|
||||
services:
|
||||
zitadel:
|
||||
image: 'zitadel:${BUILD_DATE}'
|
||||
image: 'ghcr.io/zitadel/zitadel:v2.0.0-v2-alpha.44-amd64'
|
||||
command: 'start-from-init --masterkey "MasterkeyNeedsToHave32Characters" --tlsMode disabled'
|
||||
environment:
|
||||
# TODO: ugly
|
||||
ZITADEL_EXTERNALDOMAIN: zitadel
|
||||
ZITADEL_S3DEFAULTINSTANCE_CUSTOMDOMAIN: zitadel
|
||||
|
||||
e2e-setup:
|
||||
build:
|
||||
dockerfile: ./build/e2e/Dockerfile
|
||||
context: ..
|
||||
container_name: e2e-setup
|
||||
env_file:
|
||||
- ./compose.env
|
||||
environment:
|
||||
ZITADEL_DATABASE_HOST: db
|
||||
networks:
|
||||
- 'zitadel'
|
||||
volumes:
|
||||
- ${PWD}/.keys/e2e.json:/.keys/e2e.json
|
||||
depends_on:
|
||||
zitadel:
|
||||
# TODO: See PR #3816
|
||||
# condition: 'service_healthy'
|
||||
condition: service_started
|
||||
db-initialize:
|
||||
condition: service_completed_successfully
|
||||
|
||||
db:
|
||||
volumes:
|
||||
- ${PWD}/e2e/dbdump:/cockroach/cockroach-data/extern/dbdump
|
||||
|
||||
db-initialize:
|
||||
networks:
|
||||
- 'zitadel'
|
||||
image: 'cockroachdb/cockroach:v22.1.0'
|
||||
command: "sql --host db --insecure --execute=\'RESTORE FROM \"nodelocal://0/dbdump/\"\'"
|
||||
depends_on:
|
||||
db:
|
||||
condition: service_healthy
|
||||
|
||||
e2e:
|
||||
image: cypress/included:10.3.0
|
||||
container_name: cypress
|
||||
depends_on:
|
||||
e2e-setup:
|
||||
condition: 'service_completed_successfully'
|
||||
- zitadel
|
||||
env_file:
|
||||
- ./compose.env
|
||||
working_dir: /e2e
|
||||
@ -43,4 +41,3 @@ services:
|
||||
- ${PWD}/console:/e2e
|
||||
networks:
|
||||
- 'zitadel'
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user