Skip to content

When using Azure Devops Issue Tracking, Octopus incorrectly uses the "BuildUrl" to attempt to match workitem references within commit messages when the issues could exist in a different location. #54

Open
@danefalvo

Description

@danefalvo

Are you a customer of Octopus Deploy? Don't raise the issue here. Please contact our support team so we can triage your issue, making sure it's handled appropriately.

Prerequisites

  • I have verified the problem exists in the latest version
  • I have searched open and closed issues to make sure it isn't already reported
  • I have written a descriptive issue title
  • I have linked the original source of this report
  • I have tagged the issue appropriately (area/*, kind/bug, tag/regression?)

The bug

When using Azure Devops Issue Tracking, Octopus will look at the BuildUrl and attempt to determine the WorkItem location based on the value of BuildURL. This is incorrect in circumstances like when the build is done in TeamCity, however the issues are stored in Azure Devops. In that circumstance, Issue tracking will attempt to match any "#n" references in commit messages to a location in TeamCity.

This bug may exist for other circumstances, i.e. Jenkins for Build, Azure Devops for WorkItems.

In all tests (including manually configuring the build information) the variable "IssueTrackerName" always was recorded as "null"

What I expected to happen

Options to set the "IssueTrackerName" variable during "Build Information" steps and WorkItem parsing to attempt to determine the location of WorkItems based on the IssueTrackerName.

Steps to reproduce

Environment requires Octopus Deploy, TeamCity, Azure Devops and your VCS as Github.
Create an Issue in Azure Devops.
Set up TeamCity to Build, publish, pack, deploy and send build Information.
Also, in the reproduction done, TeamCity was the Nuget Package Repo with Octopus using TC as an External feed.

Log excerpt

Resulting Build-Information:

      "Id": "BuildInformation-28",
      "PackageId": "FinnTestBox",
      "Version": "1.1.56",
      "BuildEnvironment": "TeamCity",
      "BuildNumber": "56",
      "BuildUrl": "http://20.193.75.254:8080/viewLog.html?buildId=153",
      "Branch": "<default>",
      "VcsType": "Git",
      "VcsRoot": "https://github.com/danefalvo/FinnTestBox",
      "VcsCommitNumber": "14ee5ca762b3c8c59ab57ca6c6578390c280c8f2",
      "VcsCommitUrl": "https://github.com/danefalvo/FinnTestBox/commit/14ee5ca762b3c8c59ab57ca6c6578390c280c8f2",
      "IssueTrackerName": null,
      "WorkItems": [],
      "Commits": [
        {
          "Id": "14ee5ca762b3c8c59ab57ca6c6578390c280c8f2",
          "LinkUrl": "https://github.com/danefalvo/FinnTestBox/commit/14ee5ca762b3c8c59ab57ca6c6578390c280c8f2",
          "Comment": "Next one\n\nFixes OctopusDeploy/Issues#1\n"
        }
      ],
      "IncompleteDataWarning": null,
      "Created": "2021-04-22T05:11:21.077+00:00",
      "Links": {}

Affected versions

Octopus Server:
2020.6.4809 (on-prem)
2021.1.6930 (Cloud)

Teamcity
2020.2.4

Octopus Deploy TeamCity Plugin
6.0.2

Links

https://help.octopus.com/t/work-item-link-missing-from-build-information/26490/17

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions