You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1.1 KiB

kind: pipeline
type: docker
name: Deploiement
trigger:
event:
- push
steps:
- name: docker-build-and-push
image: plugins/docker
settings:
dockerfile: Dockerfile # ⚠️ On ne met plus "docker/Dockerfile" car le contexte est maintenant dans "docker"
context: docker # ⚠️ Correction du contexte pour éviter l'erreur de chemin
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD
no_cache: true # Force la reconstruction complète de l'image
- name: deploy-container
image: plugins/docker
settings:
registry: hub.codefirst.iut.uca.fr
repo: hub.codefirst.iut.uca.fr/hugo.creneau/portfoliobutcreneauhugo
username:
from_secret: SECRET_REGISTRY_USERNAME
password:
from_secret: SECRET_REGISTRY_PASSWORD
pull: true # S'assure que la dernière version de l'image est bien récupérée
purge: true # Supprime les anciens conteneurs avant de redéployer