cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to set a job trigger in a yml deployment asset bundle?

DatabricksDude
New Contributor

Working on an asset bundle/yml file to deploy a job and some notebooks.  How to specify within the yml file a trigger to run the job when files arrive at a specified location?  Thanks in advance!

1 REPLY 1

Kaniz
Community Manager
Community Manager

Hi @DatabricksDudeTo trigger a job in your YAML file when specific files arrive at a specified location, you can use the following approaches based on the context of your deployment:

  1. GitLab CI/CD:

    • If youโ€™re using GitLab CI/CD, you can achieve this by defining rules for your job. The changes keyword allows you to specify patterns for files that trigger the job. However, by default, it only triggers for the current commit.
    • To make the job run whenever a file in the specified directory changes at any commit in the branch, consider using merge requests (MRs). Create a unique MR job that contains the relevant changes part. For example:
      build-mr:
        extends: .build_job
        before_script:
          - APP=one
        only:
          refs:
            - merge_requests
        changes:
          - src/one/**/*
      
      This way, the job will run after merging the side branch into the target branch1.
  2. Azure DevOps:

  3. Databricks:

Happy deploying! ๐Ÿš€

 
Welcome to Databricks Community: Lets learn, network and celebrate together

Join our fast-growing data practitioner and expert community of 80K+ members, ready to discover, help and collaborate together while making meaningful connections. 

Click here to register and join today! 

Engage in exciting technical discussions, join a group with your peers and meet our Featured Members.