Skip to content

Commit

Permalink
Remove Docker dependency for login/logout. Fixes #14317 (#14627)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajinkya599 authored Mar 22, 2021
1 parent 5b187c1 commit c247f6d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
4 changes: 3 additions & 1 deletion Tasks/DockerV2/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
4 changes: 2 additions & 2 deletions Tasks/DockerV2/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 181,
"Patch": 2
"Minor": 185,
"Patch": 0
},
"minimumAgentVersion": "2.172.0",
"demands": [],
Expand Down
4 changes: 2 additions & 2 deletions Tasks/DockerV2/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
"author": "Microsoft Corporation",
"version": {
"Major": 2,
"Minor": 181,
"Patch": 2
"Minor": 185,
"Patch": 0
},
"minimumAgentVersion": "2.172.0",
"demands": [],
Expand Down

0 comments on commit c247f6d

Please sign in to comment.