kind: pipeline
type: kubernetes
name: Build Images

trigger:
  event:
    - push

steps:
  - name: Build & Publish
    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}
# ---
# kind: pipeline
# type: kubernetes
# name: Deploy beta

# trigger:
#   event:
#     - push
#   branch:
#     - trunk

# steps:
#   - name: discord notification
#     image: appleboy/drone-discord
#     environment:
#       DISCORD_WEBHOOK_ID:
#         from_secret: DISCORD_WEBHOOK_ID
#       DISCORD_WEBHOOK_TOKEN:
#         from_secret: DISCORD_WEBHOOK_TOKEN
#     settings:
#       username: Drone CI
#       message: Weekly Server Update Complete!
#       webhook_id:
#         from_secret: DISCORD_WEBHOOK_ID
#       webhook_token:
#         from_secret: DISCORD_WEBHOOK_TOKEN
