I suggest you...

Configure path package is deployed to

Hi,

I have set up Deployment process and everything works fine except one thing.
I cannot find a way to edit step "zero" - downloading and unpacking of deployment package (nuget package).
In our deployment we process multiple tenants on single environment.

What Octopus currently does (this process seems automatic to me):
- Downloads correct package version if its not already downloaded (this is ok)
- Unpacks it into C:\Octopus\Applications\tenantName\Production\projectName\projectVersion (want to change this)
- Then uses this folder as source of data (ok).

I have TWO problems with this approach:
1)
while deploying on multiple tenants after ONE deploy i have multiple copies of SAME project version on environment (note that project is pretty big - several GB)
e.g:
C:\Octopus\Applications\tenant1\Production\projectName\v_0.0.1
C:\Octopus\Applications\tenant2\Production\projectName\v_0.0.1
C:\Octopus\Applications\tenant3\Production\projectName\v_0.0.1
...
if i were to deploy to all tenants at once i wouldnt even be able to store all data because of this duplicating

what i want:
SAME folder for all tenants:
C:\Octopus\Applications\projectName\projectVersion (notice missing tenant name)

2)
If i deploy SAME version to SAME tenant again (lets say with different config) i end up having this version of project in folder TWICE
e.g (3 deploys of same version):
C:\Octopus\Applications\tenant1\Production\projectName\v_0.0.1
C:\Octopus\Applications\tenant1\Production\projectName\v_0.0.1 (1)
C:\Octopus\Applications\tenant1\Production\projectName\v_0.0.1 (2)
C:\Octopus\Applications\tenant2\Production\projectName\v_0.0.1
C:\Octopus\Applications\tenant2\Production\projectName\v_0.0.1 (1)
C:\Octopus\Applications\tenant2\Production\projectName\v_0.0.1 (2)
....

what i want:
not to unpack project version if it already is in folder:
if this is already there (path changed pre request from 1) ) C:\Octopus\Applications\projectName\projectVersion\v_0.0.1 then C:\Octopus\Applications\projectName\projectVersion\v_0.0.1 (1) will NOT be created, this part of script will be skipped instead

-----------------------------------------
I was unable to find script that does this (Octopus->environment push of package).
First step in deployment process starts AFTER this is magically done.
I was not able to find any step/script that would do this - using web UI (maybe i dont have rights to see it).

Can i somewhere edit this script? (this would be best as it would solve both questions)
OR
Is there any config where i can solve BOTH scenarios?

95 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Tomas shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

    2 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • AdminOctopus Developer (Admin, Octopus Deploy) commented  ·   ·  Flag as inappropriate

        @Thomas

        Could you expand on the use-case. I assume you would not be using variable substitution, scripts or config transforms on the files in that folder? Do you use Custom Installation directories?

        A small correction, the path is extracted to `C:\Octopus\Applications\tenant1\Production\packageName\v_0.0.1` (ie packageName instead of projectName).

        Once the files are extracted we use that folder to run the scripts for the other features (eg IIS configuration, config transform, pre/post scripts).

        Could you use the transfer package step and then a script step to conditionally unpack the package? You could also have a script step at the start that figures out if you have to do anything, then sets an output variable that is used to conditionally run the next two steps.

      • Tomas commented  ·   ·  Flag as inappropriate

        Copy-pasted text from support ticket. Answer was that currently its not possible. Thus i used same ticket as idea proposal.

      Feedback and Knowledge Base