variables:
  deployment: deploy
  nuget: packages

steps:
- task: NuGetCommand@2
  inputs:
    command: 'restore'
    packDestination: $(nuget)
    projects: WhiteLibrary

- script: |
      pip install -r requirements.txt
  displayName: Install needed compoments from PyPi

- task: VSBuild@1
  inputs:
    solution: UIAutomationTest\UIAutomationTest.csproj

- task: Bash@3
  inputs:
    targetType: inline
    script: echo $BUILD_BUILDNUMBER >> build.info

- script: |
    set DEPLOYMENT=$(deployment)
    deploy.cmd
  continueOnError: false
  displayName: Copy build artifacts to deployment directory

- script: |
    set DEPLOYMENT=$(deployment)
    run_tests.cmd --exclude no_ci --xunit xunit.xml
  continueOnError: true
  displayName: Execute Acceptance tests

- task: PublishTestResults@2
  inputs:
    testRunner: JUnit
    testResultsFiles: output/xunit.xml

- task: PublishBuildArtifacts@1
  displayName: Publish Robot Framework logs and results
  inputs:
    PathtoPublish: output
    ArtifactType: container
    TargetPath: ""
    ArtifactName: Robot Test results

- task: PublishBuildArtifacts@1
  displayName: Publish WhiteLibrary
  inputs:
    PathToPublish: $(deployment)
    ArtifactType: container
    TargetPath: ""
    ArtifactName: WhiteLibrary

variables:
  deployment: deploy
  nuget: packages

steps:
- task: NuGetCommand@2
  inputs:
    command: 'restore'
    packDestination: $(nuget)
    projects: WhiteLibrary

- script: |
      pip install -r requirements.txt
  displayName: Install needed compoments from PyPi

- task: VSBuild@1
  inputs:
    solution: UIAutomationTest\UIAutomationTest.csproj

- task: Bash@3
  inputs:
    targetType: inline
    script: echo $BUILD_BUILDNUMBER >> build.info
  displayName: Generate build.info

- script: |
    set DEPLOYMENT=$(deployment)
    deploy.cmd
  continueOnError: false
  displayName: Copy build artifacts to deployment directory

- script: |
    set DEPLOYMENT=$(deployment)
    run_tests.cmd --exclude no_ci --xunit xunit.xml
  continueOnError: true
  displayName: Execute Acceptance tests

- task: PublishTestResults@2
  inputs:
    testRunner: JUnit
    testResultsFiles: output/xunit.xml

- task: PublishBuildArtifacts@1
  displayName: Publish Robot Framework logs and results
  inputs:
    PathtoPublish: output
    ArtifactType: container
    TargetPath: ""
    ArtifactName: Robot Test results

- task: PublishBuildArtifacts@1
  displayName: Publish WhiteLibrary
  inputs:
    PathToPublish: $(deployment)
    ArtifactType: container
    TargetPath: ""
    ArtifactName: WhiteLibrary

Add display name to bash step
Add display name to bash step
