kind: pipeline
type: docker
name: panorama

trigger:
  event:
    - push
  branch:
    - master

steps:
  - name: docker-build
    image: plugins/docker
    settings:
      dockerfile: ./Projet-Tut-Panorama-master/Projet-Tut-Panorama-master/Panorama/Dockerfile
      context: ./Projet-Tut-Panorama-master/Projet-Tut-Panorama-master/Panorama/
      registry: hub.codefirst.iut.uca.fr
      repo: hub.codefirst.iut.uca.fr/vincent.astolfi/old_project
      username:
        from_secret: secret-registry-username
      password:
        from_secret: secret-registry-password

  - name: deploy
    image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
    environment:
      IMAGENAME: hub.codefirst.iut.uca.fr/vincent.astolfi/old_project:latest
      CONTAINERNAME: panorama
      COMMAND: create
      OVERWRITE: true
      ADMINS: vincentastolfi
    depends_on: [docker-build]