<commit_before># Build Docker image using Azure Pipelines

jobs:
- job: PlanningPokerDocker
  displayName: PlanningPoker Docker
  dependsOn: PlanningPokerApp

  pool:
    vmImage: ubuntu-latest

  workspace:
    clean: all

  variables:
    DockerImageTagPrefix: b

  steps:
  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: web'
    inputs:
      artifactName: web
      downloadPath: $(System.BinariesDirectory)

  - task: ExtractFiles@1
    displayName: Extract web.zip
    inputs:
      archiveFilePatterns: $(System.BinariesDirectory)/web/web.zip
      destinationFolder: $(System.DefaultWorkingDirectory)/docker/app

  - task: Docker@2
    displayName: Build Docker image
    inputs:
      containerRegistry: $(DockerRegistryEndpointName)
      Dockerfile: docker/Dockerfile
      repository: $(DockerRepositoryName)
      tags: '$(DockerImageTagPrefix)$(Build.BuildId)'<commit_msg>Run Docker tests in build pipeline<commit_after># Build Docker image using Azure Pipelines

jobs:
- job: PlanningPokerDocker
  displayName: PlanningPoker Docker
  dependsOn: PlanningPokerApp

  pool:
    vmImage: ubuntu-latest

  workspace:
    clean: all

  variables:
    PlanningPokerDockerImageTag: 'b$(Build.BuildId)'

  steps:
  - task: DownloadBuildArtifacts@0
    displayName: 'Download artifact: web'
    inputs:
      artifactName: web
      downloadPath: $(System.BinariesDirectory)

  - task: ExtractFiles@1
    displayName: Extract web.zip
    inputs:
      archiveFilePatterns: $(System.BinariesDirectory)/web/web.zip
      destinationFolder: $(System.DefaultWorkingDirectory)/docker/app

  - task: Docker@2
    displayName: Build Docker image
    inputs:
      command: build
      Dockerfile: docker/Dockerfile
      repository: $(DockerRepositoryName)
      tags: $(PlanningPokerDockerImageTag)

  - pwsh: './docker/test/RunTests.ps1 -PlanningPokerImageTag $env:PLANNINGPOKERDOCKERIMAGETAG -TestResultPath "$env:BUILD_STAGINGDIRECTORY/PlanningPokerDocker.TestResult.xml"'
    displayName: 'Run Docker container tests'

  - task: PublishTestResults@2
    displayName: Public Docker container test results
    inputs:
      testResultsFormat: NUnit
      searchFolder: $(Build.StagingDirectory)
      testResultsFiles: PlanningPokerDocker.TestResult.xml
      testRunTitle: Planning Poker - Docker
    condition: succeededOrFailed()

  - task: Docker@2
    displayName: Push Docker image
    inputs:
      command: push
      containerRegistry: $(DockerRegistryEndpointName)
      repository: $(DockerRepositoryName)
      tags: $(PlanningPokerDockerImageTag)
{'fraction_non_alphanumeric': 0.081656346749226, 'fraction_numerical': 0.00348297213622291, 'mean_word_length': 3.849906191369606, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4321005', 'n_tokens_mistral': 788, 'n_tokens_neox': 741, 'n_words': 173}