resources:
- repo: self

variables:
- group: Hops


queue:
  name: Hosted Ubuntu 1604

steps:
- powershell: |  
   ((Get-Content -path src\Hops\Views\Shared\_Layout.cshtml -Raw) -replace '{firebaseApiKey}',$env:firebaseApiKey) | Set-Content -Path src\Hops\Views\Shared\_Layout.cshtml
   
  displayName: 'Insert FirebaseApiKey'
  env:
firebaseApiKey: $(firebaseApiKey)

- task: Docker@1
  displayName: 'Build an image'
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: 'Docker Hub'
    imageName: sboulema/hops
    includeLatestTag: true

- task: Docker@1
  displayName: 'Push an image'
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: 'Docker Hub'
    command: 'Push an image'
    imageName: sboulema/hops
    includeLatestTag: true

- task: SSH@0
  displayName: 'Deploy an image'
  inputs:
    sshEndpoint: CurleezBox
    commands: /home/sboulema/deployDockerContainer Hops hops
resources:
- repo: self

variables:
- group: Hops


queue:
  name: Hosted Ubuntu 1604

steps:
- powershell: |  
   ((Get-Content -path src\Hops\Views\Shared\_Layout.cshtml -Raw) -replace '{firebaseApiKey}',$env:firebaseApiKey) | Set-Content -Path src\Hops\Views\Shared\_Layout.cshtml
   
  displayName: 'Insert FirebaseApiKey'
  env:
    firebaseApiKey: $(firebaseApiKey)

- task: Docker@1
  displayName: 'Build an image'
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: 'Docker Hub'
    imageName: sboulema/hops
    includeLatestTag: true

- task: Docker@1
  displayName: 'Push an image'
  inputs:
    containerregistrytype: 'Container Registry'
    dockerRegistryEndpoint: 'Docker Hub'
    command: 'Push an image'
    imageName: sboulema/hops
    includeLatestTag: true

- task: SSH@0
  displayName: 'Deploy an image'
  inputs:
    sshEndpoint: CurleezBox
    commands: /home/sboulema/deployDockerContainer Hops hops
Fix spacing in Azure Pipelines file
Fix spacing in Azure Pipelines file
