Linux jenkins with octopus

Hi!

hope that someone will be able to help or advise. We want to start deploying to linux machines. We have jenkins which runs under linux, where it gets needed php files from GIT, builds them to zend package and deploys that package via zend api. All steps done using jenkins

Plan is, to throw away deployments via zend and use ssh and octopus. Main question is…how do we manage packages from linux machines, how can we push packages to nuget repository in Octopus? i can’t use octopack.exe to get it packaged and manage deployments. I see that, there is jenkins Octopus API plugin, to manage deployments, but what about packaging files to nuget package? Is there any other way doing this when we have linux environments? Or maybe there is another way how to do this at all?

Any suggestion/advice will be helpful!

Thanks!

EDIT:

ok, it looks like, with Calamari, if we package needed files and deploy.ps1 as deploy.sh it would work same, as it currently works with powershell scripts. So this part makes sense, how to deploy nuget package with bash inside .sh scripts. But how can i push the nuget package from linux machine to nuget repository…it looks like, the only way, is for example, when using jenkins, to copythe package/files to windows machine, package it there and then, upload nuget package to octopus. So it requires having some kind of gateway which has to be windows machine…is there any other way?

EDIT2:

is the answer only nuget under mono? Do we have anyone who can confirm that it works? Still looks like additional efforts to install mono and not really clear if it is fully compatible with nuget

Hi,

Thanks for getting in touch! Octopack itself utilizes MSBuild and NuGet.exe to do the work. We use output from MSBuild to create a NuSpec then use NuGet.exe pack to create the package. It also uses NuGet.exe push to transfer the files.

So with this in mind, your solution would be to:

  1. build a NuSpec for your solution - you can do this using wildcards and shouldn’t have to modify it too often to keep up with your project
  2. Use NuGet pack to create the Nuget package
  3. use NuGet push to send the package to the Octopus built in Repository

Step 2 and 3 could be run using scripts and automated. Jenkins is pretty great to create commands like this. And as NuGet.exe does run on Mono you should have a pretty solid solution.
We use mono+NuGet to deploy to SSH endpoints. I found this to help confirm: http://headsigned.com/article/running-nuget-command-line-on-linux (it is from 2013 so I am not sure if much has changed).

ALL of that being said, we are creating a new feature in Octopus to accept .zips and .tgz etc files as well as NuGet packages. But that probably won’t be live until late Jan '16. In the mean time you should be good with the above strategy.

If you need help finding the info for any of the steps above let me know and Ill point you at the resources that we use.

Hope that helps!

Vanessa

Thank you Vanessa for clear instructions!

This part - "ALL of that being said, we are creating a new feature in Octopus to accept .zips and .tgz " sounds promising and i’m looking forward to see this released early next year. Thanks again!