Create Octopus release task version 4.0* in TFS

I was using Create release task (Version 4*) in TFS build. It is not populating the project group name after configuring service connection.

Good afternoon @shivadeveloper878,

Welcome to the Octopus Community, sorry to hear you are having issues with your Azure DevOps Octopus Extension.

I have seen the same scenario you are seeing before and it was because the Octopus Server was not connected to the internet.

If your Azure DevOps server cannot talk to your Octopus Server then it cannot search the API to find the Octopus Project groups.

Is it finding the Octopus Spaces do you know?

You can put these in manually, so for instance, if you have only one Space (Default) you would just put ‘Default’ in the Space box. However, it may be that you do not have connection to your Octopus Server from your Azure DevOps server.

When you added the service connection (shown below) did you validate the connection after you saved it to ensure you could connect to the Octopus API?

Let me know if trying to validate that service connection passes, if it does we can look at other avenues.

Kind Regards,

Clare Martin

Thanks Clare. I have only Default space which is populating in spaces. For connection cross check I used version 3 it is populating Project Group but not project name.


Hey @shivadeveloper878,

Thank you for getting back to me so quickly and confirming you can see the spaces. This tells me your service connection is passing its validation.

The next logical course to look at would be permissions for the API key. We have some documentation on this which details what permissions you need from the user that generated the API key.

I don’t know if you have managed to check out that page yet but if not are you able to give it a look over and make sure the user that generated the API key for the service connection has those permissions:

  • ProjectView (for project drop-downs)
  • EnvironmentView (for environment drop-downs)
  • TenantView (for tenant drop-downs)
  • ProcessView (for channel drop-downs)
  • DeploymentView (for the dashboard widget)
  • TaskView (for the dashboard widget)

It looks like that user may be missing the ProjectView permission for that ProjectGroup?

I look forward to hearing from you if that is potentially the issue you are experiencing here.

Kind Regards,

Clare Martin

API key has been generated in the administrator profile which has all permissions.
In version 3* It is populating project Group name and environments but not project name.
In version 4* it is not populating Project Group name, Project name, environments


Hi @shivadeveloper878,

I am just stepping in for Clare while she’s off shift for the day. That’s some very interesting behavior and we’re a bit stumped over here. I just have a few questions to hopefully give us a bit more insight:

  • Does anything show up in your browser dev tools when the Project name/group is attempting to be retrieved? Maybe a 404 or 500 error on the API calls?

  • Is the admin user both a System Administrator and a Space Manger for the default space? I.E.

  • Would it be possible to create a new user with the permissions Clare outlined above along with a new API key and see if this changes behavior - the thinking is that there could be some kind of strange caching going on for the original user or something along those lines.

  • Would it be possible to get a copy of your Octopus Server logs? There’s a chance if we have an error it might show up there. I’ve created a secure upload link for your email here: Support - Octopus Deploy

Thanks for your patience while we work through this.

Regards,
Garrett

Currently there are many projects configured and running with version 2* but the project names are configured with (Ex: Project-41, project- 11), are these numbers generate randomly or Do I need to configure anywhere.
I tested with both existing and new connections with version 4* but it is not populating the any project group name but I can see environments in the dropdown list. User has both administrator and space manager permissions. I attached server log.

Hey @shivadeveloper878,

Just jumping in for Clare as she is on our UK team and off shift for the day. Every resource in Octopus has an ID like that, so if you wanted to, as a test to see if it works, we could try hardcoding that value in your new pipeline. You can find the project ID by going to https://<YOURSERVERURL>/api/projects/all in your browser, clicking RAW data, and searching for the desired project and copy-pasting the ID to your pipeline. Case sensitivity does matter with resource IDs in Octopus so to eliminate any issues like that it would be best to do a copy paste if possible.

Can I ask which version of Octopus Server you’re currently running?

Please let me know if thats something you can test, and if so, how it goes.

Best,
Jeremy

Hey @jeremy.miller

I was using version 2020.4.10 and TFS 2017 Update 2. I get the project ID and pasted into the Project in version 4* but it is not populating project Group name and Environments.
If I use same project ID in version 2* it is populating the environments. Version 2* is working fine with Project ID as version2* doesn’t have any ProjectGroup name field in the task. For now I will continue with the Version 2*.

Thanks.

Hey @shivadeveloper878,

Thanks for the update.

Are you by chance on an older version of Octopus? Do you know which version you are on?

Best,
Jeremy

Hey @jeremy.miller

I was using 2020.4.10 version of octopus

Hey @shivadeveloper878,

Thanks so much for that.

Are we able to take a look at the API calls in your browser when you are adding the step and attempting to use those dropdowns? To do this you can take a look at our documentation here: Capture and export a HAR file - Octopus Deploy

If you’d like to send the HAR file over for me to take a look as well, you can either DM me, email support@octopus.com and reference this ticket, or I can get you a secure upload link, whichever you are most comfortable with.

Please let me know if you have any other questions or concerns

Best,
Jeremy

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.