Hello!
I have an issue with Octopus deploy, multiple external feeds and creating a release from Azure DevOps because Octopus Deploy wont pick the correct package from the 2nd external feed; it only sees the one feed.
The situation is as follows:
Package feed 1: (This one has been used for a while and is used for multiple projects)
Package 1 (v0.0.35)
Package 2 (v0.0.03)
Package 3 (v1.3.03)
Package 4 (v1.0.02)
Etc…
Package feed 2: (New)
Package 1 (v1.0.5)
Package 2 (v1.0.5)
I am currently working on updating our build pipeline and we are migrating from TeamCity to Azure DevOps but for now we would like to keep using Octopus Deploy for releases.
During a build, TeamCity creates a couple packages and publishes them to its Nuget Feed (which is configured as Package feed 1 in Octopus Deploy) and then creates a release in Octopus Deploy. Currently, Octopus Deploy then uses that feed to retrieve the package and release it.
Because I am now using Azure DevOps as our build environment, I have set it up in the same way; we now have a new Package feed ( Package Feed 2 ) which only contains package 1 and 2 with the same name and metadata, except the version number is higher. I want this feed to be used because the package has a higher feed or … well, because I want to!
This new feed is added as an External feed in Octopus Deploy and Make use of the extended API is disabled in the external feed settings. When I test this feed, it can find my newer package versions.
When I build our application is Azure DevOps and publish package 1 and 2 to Package Feed 2 , everything goes well in Azure DevOps and a release is created.
The octo.exe command looks like this:
Octo.exe create-release --project="PROJECT" --releaseNumber="" --channel="Default" --server=SERVER --apiKey=*** --enableServiceMessages --releaseNotesFile=RELEASENOTES.MD --defaultpackageversion=PACKAGE-VERSION
Sadly, Octopus Deploy can’t execute the release because it says the following.
The package **Package1** .1.0.5 could not be downloaded to the package cache from NuGet feed ' **Package feed 1** ' at https://teamcity.agile.works/httpAuth/app/nuget/v1/FeedService.svc/ after making 5 attempts over a total of 101s. Make sure the package is pushed to the feed and try the deployment again. For a detailed troubleshooting guide go to http://g.octopushq.com/TroubleshootMissingPackages System.Exception: Unable to download package SevenStars.1.0.5 from NuGet feed 'teamcity' at https://teamcity.agile.works/httpAuth/app/nuget/v1/FeedService.svc/: The download package result was: NotFound ---> System.Exception: The download package result was: NotFound at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.DownloadPackageToLocalCache(String packageId, String version, ITaskContext taskContext, LogContext logContext) --- End of inner exception stack trace --- at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.DownloadPackageToLocalCache(String packageId, String version, ITaskContext taskContext, LogContext logContext) at Octopus.Core.Packages.DeploymentPackageDownloader.<>c__DisplayClass11_0.<DownloadPackage>b__0()
June 11th 2019 16:19:38
Error
The package Package2.1.0.5 could not be downloaded to the package cache from NuGet feed ' Package feed 1 at https://teamcity.agile.works/httpAuth/app/nuget/v1/FeedService.svc/ after making 5 attempts over a total of 100s. Make sure the package is pushed to the feed and try the deployment again. For a detailed troubleshooting guide go to http://g.octopushq.com/TroubleshootMissingPackages System.Exception: Unable to download package SevenStars.Website.ResourceGroup.1.0.5 from NuGet feed 'teamcity' at https://teamcity.agile.works/httpAuth/app/nuget/v1/FeedService.svc/: The download package result was: NotFound ---> System.Exception: The download package result was: NotFound at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.DownloadPackageToLocalCache(String packageId, String version, ITaskContext taskContext, LogContext logContext) --- End of inner exception stack trace --- at Octopus.Core.Packages.NuGet.ExternalHttpNuGetPackageFeed.DownloadPackageToLocalCache(String packageId, String version, ITaskContext taskContext, LogContext logContext) at Octopus.Core.Packages.DeploymentPackageDownloader.<>c__DisplayClass11_0.<DownloadPackage>b__0()
As you can see, it is using Package feed 1 and does not even try to use Package feed 2.
I would like that it searches BOTH feeds for the most recent version; I’d prefer to not have to use the –defaultpackageversion parameter at all.
Or I would like a way to be able to say what feed should be used. Or the default should just be feed 2 by now and then go back to feed 1.
Some of our current release definitions in Octopus Deploy still use Package Feed 1 and I do not want those to break!
I hope you can help me with this issue!
Greetings,
Sander ten Brinke