kind: pipeline
type: docker
name: Portfolioo

trigger:
  event:
    - push

steps:
  - name: build-portfolioo
    image: plugins/docker
    settings:
      dockerfile: Dockerfile
      context: .
      registry: hub.codefirst.iut.uca.fr
      repo: hub.codefirst.iut.uca.fr/remi.arnal/portfolioo
      username:
        from_secret: SECRET_USER
      password:
        from_secret: SECRET_PASSWD

  - name: deploy-portfolioo
    image: hub.codefirst.iut.uca.fr/thomas.bellembois/codefirst-dockerproxy-clientdrone:latest
    environment:
      IMAGENAME: hub.codefirst.iut.uca.fr/remi.arnal/portfolioo:latest
      CONTAINERNAME: portfolioo
      COMMAND: create
      OVERWRITE: true
    depends_on: [ build-portfolioo ]
