diff options
author | 2019-07-30 14:28:34 -0700 | |
---|---|---|
committer | 2019-07-30 14:28:34 -0700 | |
commit | a88700790cfde2af463582fd978fa35406b61538 (patch) | |
tree | f3ce7a9d5f3036cacab3bd79e91a0fbee99e975d | |
parent | CI: ensure count of builds returned by the API is > 0 (diff) |
Log into Docker Hub before building images in test job
-rw-r--r-- | azure-pipelines.yml | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4ea57ee..3b7c1dc 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,6 +14,13 @@ jobs: inputs: scriptPath: scripts/check_dockerfiles.sh + # Without a login the following Docker build tasks won't add image tags + - task: Docker@2 + displayName: 'Log into Docker Hub' + inputs: + command: login + containerRegistry: DockerHubV2 + - task: Docker@2 displayName: 'Build Base Image' condition: and(succeeded(), ne(variables['check.BASE_PULL'], True)) @@ -108,12 +115,11 @@ jobs: BASE_PULL: $[ coalesce(dependencies.test.outputs['check.BASE_PULL'], False) ] steps: - - task: Docker@1 - displayName: 'Login: Docker Hub' + - task: Docker@2 + displayName: 'Log into Docker Hub' inputs: - containerregistrytype: 'Container Registry' - dockerRegistryEndpoint: 'DockerHub' - command: 'login' + command: login + containerRegistry: DockerHubV2 - task: Docker@2 displayName: 'Build Base Image' |