debug and pipeline dev containers

This commit is contained in:
Elio Bischof
2025-07-22 16:56:13 +02:00
parent 5a84f27913
commit 14ef5af29e
12 changed files with 62 additions and 27 deletions

View File

@@ -14,3 +14,5 @@ RUN apt-get update && \
libgtk2.0-0 libgtk-3-0 libgbm-dev libnotify-dev libnss3 libxss1 libasound2 libxtst6 xauth xvfb && \
apt-get clean && \
corepack enable && COREPACK_ENABLE_DOWNLOAD_PROMPT=0 corepack prepare pnpm@9.1.2 --activate
USER node

View File

@@ -17,8 +17,7 @@
4200,
8080
],
"remoteUser": "node",
"onCreateCommand": "pnpm install -g sass@1.64.1 && pnpm install --frozen-lockfile --recursive",
"onCreateCommand": "pnpm install -g sass@1.64.1",
"customizations": {
"jetbrains": {
"settings": {

View File

@@ -2,13 +2,12 @@ services:
devcontainer:
container_name: devcontainer
user: node
build:
context: .
volumes:
- ../../:/workspaces:cached
- /tmp/.X11-unix:/tmp/.X11-unix:cached
- ~/.cache:/home/vscode/.cache:delegated
- home-dot-cache:/home/node/.cache:delegated
command: sleep infinity
working_dir: /workspaces
environment:
@@ -47,6 +46,7 @@ services:
env_file: ../../apps/login/apps/login/.env.test
network_mode: service:devcontainer
environment:
NODE_ENV: test
PORT: 3001
depends_on:
mock-zitadel:
@@ -219,3 +219,4 @@ services:
volumes:
postgres-data:
home-dot-cache:

View File

@@ -1,17 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
"name": "debug-login-integration",
"name": "login-integration-debug",
"dockerComposeFile": [
"../base/docker-compose.yml",
"docker-compose.yml"
],
"service": "debug-login-integration",
"runServices": ["debug-login-integration"],
"service": "login-integration-debug",
"runServices": ["login-integration-debug"],
"workspaceFolder": "/workspaces",
"forwardPorts": [3001],
"remoteUser": "node",
"onCreateCommand": "pnpm install --frozen-lockfile --recursive",
"postAttachCommand": "pnpm turbo daemon clean || pnpm turbo @zitadel/login#dev",
"postAttachCommand": "pnpm turbo daemon clean; pnpm turbo @zitadel/login#dev test:integration:login:debug",
"customizations": {
"jetbrains": {
"settings": {

View File

@@ -1,12 +1,9 @@
services:
debug-login-integration:
login-integration-debug:
extends:
file: ../base/docker-compose.yml
service: devcontainer
container_name: debug-login-integration
environment:
NODE_ENV: 'test'
PORT: 3001
container_name: login-integration-debug
depends_on:
mock-zitadel:
condition: service_started

View File

@@ -0,0 +1,19 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
"name": "login-integration",
"dockerComposeFile": [
"../base/docker-compose.yml"
],
"service": "devcontainer",
"runServices": ["login-integration"],
"workspaceFolder": "/workspaces",
"forwardPorts": [3001],
"onCreateCommand": "pnpm install --frozen-lockfile --recursive && pnpm turbo test:integration:login",
"customizations": {
"jetbrains": {
"settings": {
"com.intellij:app:HttpConfigurable.use_proxy_pac": true
}
}
}
}

View File

@@ -1,17 +1,16 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
"name": "debug-turbo-lint-unit",
"name": "turbo-lint-unit-debug",
"dockerComposeFile": [
"../base/docker-compose.yml",
"docker-compose.yml"
],
"service": "debug-turbo-lint-unit",
"runServices": ["debug-turbo-lint-unit"],
"service": "turbo-lint-unit-debug",
"runServices": ["turbo-lint-unit-debug"],
"workspaceFolder": "/workspaces",
"forwardPorts": [3001],
"remoteUser": "node",
"onCreateCommand": "pnpm install --frozen-lockfile --recursive",
"postAttachCommand": "pnpm turbo daemon clean || pnpm turbo watch lint test:unit",
"postAttachCommand": "pnpm turbo daemon clean; pnpm turbo watch lint test:unit",
"customizations": {
"jetbrains": {
"settings": {

View File

@@ -1,6 +1,6 @@
services:
debug-turbo-lint-unit:
turbo-lint-unit-debug:
extends:
file: ../base/docker-compose.yml
service: devcontainer
container_name: debug-turbo-lint-unit
container_name: turbo-lint-unit-debug

View File

@@ -0,0 +1,18 @@
{
"$schema": "https://raw.githubusercontent.com/devcontainers/spec/refs/heads/main/schemas/devContainer.schema.json",
"name": "turbo-lint-unit",
"dockerComposeFile": [
"../base/docker-compose.yml"
],
"service": "devcontainer",
"runServices": ["devcontainer"],
"workspaceFolder": "/workspaces",
"onCreateCommand": "pnpm install --frozen-lockfile --recursive && pnpm turbo lint test:unit",
"customizations": {
"jetbrains": {
"settings": {
"com.intellij:app:HttpConfigurable.use_proxy_pac": true
}
}
}
}

View File

@@ -2,7 +2,8 @@
"name": "login-test-integration",
"private": true,
"scripts": {
"test:integration": "DISPLAY='' dotenv -e ../../apps/login/.env.test cypress"
"test:integration:login": "cypress run",
"test:integration:login:debug": "cypress open"
},
"devDependencies": {
"@types/node": "^22.14.1",

View File

@@ -4,9 +4,7 @@
"name": "zitadel-monorepo",
"scripts": {
"changeset": "changeset",
"devcontainer": "devcontainer",
"test:integration": "cd apps/login/packages/integration && pnpm test:integration",
"test:acceptance": "cd apps/login/packages/acceptance && pnpm test:acceptance"
"devcontainer": "devcontainer"
},
"pnpm": {
"overrides": {

View File

@@ -14,6 +14,7 @@
"NEXT_PUBLIC_BASE_PATH",
"CUSTOM_REQUEST_HEADERS",
"NODE_ENV",
"PORT",
"INKEEP_API_KEY",
"DISPLAY",
"CYPRESS_DISPLAY"
@@ -27,14 +28,15 @@
"with": [
"lint",
"test:unit",
"test:integration",
"test:integration:login",
"test:acceptance",
"test:e2e"
]
},
"start": {},
"test:unit": {},
"test:integration": {},
"test:integration:login": {},
"test:integration:login:debug": {},
"test:acceptance": {},
"test:e2e": {},
"lint": {},