Hello,
We have a IIS website and i am trying to have the release get copied into the folder that contains the website. Adding OctopusPackageDirectoryPath and pointing the value to the local path on the target server is not copying the output into that folder. I can see that the package is extracted into the defualt octopus folder on the tentacle but not into the website folder speified in this variable. I do see that the value was used while looking into the task log. Initially i had 2 variables with the same name with different scope (different Environment ) as we have both the dev and staging environments on the same server. I later removed the variable for staging just to make sure that did not cause the issue and the result was the same. The output did not get copied to the actual website folder.
Also, since the site is functional, do I need a iis configuration step to be included although we dont really want to configure the app pool etc through octopus (that is handled by a separate team which is not involved with using Octopus at this time). Or should this be handled in a predeploy and post deploy script to recycle the app pool or stop the website before copying the files in.
Thanks,
Vishal
Thanks for getting in touch! When you say that you add OctopusPackageDirectoryPath how are you adding it and where? Can you show me the screenshots of where this is added to your project?
Am I right in assuming that you are using the Custom Installation Directory feature? http://docs.octopus.com/display/OD/Custom+Installation+Directory
Also did you create a new release when you added the variable?
Could you also explain about your process and how an external team is managing part of the deployment? Maybe let me know what you would like Octopus to do and I can tell you how best to use Octopus to get the result.
Thanks for the quick response. I added that into the variables section of the project. Please see the screenshot below:
[cid:image001.png@01D158B3.0F8D3E00]
I did not set it up to use the custome installation directory. Somehow I understood that this will be the intermediate extraction location used to apply the transformations etc and will have a sub directory created after each deployment.
I read the documentation you pointed to and realize I may have misunderstood it originally. I will try to set it up and point it to the website folder and also include a pre and post
I was able to setup the cutom installation directory with the pre and post deploy scripts and was able to deploy correctly. As a followi up I have 2 additional questions. 1. Is it possible to use a script file instead of entering the script on the octopus page. 2. Octopack does not seem to be packaging additional files that we copy as part of our post build targets. Is it possible to have these included inside the package generated by octopack ?
Some of the files we copy during the afterbuild target are not included in the solution. Some third party dlls we reference are dependent on these. Also, some of these 3rd party dlls are referred by our common dll that is used in multiple projects.
Adding the file to the common project and setting the build action to copy only copies into its bin not into the bin folder of the exe or the website.
Currently all our exes and website proj files have these included in the after buidd. So I added these to the website project but that is not copying it into the bin folder but into one level above it. I don’t want to have a bin folder checked in and add these files to the bin folder in the project because sometime new developers end up checking in other files from the bin folder into TFS which we don’t want.
Using the nuspec file, I am not sure how to reference the source control folders. For example I use the following MSBuild variables inside the proj files like this:
I read that the msbuild variables are not available inside the nuspec file. Do you know if there is a workaround for this.
When I look into the proj file, octopack target file is imported after the afterbuild target. So why does octopack not find the files copied in the after build target. Does octopack get the output files from some intermediate output location or does it build everything again somewhere else.
It would be great if we can get octopack to pick up these files.
A separate issue is that we have customized build template to do some file transformations. Mainly to copy an appropriate systemsettings file depending on the build. For production we copy a systemsettingsproduction file and rename it to systemsetting.xml. I think we need to use the predeploy script in octopus to do these transformations. Do you have any example of how to copy a file and rename it inside the extracted package before deploying ? I am looking for help in identifying the current extracted folder in my predeploy.ps1. An in place rename would be fine too.
Hello,
Eventually, I had to modify the octopack.targets file to point to different locations to correctly package all the files. This is resolved now.
Thank You!
This issue has been closed due to inactivity. If you encounter the same or a similar issue and require help, please open a new discussion (if we asked for logs or extra details in this thread, consider including them in the new thread). If you are the creator of this thread and believe it should not be closed let us know via our support email.