Deploying to a specific location in target server

karan1981's Avatar

karan1981

07 Dec, 2017 07:15 PM

I have a batch file which I use to package and deploy to our octopus server. In our octopus deploy UI we then deploy that package to different environment.
The batch file is as below:

dotnet publish Service\Common.csproj -c Debug -r win-x64
nuget pack Service\bin\Debug\netcoreapp2.0\win-x64\publish\Service.nuspec -OutputDirectory Service\bin\Debug\netcoreapp2.0 -Version %version%
nuget push Service\bin\Debug\netcoreapp2.0\Service.%version%.nupkg -ApiKey API-OurKey -Source https://ourserver/octopus/nuget/packages

Well this works fine but as an additional step I want to also copy certain nupkg files to a particular location on our test environment. These nupkg files are basically our package sources where we have setup our local nuget feeds.

These nuget files are a part of the same solution but different project withing the solution. So I have 3 projects in my solution
Service
Data
Engine

These nupkg files which are part of above projects Data and engine are automatically generated on build.

Now What I want is when I click on the batch file it would also copy these files to octopus and then octopus will deploy to those certain locations.

Thanks

  1. Support Staff 1 Posted by Reece Walsh on 08 Dec, 2017 04:00 AM

    Reece Walsh's Avatar

    Hi Karan,

    Thanks for getting in touch,

    It's definitely possible to copy your NuGet Package to a specified location during deployment,

    This can be done by utilizing the Transfer Package Step. This option was introduced in Octopus Deploy version 3.7.12, you need need to be utilizing this version to access this functionality.

    Whilst transferring a package you will need to specify a location that the file will be copied to once it has been uploaded from the server.

    This package will be transferred to the target during the package acquisition phase, and then copied to the specified location at the appropriate time during the deployment process.

    I hope this helps answer your query, if you require any further information or clarification please let me know :)

    Have a great day!

    Kind Regards,

    Reece

  2. 2 Posted by karan1981 on 08 Dec, 2017 12:48 PM

    karan1981's Avatar

    Reece,

    I don't see that step. Looks like we might be on an older version. I will talk to my deployment team regarding this.

    Thanks

  3. Support Staff 3 Posted by Reece Walsh on 11 Dec, 2017 06:40 AM

    Reece Walsh's Avatar

    Hi Karan,

    Thank you for getting back to me regarding this,

    Not a problem, since you are not seeing the option it would definitely appear you are utilizing an older Octopus version.

    I appreciate you letting me know where you are at with this.

    If you require any assistance in the future please do not hesitate to reach out :)

    Kind Regards,

    Reece

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