# Woodpecker CI pipeline for Stonks Oracle # Translates .github/workflows/build.yml into Woodpecker native format # Images push to registry.celestium.life/stonks-oracle/: and :latest steps: lint-python: image: python:3.12-slim commands: - pip install ruff==0.15.10 --quiet - ruff --version - ruff check --output-format=concise . when: event: [push, pull_request] test-python: image: python:3.12-slim commands: - pip install -r requirements.txt --quiet - pip install hypothesis --quiet - pytest tests/ -x --tb=short -q --ignore=tests/integration when: event: [push, pull_request] test-frontend: image: node:24-slim commands: - cd frontend - npm ci - npx vitest --run when: event: [push, pull_request] build-scheduler: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/scheduler registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.scheduler.app when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-symbol-registry: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/symbol-registry registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=uvicorn services.symbol_registry.app:app --host 0.0.0.0 --port 8000 when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-ingestion: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/ingestion registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.ingestion.worker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-parser: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/parser registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.parser.worker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-extractor: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/extractor registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.extractor.worker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-aggregation: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/aggregation registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.aggregation.worker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-recommendation: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/recommendation registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.recommendation.worker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-risk: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/risk registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=uvicorn services.risk.app:app --host 0.0.0.0 --port 8000 when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-broker-adapter: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/broker-adapter registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.adapters.broker_adapter when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-lake-publisher: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/lake-publisher registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=python -m services.lake_publisher.worker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-query-api: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/query-api registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=uvicorn services.api.app:app --host 0.0.0.0 --port 8000 when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-trading-engine: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/trading-engine registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile context: . build_args: - SERVICE_CMD=uvicorn services.trading.app:app --host 0.0.0.0 --port 8000 when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-dashboard: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/dashboard registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: frontend/Dockerfile context: frontend no_cache: true when: event: push branch: main depends_on: - lint-python - test-python - test-frontend build-superset: image: woodpeckerci/plugin-docker-buildx privileged: true settings: repo: registry.celestium.life/stonks-oracle/superset registry: registry.celestium.life custom_dns: 192.168.42.1 no_proxy: "10.0.0.0/8,192.168.0.0/16,127.0.0.1,localhost,.local,.celestium.life" logins: - registry: https://index.docker.io/v1/ username: from_secret: docker_username password: from_secret: docker_password tags: - ${CI_COMMIT_SHA} - latest dockerfile: docker/Dockerfile.superset context: docker when: event: push branch: main depends_on: - lint-python - test-python - test-frontend integration-test: image: alpine/k8s:1.30.2 environment: DOCKERHUB_USER: from_secret: docker_username DOCKERHUB_TOKEN: from_secret: docker_password commands: - bash infra/inttest/run_pipeline.sh --image-tag ${CI_COMMIT_SHA} --results-file inttest-results.json when: event: push branch: main depends_on: - build-scheduler - build-symbol-registry - build-ingestion - build-parser - build-extractor - build-aggregation - build-recommendation - build-risk - build-broker-adapter - build-lake-publisher - build-query-api - build-trading-engine - build-dashboard - build-superset mirror-github: image: alpine/git failure: ignore environment: GITHUB_SSH_KEY: from_secret: github_ssh_key commands: - "[ -z \"$GITHUB_SSH_KEY\" ] && echo 'No SSH key configured, skipping mirror' && exit 0" - mkdir -p ~/.ssh - echo "$GITHUB_SSH_KEY" > ~/.ssh/id_ed25519 - chmod 600 ~/.ssh/id_ed25519 - ssh-keyscan github.com >> ~/.ssh/known_hosts - git remote add github git@github.com:celesrenata/stonks-oracle.git || git remote set-url github git@github.com:celesrenata/stonks-oracle.git - git push github main --force - git push github --tags --force when: event: push branch: main depends_on: - integration-test