kind: pipeline
type: kubernetes
name: Build Images

trigger:
  event:
    - push

steps:
  - name: Build & Publish Catalog
    image: plugins/kaniko
    settings:
      dockerfile: "./src/Dockerfile.prod-backend"
      context: "./src"
      registry: git.vdhsn.com
      repo: git.vdhsn.com/barretthousen/service-catalog
      username:
        from_secret: DOCKER_USERNAME
      password:
        from_secret: DOCKER_PASSWORD
      args:
        - "service=catalog"
      no-push: true
      tags:
        - ${DRONE_COMMIT_SHA}
  - name: Build & Publish Runner
    image: plugins/kaniko
    settings:
      dockerfile: "./src/Dockerfile.prod-backend"
      context: "./src"
      registry: git.vdhsn.com
      repo: git.vdhsn.com/barretthousen/service-runner
      username:
        from_secret: DOCKER_USERNAME
      password:
        from_secret: DOCKER_PASSWORD
      args:
        - "service=runner"
      no-push: true
      tags:
        - ${DRONE_COMMIT_SHA}
