Build Information and Work Item Tracking doesn't create Commits section

I’m referring to this article https://octopus.com/blog/metadata-and-work-items

I have 2019.9.10 LTS. Can’t upgrade for now.

I’m using TeamCity to build, test and deploy to Octopus with the newest version of TeamCity plugin.

Unfortunatelly octopus.buildinfo only have this:

{ "BuildEnvironment": "TeamCity", "BuildNumber": "1.1.1384", "BuildUrl": "null/viewLog.html?buildId=1060" }

What should I do to make it work well?

Hi @dariusz.lenartowicz,

The commits themselves will come from your source repo (e.g. GitHub). TeamCity should be collating that info and pushing it to your Octopus Server for you when you do your build/push. Are you finding that commits on your source repo arent making it through the build process to the Octopus Server?

Thanks,
Jeremy

Thanks for the response.

I found that chained builds do not transmit VCS informations. I moved this step into first build and now I have this:

{
  "BuildEnvironment": "TeamCity",
  "Branch": "",
  "BuildNumber": "0.0.1392",
  "BuildUrl": "https://xxxxxxxxxxxxxxxx/viewLog.html?buildId=1082",
  "VcsType": "Git",
  "VcsRoot": "git@github.com:xxxxxxxxxxxxxx.git",
  "VcsCommitNumber": "39da588714bd57093f7c8fe6590467564af527a1",
  "Commits": [
    {
      "Id": "39da588714bd57093f7c8fe6590467564af527a0",
      "Comment": "Test #440\n"
    }
  ]
}

There is no WorkItems so Octopus do not build release notes? What now? Where is a catch?

Best regards
Darek

hi @dariusz.lenartowicz,

Sorry your WorkItems arent showing up on the server. Which Issue Tracker are you using? Here is a link to the docs for supported Issue Trackers. If you follow the link for your tracker within that doc, there’s a lot of great info in there that may help resolve the issue.

Please let me know if the link was helpful or if you need more assistance.

Thanks,
Jeremy

Hi @jeremy.miller

I have enabled GitHub Integration but I don’t know how to check that it works correctly.

Untitled

Best regards
Darek

Hi Darek,

To get the work items to correctly link between your issue tracker and octopus, you should need to start your commit with the issue number in the tracker. It should be something like #PR_NUMBER. Please let me know if this is helpful.

Thanks,
Jeremy

Hi @jeremy.miller

Unfortunately not working. :frowning: No any ‘Work Items’.

View from release page:
Untitled

View from packages page:
Untitled2

Maybe should I look into some logs? What should I search?

Hi Darek,

Sorry about that, I may have given you bad advice on this one. In our docs it says

"The parsing of the commit messages is based on the GitHub concepts around closing issues using keywords.

The Octopus extension looks for these same keywords, and ignores issue references where the keywords are not also present."

Then our docs link to a GitHub help article on how that must be done.

It looks like it may need to be KEYWORD #ISSUENUMBER. Can you please take a look at the GitHub link below and try implementing that and let me know if it works for you?

Github Issue Linking
Octopus Documents on Github Commit Messages

Thanks,
Jeremy

Unfortunately after using keyword and issue number still not working. :frowning:

Is there any log where I can check communication where Octopus pulls data from GitHub?


Hi Darek,

This is probably a newbie question but I just want to be sure, I was re-reading our docs and it says that “The password should be a personal access token, rather than an actual password. You can create a token in your GitHub account settings in the ‘Developer settings’ area.”

Is that how you set it up?

I’m also fairly certain that it doesn’t matter, but it couldn’t hurt to change that username field to the GitHub username rather than the email address.

Please let me know what you think.

Thanks,
Jeremy

Hi Jeremy,

I have been using token and username is blank. I try to set proper username from GitHub.

Darek

Hi Jeremy,
It still does not work. :frowning:

Summarizing:

Version of Octopus TeamCity Plugin:

Produced output from plugin:

My OctopusDeploy version:
oct2

GitHub Issues Tracker settings use my username and Personal Token:
oct3

Produced release by Octopus does not have any Work Items:

GitHub says that personal token is “Never used” (repo is private).

Darek

Hi Darek,

I spoke with an engineer and he took a look at our conversation. The only thing that jumped out at him is the non-English characters. He doesn’t think it should be a problem, but can you please test with only English characters in the process and see if your work items link correctly?

Thanks,
Jeremy

I am having this same problem currently though with Teamcity and connecting to AzureDevOps Server. It seems to me that the OctopusServer code is no longer successfully pulling the work items.

I can’t see how the TeamCity build could have problems as it is successfully linking the issues and pushing the build info, however the build information passed to Octopus has never included work item links (as far as I can tell), but instead used to contain a CommentParser though that seems to have been removed recently: https://github.com/OctopusDeploy/Octopus-TeamCity/pull/37/files#diff-d12bef2e51f2a0b6360f516bcfb818a5L9
I was wondering if this had anything to do with the issue I’m having, though I don’t have any knowledge of how that CommentParser was used as I assume it is in the Octopus Server code base.

I have tried all combinations of commenting the work item numbers in commits and pull requests including using keywords, they have all had the same result (of producing build info with no linked work items).

After migrating to 2019.12.1 everything works.

PS
Because of license we can’t go for the newer version.

1 Like