Skip to main content

How to Use a third-party Git Repository

It is possible to manage a DataOps project using an external Git repository like GitHub, Bitbucket, or Azure DevOps for central code management. In this case, synchronization of the external repository can be set up such that all changes (commits, branches, etc.) are constantly pushed to DataOps.

Pipeline run tags (e.g. [full-ci.yml ci]) can also be used, as the full commit message is part of the synchronized information.

Synchronizing from GitLab

This procedure will set up synchronization from a project in GitLab (either gitlab.com or a self-managed instance) into a project in DataOps.

treat DataOps read-only

The DataOps project should then be considered read-only from within DataOps - all changes should be made via GitLab.

  1. Create a personal access token in DataOps that has the write_repository scope, under a user account that has the appropriate access level on the project.

  2. Set up a DataOps project:

    • If the DataOps project already exists, clone it into GitLab using the personal access token
    • If no project currently exists, create an empty project in DataOps, then create a DataOps-structured project in GitLab.
  3. In the GitLab project, navigate to Settings > Repository > Mirroring repositories

  4. Enter the URL to the DataOps project (including the .git extension), select the other options as required and save the settings.

  5. Make a test commit to the GitLab project and include a pipeline run tag to test the synchronization.

Pushing to Bitbucket

  1. Create an empty (not even a Readme or .gitignore) repository on Bitbucket.

  2. Create (or use an existing) app password that has full access to your repository.

  3. In DataOps, navigate to the project and open Settings > Repository from the sidebar menu, and expand the Mirroring repositories section.

    mirror-to-bb-01 __shadow__

  4. Enter the URL of the Bitbucket repository in the Git repository URL field, including the username of the user that will authenticate the connection, e.g. https://myusername@bitbucket.org/myusername/my-project.git.

  5. The mirror direction Push and authentication method Password are the default and only selections available.

    mirror-to-bb-02 __shadow__

  6. Enter your app password (from above) and select the other options if required.

    mirror-to-bb-03 __shadow__

  7. If successful, the mirrored repository will show in the table below the form. Click the Update now button to start the first push.