How to create step template in octopus deploy to copy a file from package to Databricks cluster

408 views Asked by At

I use Artifactory to publish NuGet packages. Package would have a file in publish folder which I should copy to Databricks cluster using Octopus deploy but can't seems to find a way to create step template

If I use deploy package step I can copy files/folder to target and read file like below

Get-ChildItem -Path "#{DATABRICKS_WORKING_DIRECTORY}" -Recurse -Filter *.whl | ForEach-Object  {
    $_.fullname
    #code to push file to databricks
}

Above approach might work but doesn't seems to be best approach, it would have been nice if I can create step template to push the file, any suggestion is highly appreciated.

1

There are 1 answers

2
Twerthi On

I'm not familiar with DataBricks, however, I did a little research and I think you could create a template using the Run a Script task as the base template. Add a Package Parameter for the file that contains the .whl file, then use https://docs.databricks.com/dev-tools/api/latest/libraries.html#install to upload it to DataBricks. Does that help?