<?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 How to overwrite git_source configuration in Asset Bundles in Get Started Discussions</title>
    <link>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/61974#M2764</link>
    <description>&lt;P&gt;I'm using DAB to deploy a "jobs" resource into Databeicks and into &amp;nbsp;two environments: "dev" and "prod". I pull the notebooks from a remote git repository using "git_resource", and defined the default job to use a tag to find which version to pull. However, in deploying to "dev" I would like to use a branch instead of tag. This could be done in the target configuration for "dev" but the problem is that it will also keep the tag along with the branch, which fails the deployment. So, the question is how to ignore the tag where a branch is defined?&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;Here are a snippet of my config files:&lt;BR /&gt;default_job.yml:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    job_name:
      name: "name"
      
      ...

      git_source:
        git_url: "&amp;lt;git_url&amp;gt;"
        git_provider: "&amp;lt;provider&amp;gt;"
        git_tag: "&amp;lt;tag&amp;gt;"

      ...
&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;dev.yml:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;targets:
  dev: 
    mode: development

  ...

   resources:
     jobs:
       job_name:
       git_source:
         git_branch: "&amp;lt;branch&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;This will end up into the following config:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;git_source": {
          ""git_branch": "&amp;lt;branch&amp;gt;",
          "git_provider": "&amp;lt;provider&amp;gt;",
          "git_tag": "&amp;lt;tag&amp;gt;",
          "git_url": "&amp;lt;git_url&amp;gt;"
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Feb 2024 09:49:39 GMT</pubDate>
    <dc:creator>Ariaa</dc:creator>
    <dc:date>2024-02-26T09:49:39Z</dc:date>
    <item>
      <title>How to overwrite git_source configuration in Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/61974#M2764</link>
      <description>&lt;P&gt;I'm using DAB to deploy a "jobs" resource into Databeicks and into &amp;nbsp;two environments: "dev" and "prod". I pull the notebooks from a remote git repository using "git_resource", and defined the default job to use a tag to find which version to pull. However, in deploying to "dev" I would like to use a branch instead of tag. This could be done in the target configuration for "dev" but the problem is that it will also keep the tag along with the branch, which fails the deployment. So, the question is how to ignore the tag where a branch is defined?&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;Here are a snippet of my config files:&lt;BR /&gt;default_job.yml:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    job_name:
      name: "name"
      
      ...

      git_source:
        git_url: "&amp;lt;git_url&amp;gt;"
        git_provider: "&amp;lt;provider&amp;gt;"
        git_tag: "&amp;lt;tag&amp;gt;"

      ...
&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;dev.yml:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;targets:
  dev: 
    mode: development

  ...

   resources:
     jobs:
       job_name:
       git_source:
         git_branch: "&amp;lt;branch&amp;gt;"&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;This will end up into the following config:&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;git_source": {
          ""git_branch": "&amp;lt;branch&amp;gt;",
          "git_provider": "&amp;lt;provider&amp;gt;",
          "git_tag": "&amp;lt;tag&amp;gt;",
          "git_url": "&amp;lt;git_url&amp;gt;"
        }&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Feb 2024 09:49:39 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/61974#M2764</guid>
      <dc:creator>Ariaa</dc:creator>
      <dc:date>2024-02-26T09:49:39Z</dc:date>
    </item>
    <item>
      <title>Re: How to overwrite git_source configuration in Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/62239#M2785</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/9"&gt;@Retired_mod&lt;/a&gt;&amp;nbsp; and thanks for replying. How does your solution differ from mine? Unless I'm missing some points here the only difference is with indentation, which actually makes "resources" a new target!&lt;/P&gt;</description>
      <pubDate>Wed, 28 Feb 2024 14:04:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/62239#M2785</guid>
      <dc:creator>Ariaa</dc:creator>
      <dc:date>2024-02-28T14:04:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to overwrite git_source configuration in Asset Bundles</title>
      <link>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/69241#M3012</link>
      <description>&lt;P&gt;I use target overrides to switch between branch and tags on different environments:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;resources:
  jobs:
    my_job:
      git_source:
        git_url: &amp;lt;REPO-URL&amp;gt;
        git_provider: gitHub

targets:
  staging:
    resources:
      jobs:
        my_job:
          git_source:
            # Use Git branch for staging deploys 
            git_branch: ${var.git_branch}

  prod:
    resources:
      jobs:
        my_job:
          git_source:
            # Use Git tag for prod deploys 
            git_tag: ${var.git_tag}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Discussion about that can be found here:&amp;nbsp;&lt;A href="https://github.com/databricks/cli/issues/1255" target="_self"&gt;https://github.com/databricks/cli/issues/1255&lt;/A&gt;&lt;/P&gt;&lt;P&gt;You need to repeat that for every job you define, which can be a pain if you have many jobs.&lt;/P&gt;</description>
      <pubDate>Fri, 17 May 2024 08:18:03 GMT</pubDate>
      <guid>https://community.databricks.com/t5/get-started-discussions/how-to-overwrite-git-source-configuration-in-asset-bundles/m-p/69241#M3012</guid>
      <dc:creator>Husky</dc:creator>
      <dc:date>2024-05-17T08:18:03Z</dc:date>
    </item>
  </channel>
</rss>

