Files

81 lines
2.3 KiB
YAML
Raw Permalink Normal View History

services:
postgres:
image: postgres:17.2-alpine3.21
environment:
POSTGRES_USER: sonar
POSTGRES_PASSWORD: sonar-test-only
POSTGRES_DB: sonar
volumes:
- postgres-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U sonar -d sonar"]
interval: 5s
timeout: 3s
retries: 30
gitea:
image: gitea/gitea:1.23.8
environment:
USER_UID: 1000
USER_GID: 1000
GITEA__database__DB_TYPE: sqlite3
GITEA__server__ROOT_URL: http://localhost:3000/
GITEA__security__INSTALL_LOCK: "true"
GITEA__service__DISABLE_REGISTRATION: "false"
ports:
- "${GITEA_HTTP_PORT:-3000}:3000"
- "${GITEA_SSH_PORT:-2222}:22"
volumes:
- gitea-data:/data
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:3000/api/healthz || exit 1"]
interval: 10s
timeout: 5s
retries: 30
sonarqube:
image: sonarqube:25.9.0.112764-community
depends_on:
postgres:
condition: service_healthy
environment:
SONAR_JDBC_URL: jdbc:postgresql://postgres:5432/sonar
SONAR_JDBC_USERNAME: sonar
SONAR_JDBC_PASSWORD: sonar-test-only
ports:
- "${SONAR_HTTP_PORT:-9000}:9000"
volumes:
- sonar-data:/opt/sonarqube/data
- sonar-logs:/opt/sonarqube/logs
- ${BIFROST_PLUGIN_JAR:-./target/sonar-bifrost-plugin-0.1.0-SNAPSHOT.jar}:/opt/sonarqube/extensions/plugins/sonar-bifrost-plugin.jar:ro
healthcheck:
test: ["CMD-SHELL", "curl -fsS http://localhost:9000/api/system/status | grep -q UP"]
interval: 10s
timeout: 5s
retries: 60
e2e:
profiles: [e2e]
build:
context: ./tests/e2e
dockerfile: Dockerfile
environment:
GITEA_URL: http://gitea:3000
GITEA_TEST_USER: ${GITEA_TEST_USER:-bifrost-e2e-admin}
GITEA_TEST_PASSWORD: ${GITEA_TEST_PASSWORD:-bifrost-gitea-test-password}
SONAR_URL: http://sonarqube:9000
SONAR_TEST_PASSWORD: ${SONAR_TEST_PASSWORD:-Bifrost-Sonar-Test-2026-password}
depends_on:
gitea:
condition: service_healthy
sonarqube:
condition: service_healthy
ipc: host
volumes:
- ./target/e2e-results:/workspace/test-results
volumes:
postgres-data:
gitea-data:
sonar-data:
sonar-logs: