# Docker image
# Build a Docker image to deploy, run, or push to a container registry.
# Add steps that use Docker Compose, tag images, push to a registry, run an image, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/docker

pool:
  vmImage: 'Ubuntu 16.04'

variables:
  imageName: 'lacledeslan/gamesvr-csgo-tourney'

steps:
- script: docker pull lacledeslan/gamesvr-csgo
  displayName: 'Fetch image lacledeslan/gamesvr-csgo'
- script: docker pull lacledeslan/sourceseer
  displayName: 'Fetch image lacledeslan/sourceseer'
- script: docker build . -f linux.Dockerfile -t $(imageName) --no-cache --build-arg BUILDNODE=Azure;
  displayName: 'Docker Build'
- script: docker run --rm $(imageName) ./ll-tests/gamesvr-csgo-tourney.sh;
  displayName: 'Run Self Tests'
- script: |
    docker login -u $(dockerUser) -p $(dockerPass)
    docker push $(imageName)
  displayName: 'Push to Docker HUB'
#- script: curl -X POST  "https://hooks.microbadger.com/images/lacledeslan/gamesvr-csgo/$(microBadgerToken)"
#  displayName: 'Update MicroBadger'
Set up CI with Azure Pipelines
Set up CI with Azure Pipelines