Octopus deployment packages - changing source in scripts

Hello Team,

We have recently upgraded to 3.x from 2.6, we used different server to upgrade, and migrated the content. In our environment we have so many solutions which we have to deploy as Nu-get packages to the new environment.
The command which is provided in Octopus for deploying packages is: NuGet.exe push <YourApp.nupkg> -ApiKey -Source http://server/octopus/nuget/packages

Previously we coded in the deployment script - source as http://oldserver/octopus/nuget/packages
Now we have to change everywhere to the new source as http://newserver/nuget/packages

The problem is, we have so many solutions and changing this everywhere is a bit tough job for us. Is there any alternative which will avoid this manual change process.

Could you create an alias DNS record (CNAME) so that oldserver points to newserver? This assumes the API key is still the same.

I try to create aliases like this for specific tasks, so we don’t use a specific server name in any configs like this. The role FQDNs are then pointed to the real server names via CNAME records.


Thank You Andrew! I can’t redirect my old server to new server as my old one is in use for multiple purpose.
But we can make a CNAME for the new server and make the changes to use CNAME in all current solutions instead of including the server name in the source url. so that in future updates I won’t get this issue again.

In future, if I change my OD server again then can I use the old CNAME for this new server? Am I making sense?

Using this approach, one time change in all solutions can’t be avoided. If there is any other way which makes it possible please let me know. If no, that’s okay I will convey the same to my team.

Thank You!

The best long-term solution is to create a DNS entry for your Octopus server.
e.g. octopus.your-company.com

This can then point at whichever server you currently have your Octopus instance deployed to.

Thank You Michael.