kind: pipeline
type: docker
name: k8s_tp

trigger:
  event:
    - push

steps:
  - name: docker-build-frontend
    image: plugins/docker
    settings:
      dockerfile: 03_k8s/tp/ressources/database/Dockerfile
      context: .
      registry: hub.codefirst.iut.uca.fr
      mirror: https://proxy.iut.uca.fr:8443
      repo: hub.codefirst.iut.uca.fr/evrard.van_espen/cours_virtualisation_avancee_ETUD
      username:
        from_secret: SECRET_REGISTRY_USERNAME
      password:
        from_secret: SECRET_REGISTRY_PASSWORD
  - name: deploy-container
    image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
    environment:
      IMAGENAME: hub.codefirst.iut.uca.fr/evrard.van_espen/database:latest
      CONTAINERNAME: database
      COMMAND: create
      OVERWRITE: true
