add build and deploy (ci)
Some checks failed
ci/woodpecker/manual/deploy Pipeline was successful
ci/woodpecker/manual/build Pipeline failed

This commit is contained in:
Simon Vieille 2023-10-18 19:55:32 +02:00
parent 597f0a7a02
commit 7a4dcd83f8
Signed by: deblan
GPG key ID: 579388D585F70417
2 changed files with 43 additions and 0 deletions

11
.woodpecker/build.yml Normal file
View file

@ -0,0 +1,11 @@
steps:
docker:
image: docker:dind
commands:
- docker build -t "deblan_mage:latest" -f "./Dockerfile" .
- docker rm "deblan_mage:latest"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
- event: [push, manual, pull_request]
- branch: [master]

32
.woodpecker/deploy.yml Normal file
View file

@ -0,0 +1,32 @@
steps:
docker:
image: docker:dind
secrets: [registry_user, registry_password, registry_docker_password]
commands:
- echo "$REGISTRY_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin gitnet.fr
- echo "$REGISTRY_DOCKER_PASSWORD" | docker login -u "$REGISTRY_USER" --password-stdin
- docker build -t "deblan/mage:latest" .
- docker tag "deblan/mage:latest" "gitnet.fr/deblan/mage:latest"
- docker push "gitnet.fr/deblan/mage:latest"
- docker push "deblan/php:latest"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
- event: cron
- branch: [master]
mail:
image: deblan/woodpecker-email
settings:
host:
from_secret: mail_host
username:
from_secret: mail_username
password:
from_secret: mail_password
from:
from_secret: mail_from
subject: "[{{ repo.owner }}/{{ repo.name }}] Pipeline #{{ build.number }}: {{ build.status }}"
when:
- event: cron
- status: [success, failure]