<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Guidance Needed for Developing CI/CD Process in Databricks Using Azure DevOps in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101702#M40777</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am working on setting up a complete end-to-end CI/CD process for my Databricks environment using Azure DevOps. So far, I have developed a build pipeline to create a Databricks artifact (DAB).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alcatraz96_1-1733897791930.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13456i912CCD21DC1A8C32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alcatraz96_1-1733897791930.png" alt="alcatraz96_1-1733897791930.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I need to create a release pipeline to deploy this artifact into production. My plan is to use the artifact from the build pipeline and the Databricks REST API to push it into production.&lt;/P&gt;&lt;H3&gt;Questions:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Will this approach publish workflows and notebooks into production exactly as they are in the development environment?&lt;/LI&gt;&lt;LI&gt;Are there any best practices or recommendations for structuring the release pipeline?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I am new to this and would appreciate any suggestions.&lt;/P&gt;&lt;P&gt;Below is the code I’m currently using in the release pipeline.&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;Release Pipeline Code:&lt;/H3&gt;&lt;PRE&gt;# Define Databricks variables
$databricksUrl = "&amp;lt;Databricks-URL&amp;gt;" # Replace with your Databricks instance URL
$accessToken = "&amp;lt;Access-Token&amp;gt;" # Replace with your secure token

# Define headers for Databricks REST API
$headers = @{
    "Authorization" = "Bearer $accessToken"
}

# Paths inside the Databricks workspace
$workspaceBasePath = ""
$notebookPath = ""
$jobPath = ""

# Function to create directories in Databricks
function Create-Directory {
    param ([string]$directoryPath)
    $createDirUri = "$databricksUrl/api/2.0/workspace/mkdirs"
    $body = @{ "path" = $directoryPath }
    
    try {
        Invoke-RestMethod -Method POST -Uri $createDirUri -Headers $headers -Body ($body | ConvertTo-Json -Depth 10) -ContentType "application/json"
        Write-Output "Directory '$directoryPath' created successfully in Databricks."
    } catch {
        if ($_.Exception.Response.StatusCode -ne 400) {
            Write-Error "Failed to create directory '$directoryPath': $_"
        }
    }
}

# Additional functions (Delete-File, Import-Notebook, Import-Job) are implemented similarly to handle file deletions and imports.

# Example pipeline steps:
Create-Directory -directoryPath "$workspaceBasePath/notebooks"
Create-Directory -directoryPath "$workspaceBasePath/jobs"

Delete-File -filePath "$workspaceBasePath/notebooks/Contingent_Employee_Report"
Delete-File -filePath "$workspaceBasePath/jobs/job-config.json"

Import-Notebook -notebookPath $notebookPath -workspacePath "$workspaceBasePath/notebooks/Contingent_Employee_Report"
Import-Job -jobConfigJsonPath $jobPath&lt;/PRE&gt;&lt;HR /&gt;&lt;P&gt;Thank you in advance for your time and suggestions!&lt;/P&gt;</description>
    <pubDate>Wed, 11 Dec 2024 06:17:56 GMT</pubDate>
    <dc:creator>alcatraz96</dc:creator>
    <dc:date>2024-12-11T06:17:56Z</dc:date>
    <item>
      <title>Guidance Needed for Developing CI/CD Process in Databricks Using Azure DevOps</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101702#M40777</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am working on setting up a complete end-to-end CI/CD process for my Databricks environment using Azure DevOps. So far, I have developed a build pipeline to create a Databricks artifact (DAB).&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alcatraz96_1-1733897791930.png" style="width: 400px;"&gt;&lt;img src="https://community.databricks.com/t5/image/serverpage/image-id/13456i912CCD21DC1A8C32/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alcatraz96_1-1733897791930.png" alt="alcatraz96_1-1733897791930.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now, I need to create a release pipeline to deploy this artifact into production. My plan is to use the artifact from the build pipeline and the Databricks REST API to push it into production.&lt;/P&gt;&lt;H3&gt;Questions:&lt;/H3&gt;&lt;OL&gt;&lt;LI&gt;Will this approach publish workflows and notebooks into production exactly as they are in the development environment?&lt;/LI&gt;&lt;LI&gt;Are there any best practices or recommendations for structuring the release pipeline?&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I am new to this and would appreciate any suggestions.&lt;/P&gt;&lt;P&gt;Below is the code I’m currently using in the release pipeline.&lt;/P&gt;&lt;HR /&gt;&lt;H3&gt;Release Pipeline Code:&lt;/H3&gt;&lt;PRE&gt;# Define Databricks variables
