I have configured a project to auto deploy when a new package is uploaded. Next I want to be smarter about how we deploy.
Is it possible to change the install directory of a package based on the version?
aka:
version number is “1.0.1” -> Master build -> deploy to master location
version number is “1.0.1-dev-0001” -> dev build -> deploy to dev location
version number is “1.0.1-f-somefeature-0001” -> feature build -> don’t auto deploy at all, but be available as a manual deploy.
Hi Peter,
Thanks for getting in touch! I think what you are looking for is possible but you will probably need to make a few changes.
To specify your own installation directory you need to enable Custom Installation Directory feature in your deployment step. Then you need bind a variable that will represent the path to the Install To
field. Lets’ call that variable InstallationPath
.
Once that’s done you will need to create a channel and a version rule for each location. Then you need to create 3 project variables called InstallationPath
as per table below.
Name | Value | Scope |
---|---|---|
InstallationPath | C:\Master | Master Channel |
InstallationPath | C:\Dev | Dev Channel |
InstallationPath | C:\Feature | Feature Channel |
The last part is to change your development process so it doesn’t rely on auto deploy. Now you will need to create releases and then deploy them explicitly. This shouldn’t be too hard because we’ve built custom integration with quite a few most popular build servers.
As you can see there is a bit off effort required but once everything is setup it should work seamlessly.
Please, let me know how you go.
Regards,
Pawel
Thanks that solved it!