IIS Website Installation Path

Hi

I hope you can help me out with this little issue.

We have a simple 3 step setup.

  1. Deploy IIS Web Site A
  2. Deploy IIS Web Site B
  3. Handle database updates (PowerShell script)

I am struggling with step 3. I need to pass the new final installation path to “Web Site A” as a parameter to the PowerShell script.
The PowerShell script needs to read the web.config file in Web Site A in order to handle the database updates.

Is this possible?

Should I “hardcode” the path and then append the package version or is there a more clever way to get the full path?

Hi,

Thanks for getting in touch! This sounds like a job for our System Variables. Our System Variables documentation has a list of variables available during your deployments. For example, the following variable can be called inside your database step:

Octopus.Action[Web Site A].Output.Package.InstallationDirectoryPath
Where Web Site A would be the name of the step you wish to retrieve this value for.

It is also possible to create output variable inside your deployments which can be referenced in later steps. The following link is to our Output Variable documentation.

Let me know if you have any questions here, or find this is not quite what you were after. :slight_smile:

Best regards,
Daniel

Hi Daniel,

Thank you for the tip. It worked like a charm!

Best regards,
Terji

Hi Terji,

No worries! Glad I could help, please feel free to let me know if you have any further questions. :slight_smile:

Best regards,
Daniel