diff --git a/Tasks/Common/docker-common/dockercommandutils.ts b/Tasks/Common/docker-common/dockercommandutils.ts index 7718180e5a0d..3f11c44e95fb 100644 --- a/Tasks/Common/docker-common/dockercommandutils.ts +++ b/Tasks/Common/docker-common/dockercommandutils.ts @@ -83,6 +83,10 @@ export function getCommandArguments(args: string): string { export async function getLayers(connection: ContainerConnection, imageId: string): Promise { var layers = []; var history = await getHistory(connection, imageId); + if (!history) { + return null; + } + var lines = history.split(/[\r?\n]/); lines.forEach(line => { @@ -178,8 +182,11 @@ async function getHistory(connection: ContainerConnection, image: string): Promi }); } catch (e) { - defer.reject(e); - console.log(e); + // Swallow any exceptions encountered in executing command + // such as --format flag not supported in old docker cli versions + output = null; + defer.resolve(); + tl.warning("Not publishing to image meta data store as get history failed with error " + e); } await defer.promise; diff --git a/Tasks/DockerComposeV0/task.json b/Tasks/DockerComposeV0/task.json index f319813f401b..0986cf91bed3 100644 --- a/Tasks/DockerComposeV0/task.json +++ b/Tasks/DockerComposeV0/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "preview": "false", diff --git a/Tasks/DockerComposeV0/task.loc.json b/Tasks/DockerComposeV0/task.loc.json index 7283cdc1a21b..9cab8923ce35 100644 --- a/Tasks/DockerComposeV0/task.loc.json +++ b/Tasks/DockerComposeV0/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "preview": "false", diff --git a/Tasks/DockerV0/task.json b/Tasks/DockerV0/task.json index fcffe06ade8c..262cf4277290 100644 --- a/Tasks/DockerV0/task.json +++ b/Tasks/DockerV0/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "preview": "false", diff --git a/Tasks/DockerV0/task.loc.json b/Tasks/DockerV0/task.loc.json index 7f90ee971575..2219b1a8a161 100644 --- a/Tasks/DockerV0/task.loc.json +++ b/Tasks/DockerV0/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "preview": "false", diff --git a/Tasks/DockerV1/task.json b/Tasks/DockerV1/task.json index 34bbbbd7e4d5..bbfecc3c3df8 100644 --- a/Tasks/DockerV1/task.json +++ b/Tasks/DockerV1/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "releaseNotes": "Simplified the task by:
 - Providing an option to simply select or type a command.
 - Retaining the useful input fields and providing an option to pass the rest as an argument to the command.", diff --git a/Tasks/DockerV1/task.loc.json b/Tasks/DockerV1/task.loc.json index 47583cee5992..0a4c1204e2cc 100644 --- a/Tasks/DockerV1/task.loc.json +++ b/Tasks/DockerV1/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", diff --git a/Tasks/DockerV2/dockerpush.ts b/Tasks/DockerV2/dockerpush.ts index 2f4ea4eabfb9..ea87f9f02b90 100644 --- a/Tasks/DockerV2/dockerpush.ts +++ b/Tasks/DockerV2/dockerpush.ts @@ -124,6 +124,10 @@ async function publishToImageMetadataStore(connection: ContainerConnection, imag const imageUri = getResourceName(imageName, digest); const baseImageName = dockerFilePath ? getBaseImageNameFromDockerFile(dockerFilePath) : "NA"; const layers = await dockerCommandUtils.getLayers(connection, imageName); + if (!layers) { + return null; + } + const imageSize = dockerCommandUtils.getImageSize(layers); // Getting pipeline variables diff --git a/Tasks/DockerV2/task.json b/Tasks/DockerV2/task.json index 289b94fc3bfb..2fa65e5f71c6 100644 --- a/Tasks/DockerV2/task.json +++ b/Tasks/DockerV2/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "releaseNotes": "Simplified the task YAML by:
 - Removing the Container registry type input
 - Removing complex inputs as they can be passed as arguments to the command.", diff --git a/Tasks/DockerV2/task.loc.json b/Tasks/DockerV2/task.loc.json index 46ad8bb9a936..4438179865c6 100644 --- a/Tasks/DockerV2/task.loc.json +++ b/Tasks/DockerV2/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 2, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes", diff --git a/Tasks/KubernetesManifestV0/task.json b/Tasks/KubernetesManifestV0/task.json index 7354d688016f..3a7929019fdf 100644 --- a/Tasks/KubernetesManifestV0/task.json +++ b/Tasks/KubernetesManifestV0/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 4 + "Minor": 154, + "Patch": 0 }, "demands": [], "groups": [], diff --git a/Tasks/KubernetesManifestV0/task.loc.json b/Tasks/KubernetesManifestV0/task.loc.json index 2b06329c5945..d9e0a8307484 100644 --- a/Tasks/KubernetesManifestV0/task.loc.json +++ b/Tasks/KubernetesManifestV0/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 4 + "Minor": 154, + "Patch": 0 }, "demands": [], "groups": [], diff --git a/Tasks/KubernetesV0/task.json b/Tasks/KubernetesV0/task.json index 81beb0d2c31a..b00da50e908d 100644 --- a/Tasks/KubernetesV0/task.json +++ b/Tasks/KubernetesV0/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "preview": "false", diff --git a/Tasks/KubernetesV0/task.loc.json b/Tasks/KubernetesV0/task.loc.json index 430f4c68d881..b566b7104bbf 100644 --- a/Tasks/KubernetesV0/task.loc.json +++ b/Tasks/KubernetesV0/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 0, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "preview": "false", diff --git a/Tasks/KubernetesV1/task.json b/Tasks/KubernetesV1/task.json index 056581cc8f12..6f7fbccfa10d 100644 --- a/Tasks/KubernetesV1/task.json +++ b/Tasks/KubernetesV1/task.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "releaseNotes": "What's new in Version 1.0:
 Added new service connection type input for easy selection of Azure AKS cluster.
 Replaced output variable input with output variables section that we had added in all tasks.", diff --git a/Tasks/KubernetesV1/task.loc.json b/Tasks/KubernetesV1/task.loc.json index 6d55794aad77..f28c3df3270e 100644 --- a/Tasks/KubernetesV1/task.loc.json +++ b/Tasks/KubernetesV1/task.loc.json @@ -13,8 +13,8 @@ "author": "Microsoft Corporation", "version": { "Major": 1, - "Minor": 153, - "Patch": 3 + "Minor": 154, + "Patch": 0 }, "demands": [], "releaseNotes": "ms-resource:loc.releaseNotes",