From f4e267aa9b3306360ab2addd1c77be9ea6b6fe80 Mon Sep 17 00:00:00 2001 From: Ben Pearce Date: Fri, 14 Feb 2025 11:06:14 +1000 Subject: [PATCH 1/3] added warning message to cli installer v5 --- source/tasks/OctoInstaller/OctoInstallerV5/installer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts b/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts index 2933f147..2ddfbbad 100644 --- a/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts +++ b/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts @@ -15,6 +15,7 @@ export class Installer { public async run(versionSpec: string) { await executeWithSetResult( async () => { + tasks.warning("Octopus CLI v5 is using a deprecated version of the Octopus CLI, we recommend using the latest version."); const endpoint = await new DownloadEndpointRetriever(this.octopurlsUrl).getEndpoint(versionSpec); let toolPath = tools.findLocalTool(TOOL_NAME, endpoint.version); From d7c1d4ad21f1e4b1629f18a20468d3224c98879b Mon Sep 17 00:00:00 2001 From: Ben Pearce Date: Fri, 14 Feb 2025 11:07:28 +1000 Subject: [PATCH 2/3] updated message text --- source/tasks/OctoInstaller/OctoInstallerV5/installer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts b/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts index 2ddfbbad..4b068cb9 100644 --- a/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts +++ b/source/tasks/OctoInstaller/OctoInstallerV5/installer.ts @@ -15,7 +15,7 @@ export class Installer { public async run(versionSpec: string) { await executeWithSetResult( async () => { - tasks.warning("Octopus CLI v5 is using a deprecated version of the Octopus CLI, we recommend using the latest version."); + tasks.warning("This task is using a deprecated version of the Octopus CLI, we recommend using the latest version."); const endpoint = await new DownloadEndpointRetriever(this.octopurlsUrl).getEndpoint(versionSpec); let toolPath = tools.findLocalTool(TOOL_NAME, endpoint.version); From 3cd5709304e9e18291352be6377e164ddf313aea Mon Sep 17 00:00:00 2001 From: Ben Pearce Date: Fri, 14 Feb 2025 11:10:07 +1000 Subject: [PATCH 3/3] add warning to cli runner v5 --- source/tasks/OctoCli/OctoCliV5/octoCli.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/tasks/OctoCli/OctoCliV5/octoCli.ts b/source/tasks/OctoCli/OctoCliV5/octoCli.ts index 0abb837d..f268b425 100644 --- a/source/tasks/OctoCli/OctoCliV5/octoCli.ts +++ b/source/tasks/OctoCli/OctoCliV5/octoCli.ts @@ -1,12 +1,14 @@ import { OctoServerConnectionDetails } from "../../Utils/connection"; import { executeTask } from "../../Utils/octopusTasks"; import { OctopusToolRunner } from "../../Utils/tool"; +import * as tasks from "azure-pipelines-task-lib"; export class OctoCli { constructor(readonly tool: OctopusToolRunner, readonly command: string, readonly connection: OctoServerConnectionDetails) {} public async run(args: string | undefined) { this.tool.arg(this.command); + tasks.warning("This task is using a deprecated version of the Octopus CLI, we recommend using the latest version."); await executeTask(this.tool, "(cli;run;v5)", this.connection, "Succeeded executing octo command.", "Failed to execute octo command.", args); } }