diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/icon.png b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/icon.png
deleted file mode 100644
index cae677b4..00000000
Binary files a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/icon.svg b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/icon.svg
deleted file mode 100644
index 4bef5678..00000000
--- a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/index.ts b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/index.ts
deleted file mode 100644
index ebab652b..00000000
--- a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/index.ts
+++ /dev/null
@@ -1,75 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { multiArgument, connectionArguments, includeAdditionalArgumentsAndProxyConfig, flag, argumentEnquote, argumentIfSet, getOrInstallOctoCommandRunner } from "../../Utils/tool";
-import { createReleaseNotesFile, createVstsConnection, generateReleaseNotesContent, getLinkedReleaseNotes, getVstsEnvironmentVariables } from "../../Utils/environment";
-import { getDefaultOctopusConnectionDetailsOrThrow, resolveProjectName } from "../../Utils/connection";
-import { getOptionalCsvInput } from "../../Utils/inputs";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const environmentVariables = getVstsEnvironmentVariables();
- const vstsConnection = createVstsConnection(environmentVariables);
- const octoConnection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- // @ts-expect-error
- const project = await resolveProjectName(octoConnection, tasks.getInput("ProjectName", true)).then((x) => x.value);
- const releaseNumber = tasks.getInput("ReleaseNumber");
- const channel = tasks.getInput("Channel");
- const changesetCommentReleaseNotes = tasks.getBoolInput("ChangesetCommentReleaseNotes");
- const workItemReleaseNotes = tasks.getBoolInput("WorkItemReleaseNotes");
- const customReleaseNotes = tasks.getInput("CustomReleaseNotes");
- const deployToEnvironments = getOptionalCsvInput("DeployToEnvironment");
- const deployForTenants = getOptionalCsvInput("DeployForTenants");
- const deployForTenantTags = getOptionalCsvInput("DeployForTenantTags");
- const deploymentProgress = tasks.getBoolInput("DeploymentProgress");
- const additionalArguments = tasks.getInput("AdditionalArguments");
-
- const octo = await getOrInstallOctoCommandRunner("create-release");
-
- let linkedReleaseNotes = "";
- if (workItemReleaseNotes || changesetCommentReleaseNotes) {
- linkedReleaseNotes = await getLinkedReleaseNotes(vstsConnection, changesetCommentReleaseNotes, workItemReleaseNotes);
- }
-
- const releaseNotesFile = createReleaseNotesFile(() => {
- // @ts-expect-error
- return generateReleaseNotesContent(environmentVariables, linkedReleaseNotes, customReleaseNotes);
- }, environmentVariables.defaultWorkingDirectory);
-
- const configure = [
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- argumentEnquote("project", project),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "releaseNumber", releaseNumber),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "channel", channel),
- connectionArguments(octoConnection),
- flag("enableServiceMessages", true),
- multiArgument(argumentEnquote, "deployTo", deployToEnvironments),
- flag("progress", deployToEnvironments.length > 0 && deploymentProgress),
- multiArgument(argumentEnquote, "tenant", deployForTenants),
- multiArgument(argumentEnquote, "tenanttag", deployForTenantTags),
- argumentEnquote("releaseNotesFile", releaseNotesFile),
- // @ts-expect-error
- includeAdditionalArgumentsAndProxyConfig(octoConnection.url, additionalArguments),
- ];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(release;create;v3)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Create octopus release succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to create release. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/task.json b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/task.json
deleted file mode 100644
index 331361a0..00000000
--- a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV3/task.json
+++ /dev/null
@@ -1,223 +0,0 @@
-{
- "id": "4E131B60-5532-4362-95B6-7C67D9841B4F",
- "name": "OctopusCreateRelease",
- "friendlyName": "Create Octopus Release",
- "description": "There is a later version of this task, we recommend using the latest version. Create a Release in Octopus Deploy",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Deploy",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 3,
- "Minor": 1,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "releasenotes",
- "displayName": "Release Notes",
- "isExpanded": true
- },
- {
- "name": "deployment",
- "displayName": "Deployment",
- "isExpanded": false
- },
- {
- "name": "tenant",
- "displayName": "Tenants",
- "isExpanded": false
- },
- {
- "name": "additional",
- "displayName": "Additional Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "string",
- "label": "Space (Legacy - Use version 4 of this task)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "False"
- },
- "helpMarkDown": "Version 3 of this task has limited support for spaces. We recommend using version 4 of this task for a better experience."
- },
- {
- "name": "ProjectGroup",
- "type": "pickList",
- "label": "Project Group",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project group within Octopus (this populates the next Project dropdown)."
- },
- {
- "name": "ProjectName",
- "type": "pickList",
- "label": "Project Name",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Octopus Deploy Project Name"
- },
- {
- "name": "ReleaseNumber",
- "type": "string",
- "label": "Release Number",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "The number to use for this release. You can leave this blank if the release number is calculated by Octopus."
- },
- {
- "name": "Channel",
- "type": "pickList",
- "label": "Channel",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The [channel](https://g.octopushq.com/Channels) to use for the release."
- },
- {
- "name": "ChangesetCommentReleaseNotes",
- "type": "boolean",
- "label": "Include Changeset Comments",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Whether to include linked Changeset comments in Octopus Release notes.",
- "groupName": "releasenotes"
- },
- {
- "name": "WorkItemReleaseNotes",
- "type": "boolean",
- "label": "Include Work Items",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Whether to include linked Work Item Titles in Octopus Release notes.",
- "groupName": "releasenotes"
- },
- {
- "name": "CustomReleaseNotes",
- "type": "string",
- "label": "Custom Notes",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Custom notes appended to Octopus Release notes. This field supports markdown. To include newlines, you can use HTML linebreaks.",
- "groupName": "releasenotes"
- },
- {
- "name": "DeployToEnvironment",
- "type": "pickList",
- "label": "To Environment",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Deploy the release to this environment after creating it.",
- "groupName": "deployment"
- },
- {
- "name": "DeployForTenants",
- "type": "pickList",
- "label": "Tenant(s)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Deploy the release for this comma-delimited list of tenants after creating it. Wildcard '*' will deploy to all tenants currently able to deploy to the above provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeployForTenantTags",
- "type": "string",
- "label": "Tenant tag(s)",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Deploy the release for tenants who match these tags and are ready to deploy to the provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeploymentProgress",
- "type": "boolean",
- "label": "Show Deployment Progress",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Output from the deployment will appear in the log. If checked, the task will only succeed if the deployment is successful.",
- "groupName": "deployment"
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExeCreateRelease) for available parameters.",
- "groupName": "additional"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "ProjectGroup",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllProjectGroups",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "ProjectName",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusListProjectsInProjectGroup",
- "parameters": {
- "ProjectGroupId": "$(ProjectGroup)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployToEnvironment",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllEnvironments",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Channel",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectChannels",
- "parameters": {
- "ProjectName": "$(ProjectName)"
- },
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployForTenants",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllTenants",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Create Octopus Release: $(ProjectName)",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/icon.png b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/icon.png
deleted file mode 100644
index cae677b4..00000000
Binary files a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/icon.svg b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/icon.svg
deleted file mode 100644
index 4bef5678..00000000
--- a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/index.ts b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/index.ts
deleted file mode 100644
index b9f2fc0a..00000000
--- a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/index.ts
+++ /dev/null
@@ -1,83 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { createReleaseNotesFile, createVstsConnection, generateReleaseNotesContent, getLinkedReleaseNotes, getVstsEnvironmentVariables } from "../../Utils/environment";
-import { argumentEnquote, argumentIfSet, assertOctoVersionAcceptsIds, connectionArguments, flag, getOrInstallOctoCommandRunner, includeAdditionalArgumentsAndProxyConfig, multiArgument } from "../../Utils/tool";
-import { getOptionalCsvInput } from "../../Utils/inputs";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const environmentVariables = getVstsEnvironmentVariables();
- const vstsConnection = createVstsConnection(environmentVariables);
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- const project = tasks.getInput("ProjectName", true);
- const releaseNumber = tasks.getInput("ReleaseNumber");
- const channel = tasks.getInput("Channel");
- const changesetCommentReleaseNotes = tasks.getBoolInput("ChangesetCommentReleaseNotes");
- const workItemReleaseNotes = tasks.getBoolInput("WorkItemReleaseNotes");
- const customReleaseNotes = tasks.getInput("CustomReleaseNotes");
- const deployToEnvironments = getOptionalCsvInput("DeployToEnvironment");
- const deployForTenants = getOptionalCsvInput("DeployForTenants");
- const deployForTenantTags = getOptionalCsvInput("DeployForTenantTags");
- const deploymentProgress = tasks.getBoolInput("DeploymentProgress");
- const additionalArguments = tasks.getInput("AdditionalArguments");
- const gitRef = tasks.getInput("GitRef");
- const gitCommit = tasks.getInput("GitCommit");
-
- await assertOctoVersionAcceptsIds();
- const octo = await getOrInstallOctoCommandRunner("create-release");
-
- const configure = [
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- // @ts-expect-error
- argumentEnquote("project", project),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "releaseNumber", releaseNumber),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "channel", channel),
- connectionArguments(connection),
- flag("enableServiceMessages", true),
- multiArgument(argumentEnquote, "deployTo", deployToEnvironments),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "gitRef", gitRef),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "gitCommit", gitCommit),
- flag("progress", deployToEnvironments.length > 0 && deploymentProgress),
- multiArgument(argumentEnquote, "tenant", deployForTenants),
- multiArgument(argumentEnquote, "tenanttag", deployForTenantTags),
- ];
-
- if (workItemReleaseNotes || changesetCommentReleaseNotes || (customReleaseNotes && /[^\s]/.test(customReleaseNotes))) {
- const linkedReleaseNotes = workItemReleaseNotes || changesetCommentReleaseNotes ? await getLinkedReleaseNotes(vstsConnection, changesetCommentReleaseNotes, workItemReleaseNotes) : "";
-
- const releaseNotesFile = createReleaseNotesFile(() => {
- // @ts-expect-error
- return generateReleaseNotesContent(environmentVariables, linkedReleaseNotes, customReleaseNotes);
- }, environmentVariables.defaultWorkingDirectory);
-
- configure.push(argumentEnquote("releaseNotesFile", releaseNotesFile));
- }
-
- // @ts-expect-error
- configure.push(includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments));
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(release;create;v4)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Create octopus release succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to create release. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/task.json b/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/task.json
deleted file mode 100644
index bbcc3df2..00000000
--- a/source/tasksLegacy/CreateOctopusRelease/CreateOctopusReleaseV4/task.json
+++ /dev/null
@@ -1,266 +0,0 @@
-{
- "id": "4E131B60-5532-4362-95B6-7C67D9841B4F",
- "name": "OctopusCreateRelease",
- "friendlyName": "Create Octopus Release",
- "description": "There is a later version of this task, we recommend using the latest version. Create a Release in Octopus Deploy",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Deploy",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "releasenotes",
- "displayName": "Release Notes (Legacy)",
- "isExpanded": true
- },
- {
- "name": "deployment",
- "displayName": "Deployment",
- "isExpanded": false
- },
- {
- "name": "tenant",
- "displayName": "Tenants",
- "isExpanded": false
- },
- {
- "name": "versionControl",
- "displayName": "Version Control",
- "isExpanded": false
- },
- {
- "name": "additional",
- "displayName": "Additional Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "pickList",
- "label": "Space",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The space within Octopus."
- },
- {
- "name": "ProjectGroup",
- "type": "pickList",
- "label": "Project Group",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project group within Octopus (this populates the next Project dropdown)."
- },
- {
- "name": "ProjectName",
- "type": "pickList",
- "label": "Project",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project within Octopus."
- },
- {
- "name": "ReleaseNumber",
- "type": "string",
- "label": "Release Number",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "The number to use for this release. You can leave this blank if the release number is calculated by Octopus."
- },
- {
- "name": "Channel",
- "type": "pickList",
- "label": "Channel",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The [channel](https://g.octopushq.com/Channels) to use for the release."
- },
- {
- "name": "ChangesetCommentReleaseNotes",
- "type": "boolean",
- "label": "Include Changeset Comments",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Whether to add linked changeset comments to Octopus Release notes.\n\n*Note: These Release Notes options are considered legacy. We recommend clearing them and pushing [Build Information](https://g.octopushq.com/BuildInformation) alongside your packages, which allows the customizable [Release Notes Template](https://g.octopushq.com/ReleaseNotesTemplate) to generate automatic release notes.*",
- "groupName": "releasenotes"
- },
- {
- "name": "WorkItemReleaseNotes",
- "type": "boolean",
- "label": "Include Work Items",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Whether to add linked Work Item titles to Octopus Release notes.\n\n*Note: These Release Notes options are considered legacy. We recommend clearing them and pushing [Build Information](https://g.octopushq.com/BuildInformation) alongside your packages, which allows the customizable [Release Notes Template](https://g.octopushq.com/ReleaseNotesTemplate) to generate automatic release notes.*",
- "groupName": "releasenotes"
- },
- {
- "name": "CustomReleaseNotes",
- "type": "string",
- "label": "Custom Notes",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Custom notes appended to Octopus Release notes. This field supports markdown. To include newlines, you can use HTML linebreaks.\n\n*Note: These Release Notes options are considered legacy. We recommend clearing them and pushing [Build Information](https://g.octopushq.com/BuildInformation) alongside your packages, which allows the customizable [Release Notes Template](https://g.octopushq.com/ReleaseNotesTemplate) to generate automatic release notes.*",
- "groupName": "releasenotes"
- },
- {
- "name": "DeployToEnvironment",
- "type": "pickList",
- "label": "To Environment",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Deploy the release to this environment after creating it.",
- "groupName": "deployment"
- },
- {
- "name": "DeployForTenants",
- "type": "pickList",
- "label": "Tenant(s)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Deploy the release for this comma-delimited list of tenants after creating it. Wildcard '*' will deploy to all tenants currently able to deploy to the above provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeployForTenantTags",
- "type": "string",
- "label": "Tenant tag(s)",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Deploy the release for tenants who match these tags and are ready to deploy to the provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeploymentProgress",
- "type": "boolean",
- "label": "Show Deployment Progress",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Output from the deployment will appear in the log. If checked, the task will only succeed if the deployment is successful.",
- "groupName": "deployment"
- },
- {
- "name": "GitRef",
- "type": "string",
- "label": "Git Reference",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Git branch reference to use when creating the release for version controlled Projects.",
- "groupName": "versionControl"
- },
- {
- "name": "GitCommit",
- "type": "string",
- "label": "Git Commit",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Git commit to use when creating the release for version controlled Projects. Use in conjunction with the gitRef parameter to select any previous commit.",
- "groupName": "versionControl"
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExeCreateRelease) for available parameters.",
- "groupName": "additional"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "Space",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllSpaces",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "ProjectGroup",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllProjectGroupsInSpace",
- "parameters": {
- "SpaceId": "$(Space)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "ProjectName",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusListProjectsInProjectGroupInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectGroupId": "$(ProjectGroup)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployToEnvironment",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectChannelEnvironmentsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectId": "$(ProjectName)",
- "ChannelId": "$(Channel)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Channel",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectChannelsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectName": "$(ProjectName)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployForTenants",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectTenantsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectName": "$(ProjectName)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Create Octopus Release",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Deploy/DeployV3/icon.png b/source/tasksLegacy/Deploy/DeployV3/icon.png
deleted file mode 100644
index 591f4d25..00000000
Binary files a/source/tasksLegacy/Deploy/DeployV3/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Deploy/DeployV3/icon.svg b/source/tasksLegacy/Deploy/DeployV3/icon.svg
deleted file mode 100644
index fe7a4503..00000000
--- a/source/tasksLegacy/Deploy/DeployV3/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Deploy/DeployV3/index.ts b/source/tasksLegacy/Deploy/DeployV3/index.ts
deleted file mode 100644
index e99444b5..00000000
--- a/source/tasksLegacy/Deploy/DeployV3/index.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { multiArgument, connectionArguments, includeAdditionalArgumentsAndProxyConfig, flag, argumentEnquote, argumentIfSet, getOrInstallOctoCommandRunner } from "../../Utils/tool";
-import { getDefaultOctopusConnectionDetailsOrThrow, resolveProjectName } from "../../Utils/connection";
-import { getOptionalCsvInput, getRequiredCsvInput } from "../../Utils/inputs";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- const releaseNumber = tasks.getInput("ReleaseNumber", true);
- const environments = getRequiredCsvInput("Environments");
- const showProgress = tasks.getBoolInput("ShowProgress");
- const deploymentForTenants = getOptionalCsvInput("DeployForTenants");
- const deployForTenantTags = getOptionalCsvInput("DeployForTenantTags");
- const additionalArguments = tasks.getInput("AdditionalArguments");
- // @ts-ignore
- const project = await resolveProjectName(connection, tasks.getInput("Project", true)).then((x) => x.value);
-
- const octo = await getOrInstallOctoCommandRunner("deploy-release");
-
- const configure = [
- // @ts-ignore
- argumentIfSet(argumentEnquote, "space", space),
- argumentEnquote("project", project),
- // @ts-ignore
- argumentEnquote("releaseNumber", releaseNumber),
- connectionArguments(connection),
- multiArgument(argumentEnquote, "deployTo", environments),
- multiArgument(argumentEnquote, "tenant", deploymentForTenants),
- multiArgument(argumentEnquote, "tenanttag", deployForTenantTags),
- flag("progress", showProgress),
- // @ts-ignore
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- let stepIdentifier = "(release;deploy;v3)";
- if (deploymentForTenants.length > 0 || deployForTenantTags.length > 0) {
- stepIdentifier = "(release;deploy-tenanted;v3)";
- }
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, stepIdentifier))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Deploy succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to deploy release. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Deploy/DeployV3/task.json b/source/tasksLegacy/Deploy/DeployV3/task.json
deleted file mode 100644
index 3274fe57..00000000
--- a/source/tasksLegacy/Deploy/DeployV3/task.json
+++ /dev/null
@@ -1,164 +0,0 @@
-{
- "id": "8ca1d96a-151d-44b7-bc4f-9251e2ea6971",
- "name": "OctopusDeployRelease",
- "friendlyName": "Deploy Octopus Release",
- "description": "There is a later version of this task, we recommend using the latest version. Deploy an Octopus Deploy Release",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Deploy",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 3,
- "Minor": 1,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "tenant",
- "displayName": "Tenants",
- "isExpanded": false
- },
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "string",
- "label": "Space (Legacy - Use version 4 of this task)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "False"
- },
- "helpMarkDown": "Version 3 of this task has limited support for spaces. We recommend using version 4 of this task for a better experience."
- },
- {
- "name": "ProjectGroup",
- "type": "pickList",
- "label": "Project Group",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project group within Octopus (this populates the next Project dropdown)."
- },
- {
- "name": "Project",
- "type": "pickList",
- "label": "Project",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Octopus Deploy Project Name"
- },
- {
- "name": "ReleaseNumber",
- "type": "string",
- "label": "Release Number",
- "defaultValue": "latest",
- "required": true,
- "helpMarkDown": "The number of the release to deploy. Use 'latest' to deploy the latest release."
- },
- {
- "name": "Environments",
- "type": "pickList",
- "label": "Deploy to Environments",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Comma separated list of environments to deploy to."
- },
- {
- "name": "ShowProgress",
- "type": "boolean",
- "label": "Show Deployment Progress",
- "defaultValue": "False",
- "required": false,
- "helpMarkDown": "If checked, the build process will only succeed if the deployment is successful."
- },
- {
- "name": "DeployForTenants",
- "type": "pickList",
- "label": "Tenant(s)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Deploy the release for this comma delimited list of tenants. Wildcard '*' will deploy to all tenants currently able to deploy to the above provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeployForTenantTags",
- "type": "string",
- "label": "Tenant tag(s)",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Deploy the release for tenants who match these tags and are ready to deploy to the provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExeDeployRelease) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "ProjectGroup",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllProjectGroups",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Project",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusListProjectsInProjectGroup",
- "parameters": {
- "ProjectGroupId": "$(ProjectGroup)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Environments",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllEnvironments",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployForTenants",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllTenants",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Deploy Octopus Release: $(Project) to $(Environments)",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Deploy/DeployV4/icon.png b/source/tasksLegacy/Deploy/DeployV4/icon.png
deleted file mode 100644
index 591f4d25..00000000
Binary files a/source/tasksLegacy/Deploy/DeployV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Deploy/DeployV4/icon.svg b/source/tasksLegacy/Deploy/DeployV4/icon.svg
deleted file mode 100644
index fe7a4503..00000000
--- a/source/tasksLegacy/Deploy/DeployV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Deploy/DeployV4/index.ts b/source/tasksLegacy/Deploy/DeployV4/index.ts
deleted file mode 100644
index d2dd6cec..00000000
--- a/source/tasksLegacy/Deploy/DeployV4/index.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { argumentEnquote, argumentIfSet, assertOctoVersionAcceptsIds, connectionArguments, flag, getOrInstallOctoCommandRunner, includeAdditionalArgumentsAndProxyConfig, multiArgument } from "../../Utils/tool";
-import { getOptionalCsvInput, getRequiredCsvInput } from "../../Utils/inputs";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- const project = tasks.getInput("Project", true);
- const releaseNumber = tasks.getInput("ReleaseNumber", true);
- const deployToEnvironments = getRequiredCsvInput("Environments");
- const deployForTenants = getOptionalCsvInput("DeployForTenants");
- const deployForTenantTags = getOptionalCsvInput("DeployForTenantTags");
- const showProgress = tasks.getBoolInput("ShowProgress");
- const additionalArguments = tasks.getInput("AdditionalArguments");
- await assertOctoVersionAcceptsIds();
- const octo = await getOrInstallOctoCommandRunner("deploy-release");
-
- const configure = [
- // @ts-ignore
- argumentIfSet(argumentEnquote, "space", space),
- // @ts-ignore
- argumentEnquote("project", project),
- // @ts-ignore
- argumentEnquote("releaseNumber", releaseNumber),
- connectionArguments(connection),
- multiArgument(argumentEnquote, "deployTo", deployToEnvironments),
- multiArgument(argumentEnquote, "tenant", deployForTenants),
- multiArgument(argumentEnquote, "tenanttag", deployForTenantTags),
- flag("progress", showProgress),
- // @ts-ignore
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- let stepIdentifier = "(release;deploy;v4)";
- if (deployForTenants.length > 0 || deployForTenantTags.length > 0) {
- stepIdentifier = "(release;deploy-tenanted;v4)";
- }
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, stepIdentifier))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Deploy succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to deploy release. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Deploy/DeployV4/task.json b/source/tasksLegacy/Deploy/DeployV4/task.json
deleted file mode 100644
index eec3f330..00000000
--- a/source/tasksLegacy/Deploy/DeployV4/task.json
+++ /dev/null
@@ -1,182 +0,0 @@
-{
- "id": "8ca1d96a-151d-44b7-bc4f-9251e2ea6971",
- "name": "OctopusDeployRelease",
- "friendlyName": "Deploy Octopus Release",
- "description": "There is a later version of this task, we recommend using the latest version. Deploy an Octopus Deploy Release",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Deploy",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "tenant",
- "displayName": "Tenants",
- "isExpanded": false
- },
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "pickList",
- "label": "Space",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The space within Octopus."
- },
- {
- "name": "ProjectGroup",
- "type": "pickList",
- "label": "Project Group",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project group within Octopus (this populates the next Project dropdown)."
- },
- {
- "name": "Project",
- "type": "pickList",
- "label": "Project",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project within Octopus."
- },
- {
- "name": "ReleaseNumber",
- "type": "string",
- "label": "Release Number",
- "defaultValue": "latest",
- "required": true,
- "helpMarkDown": "The number of the release to deploy. Use 'latest' to deploy the latest release."
- },
- {
- "name": "Environments",
- "type": "pickList",
- "label": "Deploy to Environments",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Comma separated list of environments to deploy to."
- },
- {
- "name": "ShowProgress",
- "type": "boolean",
- "label": "Show Deployment Progress",
- "defaultValue": "False",
- "required": false,
- "helpMarkDown": "If checked, the build process will only succeed if the deployment is successful."
- },
- {
- "name": "DeployForTenants",
- "type": "pickList",
- "label": "Tenant(s)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Deploy the release for this comma delimited list of tenants. Wildcard '*' will deploy to all tenants currently able to deploy to the above provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeployForTenantTags",
- "type": "string",
- "label": "Tenant tag(s)",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Deploy the release for tenants who match these tags and are ready to deploy to the provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExeDeployRelease) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "Space",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllSpaces",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "ProjectGroup",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllProjectGroupsInSpace",
- "parameters": {
- "SpaceId": "$(Space)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Project",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusListProjectsInProjectGroupInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectGroupId": "$(ProjectGroup)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Environments",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectEnvironmentsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectId": "$(Project)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployForTenants",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectTenantsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectName": "$(Project)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Deploy Octopus Release",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/OctoCli/OctoCliV4/icon.png b/source/tasksLegacy/OctoCli/OctoCliV4/icon.png
deleted file mode 100644
index 236566a3..00000000
Binary files a/source/tasksLegacy/OctoCli/OctoCliV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/OctoCli/OctoCliV4/icon.svg b/source/tasksLegacy/OctoCli/OctoCliV4/icon.svg
deleted file mode 100644
index 1fde8723..00000000
--- a/source/tasksLegacy/OctoCli/OctoCliV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/OctoCli/OctoCliV4/index.ts b/source/tasksLegacy/OctoCli/OctoCliV4/index.ts
deleted file mode 100644
index fcf7a196..00000000
--- a/source/tasksLegacy/OctoCli/OctoCliV4/index.ts
+++ /dev/null
@@ -1,33 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { connectionArguments, getOrInstallOctoCommandRunner, includeAdditionalArguments } from "../../Utils/tool";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
- const args = tasks.getInput("args", false);
- const command = tasks.getInput("command", true);
- // @ts-ignore
- const octo = await getOrInstallOctoCommandRunner(command);
-
- // @ts-ignore
- const configure = [connectionArguments(connection), includeAdditionalArguments(args)];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(cli;run;v4)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, `Succeeded executing octo command ${command} with code ${code}`);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to execute octo command. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/OctoCli/OctoCliV4/task.json b/source/tasksLegacy/OctoCli/OctoCliV4/task.json
deleted file mode 100644
index 4553a726..00000000
--- a/source/tasksLegacy/OctoCli/OctoCliV4/task.json
+++ /dev/null
@@ -1,56 +0,0 @@
-{
- "id": "25fee290-e578-491b-b1db-dbc3980df1d0",
- "name": "OctoCli",
- "friendlyName": "Invoke Octopus CLI command",
- "description": "There is a later version of this task, we recommend using the latest version. Invoke an Octopus CLI command",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Tool",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "command",
- "type": "string",
- "label": "command",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "The Octopus CLI command to execute."
- },
- {
- "name": "args",
- "type": "string",
- "label": "arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "The arguments to use for the command."
- }
- ],
- "instanceNameFormat": "Invoke an Octopus CLI command",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/icon.png b/source/tasksLegacy/OctoInstaller/OctoInstallerV4/icon.png
deleted file mode 100644
index d54551d7..00000000
Binary files a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/icon.svg b/source/tasksLegacy/OctoInstaller/OctoInstallerV4/icon.svg
deleted file mode 100644
index e10e1da4..00000000
--- a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/index.ts b/source/tasksLegacy/OctoInstaller/OctoInstallerV4/index.ts
deleted file mode 100644
index b8079c09..00000000
--- a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/index.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import { getOrDownloadOcto, resolvePublishedOctoVersion, addToolToPath, getEmbeddedOcto } from "../../Utils/install";
-import * as tasks from "azure-pipelines-task-lib/task";
-import * as os from "os";
-
-async function run() {
- tasks.warning("This task is deprecated, please use latest version instead.");
- const version = tasks.getInput("version");
- // @ts-ignore
- const forceEmbedded = /embedded/i.test(version);
-
- try {
- if (forceEmbedded) {
- console.log("Forcing the use of the embedded Octopus CLI tool.");
- await getEmbeddedOcto(tasks.resolve(__dirname, "embedded")).then(addToolToPath);
- } else {
- const option = await resolvePublishedOctoVersion(version);
- console.log(`Using Octopus CLI tool version ${option.version}`);
- await getOrDownloadOcto(option).then(addToolToPath);
- }
-
- tasks.setResult(tasks.TaskResult.Succeeded, "");
- } catch (error: unknown) {
- if (error instanceof Error) {
- if (forceEmbedded) {
- tasks.setResult(tasks.TaskResult.Failed, `${error.message}${os.EOL}${error.stack}`, true);
- return;
- }
-
- console.log(`Failed to resolve Octopus CLI tool version ${version}. Using the embedded version. ${error}`);
-
- try {
- await getEmbeddedOcto(tasks.resolve(__dirname, "embedded")).then(addToolToPath);
- } catch (embeddedOctoError: unknown) {
- if (embeddedOctoError instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `${embeddedOctoError.message}${os.EOL}${embeddedOctoError.stack}`, true);
- }
- }
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/task.json b/source/tasksLegacy/OctoInstaller/OctoInstallerV4/task.json
deleted file mode 100644
index a1df9e46..00000000
--- a/source/tasksLegacy/OctoInstaller/OctoInstallerV4/task.json
+++ /dev/null
@@ -1,49 +0,0 @@
-{
- "id": "57342b23-3a76-490a-8e78-25d4ade2f2e3",
- "name": "OctoInstaller",
- "friendlyName": "[DEPRECATED] Octopus CLI Installer",
- "description": "This task is deprecated, please use latest version instead. Install a specific version of the Octopus CLI",
- "helpMarkDown": "Install a specific version of the Octopus CLI",
- "category": "Tool",
- "runsOn": [
- "Agent",
- "DeploymentGroup"
- ],
- "visibility": [
- "Build",
- "Release"
- ],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "deprecated": true,
- "satisfies": ["Octo"],
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "version",
- "type": "string",
- "label": "Octopus CLI Version",
- "defaultValue": "embedded",
- "required": true,
- "helpMarkDown": "Specify `latest` or the version number to download. If you specify `embedded`, or the download fails, a built-in copy of the tool will be used."
- }
- ],
- "instanceNameFormat": "[DEPRECATED] Use Octopus CLI tool version $(version)",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/icon.png b/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/icon.png
deleted file mode 100644
index 236566a3..00000000
Binary files a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/icon.svg b/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/icon.svg
deleted file mode 100644
index 1fde8723..00000000
--- a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/index.ts b/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/index.ts
deleted file mode 100644
index 973ac51a..00000000
--- a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/index.ts
+++ /dev/null
@@ -1,97 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { ToolRunner } from "azure-pipelines-task-lib/toolrunner";
-import * as path from "path";
-import { createVstsConnection, getBuildBranch, getBuildChanges, getVcsTypeFromProvider, getVstsEnvironmentVariables } from "../../Utils/environment";
-import { getLineSeparatedItems, getOverwriteModeFromReplaceInput } from "../../Utils/inputs";
-import { assertOctoVersionAcceptsIds, getOrInstallOctoCommandRunner, connectionArguments, includeAdditionalArgumentsAndProxyConfig, argument, argumentEnquote, argumentIfSet, multiArgument } from "../../Utils/tool";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-export interface IOctopusBuildInformation {
- BuildEnvironment: string;
- BuildNumber: string;
- BuildUrl: string;
- Branch: string;
- VcsType: string;
- VcsRoot: string;
- VcsCommitNumber: string;
- Commits: IOctopusBuildInformationCommit[];
-}
-
-export interface IOctopusBuildInformationCommit {
- Id: string;
- Comment: string;
-}
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const environment = getVstsEnvironmentVariables();
- const vstsConnection = createVstsConnection(environment);
-
- const space = tasks.getInput("Space");
- // @ts-expect-error
- const packageIds = getLineSeparatedItems(tasks.getInput("PackageId", true));
- const packageVersion = tasks.getInput("PackageVersion", true);
- // @ts-expect-error
- const overwriteMode = getOverwriteModeFromReplaceInput(tasks.getInput("Replace", true));
- const additionalArguments = tasks.getInput("AdditionalArguments");
-
- const branch = await getBuildBranch(vstsConnection);
- const commits = await getBuildChanges(vstsConnection);
-
- const buildInformation: IOctopusBuildInformation = {
- BuildEnvironment: "Azure DevOps",
- BuildNumber: environment.buildNumber,
- BuildUrl: environment.teamCollectionUri.replace(/\/$/, "") + "/" + environment.projectName + "/_build/results?buildId=" + environment.buildId,
- // @ts-expect-error
- Branch: branch,
- VcsType: getVcsTypeFromProvider(environment.buildRepositoryProvider),
- VcsRoot: environment.buildRepositoryUri,
- VcsCommitNumber: environment.buildSourceVersion,
- // @ts-expect-error
- Commits: commits.map((change) => ({ Id: change.id, Comment: change.message })),
- };
-
- if (!environment.agentBuildDirectory) {
- tasks.error("The Build Information step requires build information and therefore is not compatible with use in a Release pipeline.");
- return;
- }
-
- const buildInformationDir = path.join(environment.agentBuildDirectory, "octo");
- const buildInformationFile = path.join(buildInformationDir, `${environment.buildId}-buildinformation.json`);
- await tasks.mkdirP(buildInformationDir);
- await tasks.writeFile(buildInformationFile, JSON.stringify(buildInformation, null, 2));
-
- await assertOctoVersionAcceptsIds();
- const octo = await getOrInstallOctoCommandRunner("build-information");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
- const configure: Array<(tool: ToolRunner) => ToolRunner> = [
- connectionArguments(connection),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- multiArgument(argumentEnquote, "package-id", packageIds),
- // @ts-expect-error
- argument("version", packageVersion),
- argumentEnquote("file", buildInformationFile),
- argument("overwrite-mode", overwriteMode),
- // @ts-expect-error
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(build-information;push;v4)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to push build information. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/task.json b/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/task.json
deleted file mode 100644
index 3fe3f3fb..00000000
--- a/source/tasksLegacy/OctopusMetadata/OctopusMetadataV4/task.json
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "id": "b1861ef4-b62e-40c1-bcb0-be00d454a8a7",
- "name": "OctopusMetadata",
- "friendlyName": "Push Package Build Information to Octopus (legacy)",
- "description": "(legacy) There is a later version of this task, we recommend using the latest version. Collect information related to the build, including work items from commit messages, and push to your Octopus Deploy Server.",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Package",
- "visibility": ["Build"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "pickList",
- "label": "Space",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The space within Octopus."
- },
- {
- "name": "PackageId",
- "type": "multiLine",
- "label": "Package IDs",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Newline-separated package IDs; e.g.\nMyCompany.MyApp\nMyCompany.MyApp2"
- },
- {
- "name": "PackageVersion",
- "type": "string",
- "label": "Package Version",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "The version of the package; must be a valid [SemVer](http://semver.org/) version."
- },
- {
- "name": "Replace",
- "type": "pickList",
- "label": "Overwrite Mode",
- "defaultValue": "false",
- "required": true,
- "helpMarkDown": "Normally, if the same package build information already exists on the server, the server will reject the package build information push. This is a good practice as it ensures build information isn't accidentally overwritten or ignored. Use this setting to override this behavior.",
- "options": {
- "false": "Fail if exists",
- "true": "Overwrite existing",
- "IgnoreIfExists": "Ignore if exists"
- }
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctopusCliBuildInformation) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "Space",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllSpaces",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Push Package Build Information to Octopus (legacy)",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Pack/PackV4/icon.png b/source/tasksLegacy/Pack/PackV4/icon.png
deleted file mode 100644
index aae79512..00000000
Binary files a/source/tasksLegacy/Pack/PackV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Pack/PackV4/icon.svg b/source/tasksLegacy/Pack/PackV4/icon.svg
deleted file mode 100644
index d9d027bc..00000000
--- a/source/tasksLegacy/Pack/PackV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Pack/PackV4/index.ts b/source/tasksLegacy/Pack/PackV4/index.ts
deleted file mode 100644
index 1c5b5135..00000000
--- a/source/tasksLegacy/Pack/PackV4/index.ts
+++ /dev/null
@@ -1,115 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import * as fs from "fs";
-import { ToolRunner } from "azure-pipelines-task-lib/toolrunner";
-import { getLineSeparatedItems, isNullOrWhitespace, removeTrailingSlashes, safeTrim } from "../../Utils/inputs";
-import { argument, argumentEnquote, argumentIfSet, flag, getOrInstallOctoCommandRunner, includeAdditionalArguments, multiArgument } from "../../Utils/tool";
-import os from "os";
-
-export interface PackageRequiredInputs {
- packageId: string;
- packageFormat: string;
-}
-export interface PackageOptionalInputs {
- packageVersion?: string;
- outputPath?: string;
- sourcePath?: string;
- nuGetAuthor?: string;
- nuGetTitle?: string;
- nuGetDescription?: string;
- nuGetReleaseNotes?: string;
- nuGetReleaseNotesFile?: string;
- include?: string[];
- listFiles: boolean;
- overwrite: boolean;
- additionalArguments: string;
- compressionLevel: string;
-}
-
-export type PackageInputs = PackageRequiredInputs & PackageOptionalInputs;
-
-export const configure = (inputs: PackageInputs) => {
- return [
- argumentEnquote("id", inputs.packageId),
- argument("format", inputs.packageFormat),
- // @ts-ignore
- argumentIfSet(argument, "version", inputs.packageVersion),
- argumentIfSet(argument, "compressionlevel", inputs.compressionLevel),
- // @ts-ignore
- argumentIfSet(argumentEnquote, "outFolder", inputs.outputPath),
- // @ts-ignore
- argumentIfSet(argumentEnquote, "basePath", inputs.sourcePath),
- // @ts-ignore
- argumentIfSet(argumentEnquote, "author", inputs.nuGetAuthor),
- // @ts-ignore
- argumentIfSet(argumentEnquote, "title", inputs.nuGetTitle),
- // @ts-ignore
- argumentIfSet(argumentEnquote, "description", inputs.nuGetDescription),
- // @ts-ignore
- argumentIfSet(argumentEnquote, "releaseNotes", inputs.nuGetReleaseNotes),
- argument("overwrite", inputs.overwrite.toString()),
- includeAdditionalArguments(inputs.additionalArguments),
- (tool: ToolRunner) => {
- if (!isNullOrWhitespace(inputs.nuGetReleaseNotesFile) && fs.existsSync(inputs.nuGetReleaseNotesFile) && fs.lstatSync(inputs.nuGetReleaseNotesFile).isFile()) {
- console.log(`Release notes file: ${inputs.nuGetReleaseNotesFile}`);
- argumentEnquote("releaseNotesFile", inputs.nuGetReleaseNotesFile, tool);
- } else {
- console.log("No release notes file found");
- }
- return tool;
- },
- multiArgument(argumentEnquote, "include", inputs.include || []),
- flag("verbose", inputs.listFiles),
- ];
-};
-
-export const getInputs = (): PackageInputs => {
- return {
- // @ts-ignore
- packageId: tasks.getInput("PackageId", true),
- // @ts-ignore
- packageFormat: tasks.getInput("PackageFormat", true),
- packageVersion: tasks.getInput("PackageVersion"),
- outputPath: removeTrailingSlashes(safeTrim(tasks.getPathInput("OutputPath"))) || undefined,
- sourcePath: removeTrailingSlashes(safeTrim(tasks.getPathInput("SourcePath"))) || undefined,
- nuGetAuthor: tasks.getInput("NuGetAuthor"),
- nuGetTitle: tasks.getInput("NuGetTitle"),
- nuGetDescription: tasks.getInput("NuGetDescription"),
- nuGetReleaseNotes: tasks.getInput("NuGetReleaseNotes"),
- nuGetReleaseNotesFile: tasks.getInput("NuGetReleaseNotesFile", false),
- overwrite: tasks.getBoolInput("Overwrite"),
- // @ts-ignore
- include: getLineSeparatedItems(tasks.getInput("Include")),
- listFiles: tasks.getBoolInput("ListFiles"),
- // @ts-ignore
- additionalArguments: tasks.getInput("AdditionalArguments"),
- // @ts-ignore
- compressionLevel: tasks.getInput("CompressionLevel"),
- };
-};
-
-async function run() {
- try {
- tasks.warning(`This task is supported, but it no longer actively maintained.
-It was originally created for the Octopus CLI when Octopus Deploy only supported NuGet packages.
-It is recommended to migrate to the built-in 'Archive Files' task (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/utility/archive-files).
-Alternatively, if NuGet package metadata is required, consider using the 'NuGet' task (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/package/nuget) or the 'dotnet pack' task (https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/build/dotnet-core-cli).`);
-
- const octo = await getOrInstallOctoCommandRunner("pack");
- const configureTool = configure(getInputs());
-
- const code: number = await octo
- .map((x) => x.launchOcto(configureTool, "(package;pack;v4)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Pack succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to execute octo pack command. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Pack/PackV4/task.json b/source/tasksLegacy/Pack/PackV4/task.json
deleted file mode 100644
index b53988f6..00000000
--- a/source/tasksLegacy/Pack/PackV4/task.json
+++ /dev/null
@@ -1,179 +0,0 @@
-{
- "id": "179fac12-2402-486e-80cf-5a6a8571f7c0",
- "name": "OctopusPack",
- "friendlyName": "Package Application for Octopus",
- "description": "Package your application into a NuPkg or Zip file.",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Package",
- "visibility": [
- "Build",
- "Release"
- ],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "nuget",
- "displayName": "NuGet",
- "isExpanded": false
- },
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "PackageId",
- "type": "string",
- "label": "Package ID",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "The ID of the package. e.g. MyCompany.App"
- },
- {
- "name": "PackageFormat",
- "type": "pickList",
- "label": "Package Format",
- "required": true,
- "defaultValue": "NuPkg",
- "options": {
- "NuPkg": "NuPkg",
- "Zip": "Zip"
- },
- "helpMarkDown": "Package format. Must be either NuPkg or Zip."
- },
- {
- "name": "PackageVersion",
- "type": "string",
- "label": "Package Version",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "The version of the package; must be a valid [SemVer](http://semver.org/) version; defaults to a timestamp-based version."
- },
- {
- "name": "SourcePath",
- "type": "filePath",
- "label": "Source Path",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "The folder containing the files and folders to package. Defaults to working directory."
- },
- {
- "name": "OutputPath",
- "type": "filePath",
- "label": "Output Path",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "The directory into which the generated package will be written. Defaults to working directory."
- },
- {
- "name": "NuGetAuthor",
- "type": "string",
- "label": "Author",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Add an author to the NuGet package metadata.",
- "groupName": "nuget"
- },
- {
- "name": "NuGetTitle",
- "type": "string",
- "label": "Title",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Add a title to the NuGet package metadata.",
- "groupName": "nuget"
- },
- {
- "name": "NuGetDescription",
- "type": "string",
- "label": "Description",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Add a description to the NuGet package metadata.",
- "groupName": "nuget"
- },
- {
- "name": "NuGetReleaseNotes",
- "type": "string",
- "label": "Release Notes",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Add release notes to the NuGet package metadata.",
- "groupName": "nuget"
- },
- {
- "name": "NuGetReleaseNotesFile",
- "type": "filePath",
- "label": "Release Notes File",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "A file containing release notes to be added to the NuGet package metadata.",
- "groupName": "nuget"
- },
- {
- "name": "Include",
- "type": "multiLine",
- "label": "Include",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "File patterns to include, relative to the root path. e.g. /bin/*.dll",
- "groupName": "advanced"
- },
- {
- "name": "Overwrite",
- "type": "boolean",
- "label": "Overwrite",
- "defaultValue": "false",
- "required": false,
- "helpMarkDown": "Allow an existing package of the same ID and version to be overwritten.",
- "groupName": "advanced"
- },
- {
- "name": "ListFiles",
- "type": "boolean",
- "label": "Log Added Files",
- "defaultValue": "false",
- "required": "false",
- "helpMarkDown": "Write a list of all files added to the build log.",
- "groupName": "advanced"
- },
- {
- "name": "CompressionLevel",
- "type": "pickList",
- "label": "Compression Level",
- "defaultValue": "optimal",
- "required": false,
- "helpMarkDown": "Set the compression level.",
- "groupName": "advanced",
- "options": {
- "none": "None",
- "fast": "Fast",
- "optimal": "Optimal"
- }
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctopusCliPack) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "instanceNameFormat": "Package $(PackageId)",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Promote/PromoteV3/icon.png b/source/tasksLegacy/Promote/PromoteV3/icon.png
deleted file mode 100644
index 0f1c1a7a..00000000
Binary files a/source/tasksLegacy/Promote/PromoteV3/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Promote/PromoteV3/icon.svg b/source/tasksLegacy/Promote/PromoteV3/icon.svg
deleted file mode 100644
index 94905963..00000000
--- a/source/tasksLegacy/Promote/PromoteV3/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Promote/PromoteV3/index.ts b/source/tasksLegacy/Promote/PromoteV3/index.ts
deleted file mode 100644
index 53b5eb44..00000000
--- a/source/tasksLegacy/Promote/PromoteV3/index.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { multiArgument, connectionArguments, includeAdditionalArgumentsAndProxyConfig, flag, argumentEnquote, argumentIfSet, getOrInstallOctoCommandRunner } from "../../Utils/tool";
-import { getOptionalCsvInput, getRequiredCsvInput } from "../../Utils/inputs";
-import { getDefaultOctopusConnectionDetailsOrThrow, resolveProjectName } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- // @ts-expect-error
- const project = await resolveProjectName(connection, tasks.getInput("Project", true)).then((x) => x.value);
-
- const from = tasks.getInput("From", true);
- const to = getRequiredCsvInput("To");
- const showProgress = tasks.getBoolInput("ShowProgress");
- const deploymentForTenants = getOptionalCsvInput("DeployForTenants");
- const deployForTenantTags = getOptionalCsvInput("DeployForTentantTags");
- const additionalArguments = tasks.getInput("AdditionalArguments");
-
- const octo = await getOrInstallOctoCommandRunner("promote-release");
-
- const configure = [
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- argumentEnquote("project", project),
- connectionArguments(connection),
- // @ts-expect-error
- argumentEnquote("from", from),
- multiArgument(argumentEnquote, "to", to),
- multiArgument(argumentEnquote, "tenant", deploymentForTenants),
- multiArgument(argumentEnquote, "tenanttag", deployForTenantTags),
- flag("progress", showProgress),
- // @ts-expect-error
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(release;promote;v3)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Succeeded promoting release with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to promote release. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Promote/PromoteV3/task.json b/source/tasksLegacy/Promote/PromoteV3/task.json
deleted file mode 100644
index 83b24410..00000000
--- a/source/tasksLegacy/Promote/PromoteV3/task.json
+++ /dev/null
@@ -1,173 +0,0 @@
-{
- "id": "1627fcfe-f292-4904-adac-26cfb14bdb07",
- "name": "OctopusPromote",
- "friendlyName": "Promote Octopus Release",
- "description": "There is a later version of this task, we recommend using the latest version. Promote an Octopus release from one environment to another",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Deploy",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 3,
- "Minor": 1,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "tenant",
- "displayName": "Tenants",
- "isExpanded": false
- },
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "string",
- "label": "Space (Legacy - Use version 4 of this task)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "False"
- },
- "helpMarkDown": "Version 3 of this task has limited support for spaces. We recommend using version 4 of this task for a better experience."
- },
- {
- "name": "ProjectGroup",
- "type": "pickList",
- "label": "Project Group",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project group within Octopus (this populates the next Project dropdown)."
- },
- {
- "name": "Project",
- "type": "pickList",
- "label": "Project",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Octopus Deploy Project Name"
- },
- {
- "name": "From",
- "type": "pickList",
- "label": "Promote From",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The environment the release is currently deployed to. e.g. 'Staging'"
- },
- {
- "name": "To",
- "type": "pickList",
- "label": "Promote To",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Comma separated list of environments to deploy to"
- },
- {
- "name": "ShowProgress",
- "type": "boolean",
- "label": "Show Deployment Progress",
- "defaultValue": "False",
- "required": false,
- "helpMarkDown": "If checked, the build process will only succeed if the deployment is successful."
- },
- {
- "name": "DeployForTenants",
- "type": "pickList",
- "label": "Tenant(s)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Promote the release for this comma delimited list of tenants. Wildcard '*' will deploy to all tenants currently able to deploy to the above provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeployForTenantTags",
- "type": "string",
- "label": "Tenant Tag(s)",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Promote the release for tenants who match these tags and are ready to deploy to the provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExePromoteRelease) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "ProjectGroup",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllProjectGroups",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Project",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusListProjectsInProjectGroup",
- "parameters": {
- "ProjectGroupId": "$(ProjectGroup)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "From",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllEnvironments",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "To",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllEnvironments",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployForTenants",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllTenants",
- "resultTemplate": "{\"Value\":\"{{{Name}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Promote $(Project) from $(From) to $(To)",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Promote/PromoteV4/icon.png b/source/tasksLegacy/Promote/PromoteV4/icon.png
deleted file mode 100644
index 0f1c1a7a..00000000
Binary files a/source/tasksLegacy/Promote/PromoteV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Promote/PromoteV4/icon.svg b/source/tasksLegacy/Promote/PromoteV4/icon.svg
deleted file mode 100644
index 94905963..00000000
--- a/source/tasksLegacy/Promote/PromoteV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Promote/PromoteV4/index.ts b/source/tasksLegacy/Promote/PromoteV4/index.ts
deleted file mode 100644
index 672fc0bd..00000000
--- a/source/tasksLegacy/Promote/PromoteV4/index.ts
+++ /dev/null
@@ -1,55 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-import { argumentEnquote, argumentIfSet, assertOctoVersionAcceptsIds, connectionArguments, flag, getOrInstallOctoCommandRunner, includeAdditionalArgumentsAndProxyConfig, multiArgument } from "../../Utils/tool";
-import { getOptionalCsvInput, getRequiredCsvInput } from "../../Utils/inputs";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- const project = tasks.getInput("Project", true);
- const from = tasks.getInput("From", true);
- const to = getRequiredCsvInput("To");
- const deployForTenants = getOptionalCsvInput("DeployForTenants");
- const deployForTenantTags = getOptionalCsvInput("DeployForTenantTags");
- const showProgress = tasks.getBoolInput("ShowProgress");
- const additionalArguments = tasks.getInput("AdditionalArguments");
-
- await assertOctoVersionAcceptsIds();
- const octo = await getOrInstallOctoCommandRunner("promote-release");
-
- const configure = [
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- // @ts-expect-error
- argumentEnquote("project", project),
- connectionArguments(connection),
- // @ts-expect-error
- argumentEnquote("from", from),
- multiArgument(argumentEnquote, "to", to),
- multiArgument(argumentEnquote, "tenant", deployForTenants),
- multiArgument(argumentEnquote, "tenanttag", deployForTenantTags),
- flag("progress", showProgress),
- // @ts-expect-error
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(release;promote;v4)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Succeeded promoting release with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to promote release. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Promote/PromoteV4/task.json b/source/tasksLegacy/Promote/PromoteV4/task.json
deleted file mode 100644
index d29b100f..00000000
--- a/source/tasksLegacy/Promote/PromoteV4/task.json
+++ /dev/null
@@ -1,195 +0,0 @@
-{
- "id": "1627fcfe-f292-4904-adac-26cfb14bdb07",
- "name": "OctopusPromote",
- "friendlyName": "Promote Octopus Release",
- "description": "There is a later version of this task, we recommend using the latest version. Promote an Octopus release from one environment to another",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Deploy",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "tenant",
- "displayName": "Tenants",
- "isExpanded": false
- },
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "pickList",
- "label": "Space",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The space within Octopus."
- },
- {
- "name": "ProjectGroup",
- "type": "pickList",
- "label": "Project Group",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project group within Octopus (this populates the next Project dropdown)."
- },
- {
- "name": "Project",
- "type": "pickList",
- "label": "Project",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The project within Octopus."
- },
- {
- "name": "From",
- "type": "pickList",
- "label": "Promote From",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The environment the release is currently deployed to. e.g. 'Staging'"
- },
- {
- "name": "To",
- "type": "pickList",
- "label": "Promote To",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Comma separated list of environments to deploy to"
- },
- {
- "name": "ShowProgress",
- "type": "boolean",
- "label": "Show Deployment Progress",
- "defaultValue": "False",
- "required": false,
- "helpMarkDown": "If checked, the build process will only succeed if the deployment is successful."
- },
- {
- "name": "DeployForTenants",
- "type": "pickList",
- "label": "Tenant(s)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "Promote the release for this comma delimited list of tenants. Wildcard '*' will deploy to all tenants currently able to deploy to the above provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "DeployForTenantTags",
- "type": "string",
- "label": "Tenant Tag(s)",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Promote the release for tenants who match these tags and are ready to deploy to the provided environment.",
- "groupName": "tenant"
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExePromoteRelease) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "Space",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllSpaces",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "ProjectGroup",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllProjectGroupsInSpace",
- "parameters": {
- "SpaceId": "$(Space)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "Project",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusListProjectsInProjectGroupInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectGroupId": "$(ProjectGroup)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "From",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectEnvironmentsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectId": "$(Project)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "To",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectEnvironmentsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectId": "$(Project)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- },
- {
- "target": "DeployForTenants",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusProjectTenantsInSpace",
- "parameters": {
- "SpaceId": "$(Space)",
- "ProjectName": "$(Project)"
- },
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Promote Project in Octopus",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Push/PushV3/icon.png b/source/tasksLegacy/Push/PushV3/icon.png
deleted file mode 100644
index 236566a3..00000000
Binary files a/source/tasksLegacy/Push/PushV3/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Push/PushV3/icon.svg b/source/tasksLegacy/Push/PushV3/icon.svg
deleted file mode 100644
index 1fde8723..00000000
--- a/source/tasksLegacy/Push/PushV3/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Push/PushV3/index.ts b/source/tasksLegacy/Push/PushV3/index.ts
deleted file mode 100644
index e002e3a0..00000000
--- a/source/tasksLegacy/Push/PushV3/index.ts
+++ /dev/null
@@ -1,47 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-
-import { multiArgument, connectionArguments, includeAdditionalArgumentsAndProxyConfig, flag, argumentEnquote, argumentIfSet, getOrInstallOctoCommandRunner } from "../../Utils/tool";
-import { getLineSeparatedItems, resolveGlobs } from "../../Utils/inputs";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- // @ts-expect-error
- const packages = getLineSeparatedItems(tasks.getInput("Package", true));
- const replace = tasks.getBoolInput("Replace");
- const additionalArguments = tasks.getInput("AdditionalArguments");
-
- const octo = await getOrInstallOctoCommandRunner("push");
- const matchedPackages = await resolveGlobs(packages);
-
- const configure = [
- connectionArguments(connection),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- multiArgument(argumentEnquote, "package", matchedPackages),
- flag("replace-existing", replace),
- // @ts-expect-error
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(package;push;v3)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to push package. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Push/PushV3/task.json b/source/tasksLegacy/Push/PushV3/task.json
deleted file mode 100644
index 5d6384ad..00000000
--- a/source/tasksLegacy/Push/PushV3/task.json
+++ /dev/null
@@ -1,76 +0,0 @@
-{
- "id": "d05ad9a2-5d9e-4a1c-a887-14034334d6f2",
- "name": "OctopusPush",
- "friendlyName": "Push Package(s) to Octopus",
- "description": "There is a later version of this task, we recommend using the latest version. Push your NuGet or Zip package to your Octopus Deploy Server",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Package",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 3,
- "Minor": 1,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "string",
- "label": "Space (Legacy - Use version 4 of this task)",
- "defaultValue": "",
- "required": false,
- "properties": {
- "EditableOptions": "False"
- },
- "helpMarkDown": "Version 3 of this task has limited support for spaces. We recommend using version 4 of this task for a better experience."
- },
- {
- "name": "Package",
- "type": "multiLine",
- "label": "Package",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Package file to push. To push multiple packages, enter on multiple lines."
- },
- {
- "name": "Replace",
- "type": "boolean",
- "label": "Replace Existing",
- "defaultValue": "False",
- "required": true,
- "helpMarkDown": "If the package already exists in the repository, the default behavior is to reject the new package being pushed. Set this flag to 'True' to overwrite the existing package."
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExePush) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "instanceNameFormat": "Push Packages to Octopus",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}
diff --git a/source/tasksLegacy/Push/PushV4/icon.png b/source/tasksLegacy/Push/PushV4/icon.png
deleted file mode 100644
index 236566a3..00000000
Binary files a/source/tasksLegacy/Push/PushV4/icon.png and /dev/null differ
diff --git a/source/tasksLegacy/Push/PushV4/icon.svg b/source/tasksLegacy/Push/PushV4/icon.svg
deleted file mode 100644
index 1fde8723..00000000
--- a/source/tasksLegacy/Push/PushV4/icon.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/source/tasksLegacy/Push/PushV4/index.ts b/source/tasksLegacy/Push/PushV4/index.ts
deleted file mode 100644
index bd8d0671..00000000
--- a/source/tasksLegacy/Push/PushV4/index.ts
+++ /dev/null
@@ -1,49 +0,0 @@
-/* eslint-disable @typescript-eslint/ban-ts-comment */
-import * as tasks from "azure-pipelines-task-lib/task";
-
-import { getLineSeparatedItems, getOverwriteModeFromReplaceInput, resolveGlobs } from "../../Utils/inputs";
-import { argument, argumentEnquote, argumentIfSet, assertOctoVersionAcceptsIds, connectionArguments, getOrInstallOctoCommandRunner, includeAdditionalArgumentsAndProxyConfig, multiArgument } from "../../Utils/tool";
-import { getDefaultOctopusConnectionDetailsOrThrow } from "../../Utils/connection";
-import os from "os";
-
-async function run() {
- try {
- tasks.warning("There is a later version of this task, we recommend using the latest version.");
- const connection = getDefaultOctopusConnectionDetailsOrThrow();
-
- const space = tasks.getInput("Space");
- // @ts-expect-error
- const packages = getLineSeparatedItems(tasks.getInput("Package", true));
- // @ts-expect-error
- const overwriteMode = getOverwriteModeFromReplaceInput(tasks.getInput("Replace", true));
- const additionalArguments = tasks.getInput("AdditionalArguments");
-
- await assertOctoVersionAcceptsIds();
- const octo = await getOrInstallOctoCommandRunner("push");
- const matchedPackages = await resolveGlobs(packages);
-
- const configure = [
- connectionArguments(connection),
- // @ts-expect-error
- argumentIfSet(argumentEnquote, "space", space),
- multiArgument(argumentEnquote, "package", matchedPackages),
- argument("overwrite-mode", overwriteMode),
- // @ts-expect-error
- includeAdditionalArgumentsAndProxyConfig(connection.url, additionalArguments),
- ];
-
- const code: number = await octo
- .map((x) => x.launchOcto(configure, "(package;push;v4)"))
- .getOrElseL((x) => {
- throw new Error(x);
- });
-
- tasks.setResult(tasks.TaskResult.Succeeded, "Succeeded with code " + code);
- } catch (error: unknown) {
- if (error instanceof Error) {
- tasks.setResult(tasks.TaskResult.Failed, `"Failed to push package. ${error.message}${os.EOL}${error.stack}`, true);
- }
- }
-}
-
-run();
diff --git a/source/tasksLegacy/Push/PushV4/task.json b/source/tasksLegacy/Push/PushV4/task.json
deleted file mode 100644
index f9aceb43..00000000
--- a/source/tasksLegacy/Push/PushV4/task.json
+++ /dev/null
@@ -1,89 +0,0 @@
-{
- "id": "d05ad9a2-5d9e-4a1c-a887-14034334d6f2",
- "name": "OctopusPush",
- "friendlyName": "Push Package(s) to Octopus",
- "description": "There is a later version of this task, we recommend using the latest version. Push your NuGet or Zip package to your Octopus Deploy Server",
- "helpMarkDown": "set-by-pack.ps1",
- "category": "Package",
- "visibility": ["Build", "Release"],
- "author": "Octopus Deploy",
- "version": {
- "Major": 4,
- "Minor": 3,
- "Patch": 0
- },
- "demands": [],
- "minimumAgentVersion": "2.144.0",
- "groups": [
- {
- "name": "advanced",
- "displayName": "Advanced Options",
- "isExpanded": false
- }
- ],
- "inputs": [
- {
- "name": "OctoConnectedServiceName",
- "type": "connectedService:OctopusEndpoint",
- "label": "Octopus Deploy Server",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Octopus Deploy server connection"
- },
- {
- "name": "Space",
- "type": "pickList",
- "label": "Space",
- "defaultValue": "",
- "required": true,
- "properties": {
- "EditableOptions": "True"
- },
- "helpMarkDown": "The space within Octopus."
- },
- {
- "name": "Package",
- "type": "multiLine",
- "label": "Package",
- "defaultValue": "",
- "required": true,
- "helpMarkDown": "Package file to push. To push multiple packages, enter on multiple lines."
- },
- {
- "name": "Replace",
- "type": "pickList",
- "label": "Overwrite Mode",
- "defaultValue": "false",
- "required": true,
- "helpMarkDown": "Normally, if the same package already exists on the server, the server will reject the package push. This is a good practice as it ensures a package isn't accidentally overwritten or ignored. Use this setting to override this behavior.",
- "options": {
- "false": "Fail if exists",
- "true": "Overwrite existing",
- "IgnoreIfExists": "Ignore if exists"
- }
- },
- {
- "name": "AdditionalArguments",
- "type": "string",
- "label": "Additional Arguments",
- "defaultValue": "",
- "required": false,
- "helpMarkDown": "Additional arguments to be supplied to the Octopus CLI. See the [Octopus CLI documentation](https://g.octopushq.com/OctoExePush) for available parameters.",
- "groupName": "advanced"
- }
- ],
- "dataSourceBindings": [
- {
- "target": "Space",
- "endpointId": "$(OctoConnectedServiceName)",
- "dataSourceName": "OctopusAllSpaces",
- "resultTemplate": "{\"Value\":\"{{{Id}}}\",\"DisplayValue\":\"{{{Name}}}\"}"
- }
- ],
- "instanceNameFormat": "Push Packages to Octopus",
- "execution": {
- "Node10": {
- "target": "index.js"
- }
- }
-}