Azure проблемы входа в контейнер devops для нескольких заданий - PullRequest
1 голос
/ 31 января 2020

Я использую сервер с 10 azure агентами devops. Я создал сборку, которая имеет 5 заданий, и время от времени мы получаем ошибку при инициализации контейнера для задания. Изображение уже находится на сервере, поэтому загружать его не нужно, но, как видно из журнала ниже, оно не может войти

Просмотреть необработанный журнал

'1.40'
Docker daemon API version: '1.40'
C:\Program Files\Docker\docker.EXE version --format '{{.Client.APIVersion}}'
'1.40'
Docker client API version: '1.40'
C:\Program Files\Docker\docker.EXE ps --all --quiet --no-trunc --filter "label=413526"
C:\Program Files\Docker\docker.EXE network prune --force --filter "label=413526"
C:\Program Files\Docker\docker.EXE login --username "***" --password *** https://***
WARNING! Using --password via the CLI is insecure. Use --password-stdin.
WARNING! Your password will be stored unencrypted in C:\Users\devagent\.docker\config.json.
Configure a credential helper to remove this warning. See
Login Succeeded
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

C:\Program Files\Docker\docker.EXE pull ***/builds/vs2017:1.0.0.0
Error response from daemon: Get https://***/v2/builds/vs2017/manifests/1.0.0.0: unauthorized: authentication required
##[warning]Docker pull failed with exit code 1, back off 3.597 seconds before retry.
C:\Program Files\Docker\docker.EXE pull ***/builds/vs2017:1.0.0.0
Error response from daemon: Get https://***/v2/builds/vs2017/manifests/1.0.0.0: unauthorized: authentication required
##[warning]Docker pull failed with exit code 1, back off 3.068 seconds before retry.
C:\Program Files\Docker\docker.EXE pull ***/builds/vs2017:1.0.0.0
Error response from daemon: Get https://***/v2/builds/vs2017/manifests/1.0.0.0: unauthorized: authentication required
C:\Program Files\Docker\docker.EXE logout https://***
Not logged in to ***
##[error]Docker pull failed with exit code 1
Finishing

Yaml Build

variables:
    application.Name: 'Product'
    application.version: '5.12.0.0'
name: '$(application.name)_$(application.version)_$(Date:yyyMMdd)$(Rev:.rr)'

resources:
- repo: self
  clean: true
schedules:
- cron: "0 8 * * Mon-Fri"
  displayName: Nightly Build
  branches:
    include:
    - master
    - release/*/base

stages:

- stage: CI
  displayName: 'Continuous Integration'
  condition: |
    or(
      in(variables['Build.Reason'], 'PullRequest'),
      and(
        in(variables['Build.Reason'], 'Manual'),
        eq(variables['ManualCI'], 'true')
        )
      )
  jobs:
  - job: ProductCI
    displayName: Product
    condition: succeeded()
    pool:
      name: DW
    workspace: 
      clean: all
    timeoutInMinutes: 120

    steps:
    - template: templates/product-buildsteps.yml
    - template: templates/product-api-buildsteps.yml


  - job: AutomationCI
    displayName: Automation
    condition: succeeded()
    workspace: 
      clean: all
    pool:
      name: DW
    container:
      image: AzureContainerRepo/builds/vs2017:1.0.0.0
      endpoint: Azure Container Builds
    steps:
    - template: templates/product-automation-buildsteps.yml

  - job: FluentMigratorCI
    displayName: FluentMigrator
    condition: succeeded()
    workspace: 
      clean: all
    pool:
      name: DW
    container:
      image: AzureContainerRepo/builds/vs2017:1.0.0.0
      endpoint: Azure Container Builds
    steps:
    - template: templates/product-fm-buildsteps.yml

  - job: DeploymentCheckerCI
    displayName: Deployment Checker
    condition: succeeded()
    pool:
      name: DW
    container:
      image: AzureContainerRepo/builds/vs2017:1.0.0.0
      endpoint: Azure Container Builds
    steps:
    - template: templates/product-deploymentchecker-buildsteps.yml

...