$databricksUrl = "&amp;lt;Databricks-URL&amp;gt;" # Replace with your Databricks instance URL
$accessToken = "&amp;lt;Access-Token&amp;gt;" # Replace with your secure token

# Define headers for Databricks REST API
$headers = @{
    "Authorization" = "Bearer $accessToken"
}

# Paths inside the Databricks workspace
$workspaceBasePath = ""
$notebookPath = ""
$jobPath = ""

# Function to create directories in Databricks
function Create-Directory {
    param ([string]$directoryPath)
    $createDirUri = "$databricksUrl/api/2.0/workspace/mkdirs"
    $body = @{ "path" = $directoryPath }
    
    try {
        Invoke-RestMethod -Method POST -Uri $createDirUri -Headers $headers -Body ($body | ConvertTo-Json -Depth 10) -ContentType "application/json"
        Write-Output "Directory '$directoryPath' created successfully in Databricks."
    } catch {
        if ($_.Exception.Response.StatusCode -ne 400) {
            Write-Error "Failed to create directory '$directoryPath': $_"
        }
    }
}

# Additional functions (Delete-File, Import-Notebook, Import-Job) are implemented similarly to handle file deletions and imports.

# Example pipeline steps:
Create-Directory -directoryPath "$workspaceBasePath/notebooks"
Create-Directory -directoryPath "$workspaceBasePath/jobs"

Delete-File -filePath "$workspaceBasePath/notebooks/Contingent_Employee_Report"
Delete-File -filePath "$workspaceBasePath/jobs/job-config.json"

Import-Notebook -notebookPath $notebookPath -workspacePath "$workspaceBasePath/notebooks/Contingent_Employee_Report"
Import-Job -jobConfigJsonPath $jobPath&lt;/PRE&gt;&lt;HR /&gt;&lt;P&gt;Thank you in advance for your time and suggestions!&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 06:17:56 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101702#M40777</guid>
      <dc:creator>alcatraz96</dc:creator>
      <dc:date>2024-12-11T06:17:56Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Needed for Developing CI/CD Process in Databricks Using Azure DevOps</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101708#M40779</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/135895"&gt;@alcatraz96&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;One question, why don't you use Databricks Assets Bundles? Then the whole process would be much simpler&lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;BR /&gt;Here you have a good end to end example:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://community.databricks.com/t5/technical-blog/ci-cd-integration-with-databricks-workflows/ba-p/81821" target="_blank"&gt;CI/CD Integration with Databricks Workflows - Databricks Community - 81821&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 07:56:21 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101708#M40779</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-12-11T07:56:21Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Needed for Developing CI/CD Process in Databricks Using Azure DevOps</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101739#M40798</link>
      <description>&lt;P&gt;Thank you for the suggestion. Is there a way to achieve this without using an Azure VM? I'm just curious.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 11:02:33 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101739#M40798</guid>
      <dc:creator>alcatraz96</dc:creator>
      <dc:date>2024-12-11T11:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: Guidance Needed for Developing CI/CD Process in Databricks Using Azure DevOps</title>
      <link>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101740#M40799</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/135895"&gt;@alcatraz96&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Yes, of course. If you're not using VNet injected workspace deployment with SCC enabled then your workspace should be accessible from public internet. So if that's the case you can use azure hosted agents Self hosted machine is needed when you have closed public access to a workspace.&lt;/P&gt;</description>
      <pubDate>Wed, 11 Dec 2024 11:08:29 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/guidance-needed-for-developing-ci-cd-process-in-databricks-using/m-p/101740#M40799</guid>
      <dc:creator>szymon_dybczak</dc:creator>
      <dc:date>2024-12-11T11:08:29Z</dc:date>
    </item>
  </channel>
</rss>

