From 3f195dd88dbce65ac745a2361b6aeea6b4713a69 Mon Sep 17 00:00:00 2001 From: slewis74 Date: Fri, 8 Apr 2022 10:09:20 +1000 Subject: [PATCH 1/3] Update the build Url to use `index` rather than `results`, as the former works in both TFS 2018 and ADO but the latter doesn't. --- .../BuildInformation/BuildInformationV5/buildInformation.ts | 2 +- source/tasksLegacy/BuildInformation/BuildInformationV4/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/tasks/BuildInformation/BuildInformationV5/buildInformation.ts b/source/tasks/BuildInformation/BuildInformationV5/buildInformation.ts index b66799ae..bd27bf6c 100644 --- a/source/tasks/BuildInformation/BuildInformationV5/buildInformation.ts +++ b/source/tasks/BuildInformation/BuildInformationV5/buildInformation.ts @@ -66,7 +66,7 @@ export class BuildInformation { const buildInformation: IOctopusBuildInformation = { BuildEnvironment: "Azure DevOps", BuildNumber: environment.buildNumber, - BuildUrl: environment.teamCollectionUri.replace(/\/$/, "") + "/" + environment.projectName + "/_build/results?buildId=" + environment.buildId, + BuildUrl: environment.teamCollectionUri.replace(/\/$/, "") + "/" + environment.projectName + "/_build/index?buildId=" + environment.buildId, Branch: branch, VcsType: this.getVcsTypeFromProvider(environment.buildRepositoryProvider), VcsRoot: environment.buildRepositoryUri, diff --git a/source/tasksLegacy/BuildInformation/BuildInformationV4/index.ts b/source/tasksLegacy/BuildInformation/BuildInformationV4/index.ts index 810200e7..723c5aa2 100644 --- a/source/tasksLegacy/BuildInformation/BuildInformationV4/index.ts +++ b/source/tasksLegacy/BuildInformation/BuildInformationV4/index.ts @@ -44,7 +44,7 @@ async function run() { const buildInformation: IOctopusBuildInformation = { BuildEnvironment: "Azure DevOps", BuildNumber: environment.buildNumber, - BuildUrl: environment.teamCollectionUri.replace(/\/$/, "") + "/" + environment.projectName + "/_build/results?buildId=" + environment.buildId, + BuildUrl: environment.teamCollectionUri.replace(/\/$/, "") + "/" + environment.projectName + "/_build/index?buildId=" + environment.buildId, // @ts-expect-error Branch: branch, VcsType: getVcsTypeFromProvider(environment.buildRepositoryProvider), From cfd81feb3655c14c4525553adfa63c1252ebce10 Mon Sep 17 00:00:00 2001 From: slewis74 Date: Fri, 8 Apr 2022 10:09:47 +1000 Subject: [PATCH 2/3] Bump the minor version and update the README to explain how the version is currently controlled --- .github/workflows/build.yml | 2 +- README.md | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8936f29d..82259809 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,7 +8,7 @@ on: branches: [ main ] env: - OCTOPUS_VERSION: 5.0.${{ github.run_number }} + OCTOPUS_VERSION: 5.1.${{ github.run_number }} jobs: build: diff --git a/README.md b/README.md index ff732f5e..b388f8a3 100644 --- a/README.md +++ b/README.md @@ -67,6 +67,10 @@ It's highly recommended to set up two Virtual Machines running Windows Server. T To install locally, build and package the application as per the instructions above. Then install the extension by uploading it. Instructions to do this are available in Microsoft's [TFS/ADO docs](https://docs.microsoft.com/en-us/vsts/marketplace/get-tfs-extensions?view=tfs-2018#install-extensions-for-disconnected-tfs). +### Local + +The SemVer major.minor for the package is currently controlled by the /.github/workflows/build.yml file. Update this file as part of your PR if making breaking/additive changes. + #### Additional tips * TFS/ADO is accessible on port 8080 by default (this can be changed if desired) at something like the following: `http://:8080/tfs/` From 4bd005feae153762bb2a4891740b157eb81b65a7 Mon Sep 17 00:00:00 2001 From: slewis74 Date: Fri, 8 Apr 2022 10:23:54 +1000 Subject: [PATCH 3/3] Update the expected test output --- .../BuildInformationV5/buildInformation.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/tasks/BuildInformation/BuildInformationV5/buildInformation.test.ts b/source/tasks/BuildInformation/BuildInformationV5/buildInformation.test.ts index 735c67b4..1a2f7b23 100644 --- a/source/tasks/BuildInformation/BuildInformationV5/buildInformation.test.ts +++ b/source/tasks/BuildInformation/BuildInformationV5/buildInformation.test.ts @@ -197,7 +197,7 @@ describe("Build Information", () => { expect(buildInformationPayload).toBe(`{ "BuildEnvironment": "Azure DevOps", "BuildNumber": "1", - "BuildUrl": "${octopusUrl}/test/_build/results?buildId=1", + "BuildUrl": "${octopusUrl}/test/_build/index?buildId=1", "Branch": "refs/heads/master", "VcsType": "Git", "VcsRoot": "",