How to override existing package in working directory

eldadcohenil's Avatar

eldadcohenil

06 Nov, 2017 10:46 AM

Hi,

1.How to override existing package in working directory with the same version number and id.
2. I read a lot about the &quot issue in connection string, can you please describe the simple solution or format ,what should I change in &quit text in order to keep my string\xml correct format.

Thanks

  1. Support Staff 1 Posted by Kenneth Bates on 07 Nov, 2017 04:45 AM

    Kenneth Bates's Avatar

    Hi,

    Thanks for getting in touch!

    1. You can use the custom installation directory feature in your package step that will allow you to purge the directory before the package contents are copied to it. Would this be a viable solution?
      https://octopus.com/docs/deploying-applications/custom-installation...

    2. Are you hitting the behavior where the &quot in your connection string is being replaced by &quot? The reason behind this behavior is that we encode it when inserting it into XML. So it's by design, instead of a bug. You can get around it by replacing &quot in your value for your connectionstring variable with just a double-quote ("). There was an interesting discussion on the following thread that goes into this in some more detail. :)
      https://help.octopusdeploy.com/discussions/problems/3609-ampersand-...

    Let me know if that helps, and don't hesitate to reach out if you have any further questions.

    Kind regards,

    Kenny

  2. 2 Posted by eldadcohenil on 07 Nov, 2017 09:28 AM

    eldadcohenil's Avatar

    OK. issue resolved according to your help.

  3. Support Staff 3 Posted by Kenneth Bates on 07 Nov, 2017 11:54 PM

    Kenneth Bates's Avatar

    Hi,

    That's great to hear it's resolved! Don't hesitate to reach out if you have any further questions going forward. :)

    Best regards,

    Kenny

  4. 4 Posted by eldadcohenil on 12 Nov, 2017 07:52 AM

    eldadcohenil's Avatar

    Hi,

    I have encountered an issue , I am using custom installation directory and it is working but still the step deploy my zip file in Octopus working folder, How I avoid it ?

    Thanks In Advanced,

  5. Support Staff 5 Posted by Kenneth Bates on 12 Nov, 2017 11:54 PM

    Kenneth Bates's Avatar

    Hi,

    Using the custom installation directory feature, your package still gets deployed/extracted to the standard folder. It works by copying the contents to your custom directory after variables are substituted, config files are transformed, etc. Extracting your package and performing these tasks straight to the custom directory could potentially break your app or site. You can reference the package deployment feature ordering doc page here which outlines this process. :)
    https://octopus.com/docs/reference/package-deployment-feature-ordering

    I hope this helps! Don't hesitate to reach out if you have any further questions!

    Best regards,

    Kenny

  6. 6 Posted by eldadcohenil on 13 Nov, 2017 10:31 AM

    eldadcohenil's Avatar

    Hi,

    As a workaround I delete each deploy the content of the working directory by using hard coded path without any octopus variable since the working directory is occupied in deploy process.
    Is it something recommended.

    Thanks

  7. Support Staff 7 Posted by Kenneth Bates on 14 Nov, 2017 03:51 AM

    Kenneth Bates's Avatar

    Hi,

    Thanks for following up. To clean up files, folders and packages, we recommend using the retention policy feature (located in your web portal under Library > Lifecycles). You can configure Tentacle retention policies to automatically delete these expanded files and deployed packages, and it won't touch files in your custom install directory. You can read more about our retention policies in the docs. :)
    https://octopus.com/docs/administration/retention-policies

    I hope this helps!

    Kind regards,

    Kenny

  8. 8 Posted by eldadcohenil on 14 Nov, 2017 02:58 PM

    eldadcohenil's Avatar

    That resolved the issue.

  9. Support Staff 9 Posted by Kenneth Bates on 14 Nov, 2017 10:10 PM

    Kenneth Bates's Avatar

    Hi,

    That sounds great! Thanks for letting me know, and please don't hesitate to reach out if you have any further questions going forward. :)

    Best regards,

    Kenny

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac