forked from yvv/decision
ci: pipeline seed séparé (.woodpecker/seed.yml, event: manual)
Pipeline dédié au seeding DB, déclenché uniquement manuellement. Retire le step seed du pipeline principal. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -217,21 +217,6 @@ steps:
|
|||||||
echo "FAIL: app ne repond pas apres 10 minutes"
|
echo "FAIL: app ne repond pas apres 10 minutes"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
||||||
# Seed manuel : déclencher via CI API ou interface Woodpecker (event: manual)
|
|
||||||
- name: seed
|
|
||||||
image: docker:27-cli
|
|
||||||
depends_on:
|
|
||||||
- deploy
|
|
||||||
volumes:
|
|
||||||
- /var/run/docker.sock:/var/run/docker.sock
|
|
||||||
- /opt/libredecision:/opt/libredecision
|
|
||||||
commands:
|
|
||||||
- |
|
|
||||||
PROJECT=$(grep '^COMPOSE_PROJECT_NAME=' /opt/libredecision/.env | cut -d= -f2)
|
|
||||||
docker exec "$PROJECT-backend" python seed.py
|
|
||||||
when:
|
|
||||||
- event: manual
|
|
||||||
|
|
||||||
- name: notify-failure
|
- name: notify-failure
|
||||||
image: alpine:3.20
|
image: alpine:3.20
|
||||||
commands:
|
commands:
|
||||||
|
|||||||
15
.woodpecker/seed.yml
Normal file
15
.woodpecker/seed.yml
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
when:
|
||||||
|
- branch: main
|
||||||
|
event: manual
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: seed
|
||||||
|
image: docker:27-cli
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
- /opt/libredecision:/opt/libredecision
|
||||||
|
commands:
|
||||||
|
- |
|
||||||
|
PROJECT=$(grep '^COMPOSE_PROJECT_NAME=' /opt/libredecision/.env | cut -d= -f2)
|
||||||
|
echo "Seeding $PROJECT-backend..."
|
||||||
|
docker exec "$PROJECT-backend" python seed.py
|
||||||
Reference in New Issue
Block a user