fix: switch to buildx plugin and add pip caching for CI
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
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:
parent
3bbb82b6aa
commit
1f065f4b4d
1 changed files with 17 additions and 11 deletions
|
|
@ -13,18 +13,26 @@ steps:
|
||||||
- name: test
|
- name: test
|
||||||
image: python:3.12-slim
|
image: python:3.12-slim
|
||||||
commands:
|
commands:
|
||||||
|
- |
|
||||||
|
if [ -d /woodpecker/pip-cache ]; then
|
||||||
|
echo "Restoring pip cache..."
|
||||||
|
cp -r /woodpecker/pip-cache .pip-cache
|
||||||
|
fi
|
||||||
- python -m venv .venv
|
- 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"
|
- .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
|
- name: build-service-image
|
||||||
image: plugins/docker
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
environment:
|
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
settings:
|
settings:
|
||||||
username: viktorbarzin
|
username: viktorbarzin
|
||||||
password:
|
password:
|
||||||
|
|
@ -36,16 +44,14 @@ steps:
|
||||||
- EXTRAS=api,news,sentiment,trading,backtester
|
- EXTRAS=api,news,sentiment,trading,backtester
|
||||||
- SERVICE_MODULE=api_gateway
|
- SERVICE_MODULE=api_gateway
|
||||||
cache_from:
|
cache_from:
|
||||||
- viktorbarzin/trading-bot-service:latest
|
- type=registry,ref=viktorbarzin/trading-bot-service:latest
|
||||||
tags:
|
tags:
|
||||||
- "build-${CI_PIPELINE_NUMBER}"
|
- "build-${CI_PIPELINE_NUMBER}"
|
||||||
|
|
||||||
- name: build-dashboard-image
|
- name: build-dashboard-image
|
||||||
image: plugins/docker
|
image: woodpeckerci/plugin-docker-buildx
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
environment:
|
|
||||||
DOCKER_BUILDKIT: 1
|
|
||||||
settings:
|
settings:
|
||||||
username: viktorbarzin
|
username: viktorbarzin
|
||||||
password:
|
password:
|
||||||
|
|
@ -56,7 +62,7 @@ steps:
|
||||||
build_args:
|
build_args:
|
||||||
- NGINX_CONF=docker/nginx-k8s.conf
|
- NGINX_CONF=docker/nginx-k8s.conf
|
||||||
cache_from:
|
cache_from:
|
||||||
- viktorbarzin/trading-bot-dashboard:latest
|
- type=registry,ref=viktorbarzin/trading-bot-dashboard:latest
|
||||||
tags:
|
tags:
|
||||||
- "build-${CI_PIPELINE_NUMBER}"
|
- "build-${CI_PIPELINE_NUMBER}"
|
||||||
|
|
||||||
|
|
@ -214,7 +220,7 @@ steps:
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: slack
|
- name: slack
|
||||||
image: woodpeckerci/plugin-slack
|
image: plugins/slack
|
||||||
depends_on:
|
depends_on:
|
||||||
- verify-deploy
|
- verify-deploy
|
||||||
settings:
|
settings:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue