Identify projects using a particular nuget feed

Hi,

My team is doing a spring clean (or fall clean :slight_smile:) in Octopus and found duplicate nuget feeds that point to same source. We need to keep one and remove other.

  1. Before doing so we need to identify projects using them. Is there a way to find them (may be via UI or a script using api-key)?

  2. What would happen to existing releases that use the feed in one of the steps? How will they behave post deletion?

Thanks,
Nikhil

Hello @Nikhil_Agrawal ,

Thanks for reaching out!

You should be able to figure out what projects are pulling packages from the duplicates using the API, but it’ll be a bit involved.

You would first need to get the FeedId for the specific feed, which you can do by using this endpoint /api/{space-id}/feeds?name={feed_name}.

Once you have the FeedId, you can make an API call to retrieve back all the projects using /api/{space-id}/projects to get the ProjectId for each one.

You would need to loop through each ProjectId and make a call to retrieve the deployment process, which can be done using /api/{space-id}/projects/{project-id}/deploymentprocesses. In the deployment process, you can search for the FeedId in the actions.

If you have any runbooks referencing the feed, you’d be able to do the same thing but using this endpoint to get back the runbook process /api/{space-id}/projects/{project-id}/runbookProcesses/RunbookProcess-{runbook-id}.

As far as the snapshots go, if you remove the feed that those snapshots reference, they will no longer be able to be deployed. Unless that feed is referenced as a variable which in that case, you can update the variable set for the release.

I hope this helps. Feel free to let me know if you have any other questions.

Best regards,
Mark Butler

Hello @mark.butler,

Thanks for coming back.

Can we also find out releases using that id and update them through API/UI?

Thanks,
Nikhil

Hello @Nikhil_Agrawal,

It would be possible to use the API to find the releases that reference that FeedId. You could pull back all the releases for the project and then view the deployment snapshot for each one.

However, you would not be able to modify that deployment snapshot. When a release is created, it takes a snapshot of the deployment process and variables for reference. The only way for deployment process updates to take effect is to create a new release.

For reference, here is some documentation on how you can get started with the API. We also have a GitHub repo with example scripts interacting with the API.

Best regards,
Mark Butler