mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
simplify
This commit is contained in:
@@ -14,4 +14,6 @@ RUN apt-get update && \
|
||||
apt-get clean && \
|
||||
corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@10.13.1 --activate
|
||||
|
||||
COPY --chown=node:node commands /commands
|
||||
|
||||
USER node
|
||||
|
@@ -1 +1,2 @@
|
||||
*
|
||||
!commands
|
39
.devcontainer/base/commands/login-integration.post-attach.sh
Executable file
39
.devcontainer/base/commands/login-integration.post-attach.sh
Executable file
@@ -0,0 +1,39 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo -e "THANKS FOR CONTRIBUTING TO ZITADEL 🚀"
|
||||
echo
|
||||
echo "Your dev container is configured for fixing login integration tests."
|
||||
echo "The login is running in a separate container with the same configuration."
|
||||
echo "It calls the mock-zitadel container which provides a mocked Zitadel gRPC API."
|
||||
echo
|
||||
echo "Also the test suite is configured correctly."
|
||||
echo "For example, run a single test file:"
|
||||
echo "pnpm cypress run --spec integration/integration/login.cy.ts"
|
||||
echo
|
||||
echo "You can also run the test interactively."
|
||||
echo "However, this is only possible from outside the dev container."
|
||||
echo "On your host machine, run:"
|
||||
echo "cd apps/login"
|
||||
echo "pnpm cypress open"
|
||||
echo
|
||||
echo "If you want to change the login code, you can replace the login container by a hot reloading dev server."
|
||||
echo "docker stop login-integration"
|
||||
echo "pnpm turbo dev"
|
||||
echo "Navigate to the page you want to fix, for example:"
|
||||
echo "http://localhost:3001/ui/v2/login/verify?userId=221394658884845598&code=abc"
|
||||
echo "Change some code and reload the page for instant feedback."
|
||||
echo
|
||||
echo "When you are done, make sure all integration tests pass:"
|
||||
echo "pnpm cypress run"
|
||||
echo
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
18
.devcontainer/base/commands/login-integration.update-content.sh
Executable file
18
.devcontainer/base/commands/login-integration.update-content.sh
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
echo "Running in fail-on-errors mode"
|
||||
set -e
|
||||
fi
|
||||
|
||||
pnpm install --frozen-lockfile \
|
||||
--filter @zitadel/login \
|
||||
--filter @zitadel/client \
|
||||
--filter @zitadel/proto \
|
||||
--filter zitadel-monorepo
|
||||
pnpm cypress install
|
||||
pnpm test:integration:login
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
30
.devcontainer/base/commands/turbo-lint-unit.post-attach.sh
Executable file
30
.devcontainer/base/commands/turbo-lint-unit.post-attach.sh
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
echo
|
||||
echo
|
||||
echo
|
||||
echo -e "THANKS FOR CONTRIBUTING TO ZITADEL 🚀"
|
||||
echo
|
||||
echo "Your dev container is configured for fixing linting and unit tests."
|
||||
echo "No other services are running alongside this container."
|
||||
echo
|
||||
echo "To fix all auto-fixable linting errors, run:"
|
||||
echo "pnpm turbo lint:fix"
|
||||
echo
|
||||
echo "To watch console linting errors, run:"
|
||||
echo "pnpm turbo watch lint --filter console"
|
||||
echo
|
||||
echo "To watch @zitadel/client unit test failures, run:"
|
||||
echo "pnpm turbo watch test:unit --filter @zitadel/client"
|
||||
echo
|
||||
echo "To watch @zitadel/login relevant unit tests and linting failures, run:"
|
||||
echo "pnpm turbo watch lint test:unit --filter @zitadel/login..."
|
||||
echo
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
12
.devcontainer/base/commands/turbo-lint-unit.update-content.sh
Executable file
12
.devcontainer/base/commands/turbo-lint-unit.update-content.sh
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" == "true" ]; then
|
||||
set -e
|
||||
fi
|
||||
|
||||
pnpm install --frozen-lockfile --recursive
|
||||
pnpm turbo lint test:unit
|
||||
|
||||
if [ "$FAIL_COMMANDS_ON_ERRORS" != "true" ]; then
|
||||
exit 0
|
||||
fi
|
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
|
||||
"name": "Base Container. Install and run Components yourself",
|
||||
"name": "Base: Build and Run the Components you need",
|
||||
"dockerComposeFile": "docker-compose.yaml",
|
||||
"service": "devcontainer",
|
||||
"runServices": [
|
||||
@@ -8,6 +8,9 @@
|
||||
"db"
|
||||
],
|
||||
"workspaceFolder": "/workspaces",
|
||||
"remoteEnv": {
|
||||
"DISPLAY": ""
|
||||
},
|
||||
"forwardPorts": [
|
||||
3000,
|
||||
3001,
|
||||
|
@@ -2,9 +2,9 @@ services:
|
||||
|
||||
devcontainer:
|
||||
container_name: devcontainer
|
||||
image: "zitadel-devcontainer-base:local"
|
||||
build:
|
||||
context: ../..
|
||||
dockerfile: .devcontainer/base/Dockerfile
|
||||
context: ../base
|
||||
volumes:
|
||||
- ../../:/workspaces:cached
|
||||
command: sleep infinity
|
||||
@@ -12,8 +12,7 @@ services:
|
||||
environment:
|
||||
ZITADEL_DATABASE_POSTGRES_HOST: db
|
||||
ZITADEL_EXTERNALSECURE: false
|
||||
DISPLAY: ' '
|
||||
|
||||
|
||||
db:
|
||||
container_name: db
|
||||
image: postgres:17.0-alpine3.19
|
||||
|
Reference in New Issue
Block a user