From 7bae124fe8830aac2103b34d81425787c5ce25eb Mon Sep 17 00:00:00 2001 From: Ajinkya <11447401+ajinkya599@users.noreply.github.com> Date: Thu, 18 Mar 2021 17:49:42 +0530 Subject: [PATCH] Remove Docker dependency for login/logout. Fixes #14317 --- Tasks/DockerV2/docker.ts | 4 +++- Tasks/DockerV2/task.json | 4 ++-- Tasks/DockerV2/task.loc.json | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Tasks/DockerV2/docker.ts b/Tasks/DockerV2/docker.ts index df6c4d6c51b8..e91a8b0b03c2 100644 --- a/Tasks/DockerV2/docker.ts +++ b/Tasks/DockerV2/docker.ts @@ -14,9 +14,11 @@ let registryAuthenticationToken: RegistryAuthenticationToken = getDockerRegistry // Take the specified command let command = tl.getInput("command", true).toLowerCase(); let isLogout = (command === "logout"); +let isLogin = (command === "login"); +const isDockerRequired = !isLogin && !isLogout; // Connect to any specified container registry -let connection = new ContainerConnection(); +let connection = new ContainerConnection(isDockerRequired); connection.open(null, registryAuthenticationToken, true, isLogout); let dockerCommandMap = { diff --git a/Tasks/DockerV2/task.json b/Tasks/DockerV2/task.json index 0441b61c8e6a..5208ae22c35d 100644 --- a/Tasks/DockerV2/task.json +++ b/Tasks/DockerV2/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 181, - "Patch": 2 + "Minor": 185, + "Patch": 0 }, "minimumAgentVersion": "2.172.0", "demands": [], diff --git a/Tasks/DockerV2/task.loc.json b/Tasks/DockerV2/task.loc.json index 32061191b99b..110a54a87f33 100644 --- a/Tasks/DockerV2/task.loc.json +++ b/Tasks/DockerV2/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 181, - "Patch": 2 + "Minor": 185, + "Patch": 0 }, "minimumAgentVersion": "2.172.0", "demands": [],