fix: switch to buildx plugin and add pip caching for CI
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed

- Use woodpeckerci/plugin-docker-buildx instead of plugins/docker to fix
  Docker daemon connection failures (privileged mode not applied)
- Add pip dependency caching between builds via /woodpecker/pip-cache
- Fix slack plugin image (plugins/slack, not woodpeckerci/plugin-slack)
- Use proper buildx cache_from syntax (type=registry,ref=...)
This commit is contained in:
Viktor Barzin 2026-02-24 23:27:33 +00:00
parent 3bbb82b6aa
commit 1f065f4b4d
No known key found for this signature in database
GPG key ID: 0EB088298288D958

View file

@ -13,18 +13,26 @@ steps:
- name: test
image: python:3.12-slim
commands:
- |
if [ -d /woodpecker/pip-cache ]; then
echo "Restoring pip cache..."
cp -r /woodpecker/pip-cache .pip-cache
fi
- python -m venv .venv
- .venv/bin/pip install --quiet --upgrade pip
- >-
.venv/bin/pip install --quiet ".[api,news,sentiment,trading,backtester,dev]"
.venv/bin/pip install --quiet --upgrade pip
- >-
.venv/bin/pip install --quiet --cache-dir .pip-cache
".[api,news,sentiment,trading,backtester,dev]"
- .venv/bin/pytest tests/ -v --tb=short -m "not integration"
- |
echo "Saving pip cache..."
cp -r .pip-cache /woodpecker/pip-cache 2>/dev/null || true
- name: build-service-image
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
depends_on:
- test
environment:
DOCKER_BUILDKIT: 1
settings:
username: viktorbarzin
password:
@ -36,16 +44,14 @@ steps:
- EXTRAS=api,news,sentiment,trading,backtester
- SERVICE_MODULE=api_gateway
cache_from:
- viktorbarzin/trading-bot-service:latest
- type=registry,ref=viktorbarzin/trading-bot-service:latest
tags:
- "build-${CI_PIPELINE_NUMBER}"
- name: build-dashboard-image
image: plugins/docker
image: woodpeckerci/plugin-docker-buildx
depends_on:
- test
environment:
DOCKER_BUILDKIT: 1
settings:
username: viktorbarzin
password:
@ -56,7 +62,7 @@ steps:
build_args:
- NGINX_CONF=docker/nginx-k8s.conf
cache_from:
- viktorbarzin/trading-bot-dashboard:latest
- type=registry,ref=viktorbarzin/trading-bot-dashboard:latest
tags:
- "build-${CI_PIPELINE_NUMBER}"
@ -214,7 +220,7 @@ steps:
done
- name: slack
image: woodpeckerci/plugin-slack
image: plugins/slack
depends_on:
- verify-deploy
settings: