Skip to main content

Git Orchestrator

Enterprise

Image$DATAOPS_GIT_RUNNER_IMAGE

The Git orchestrator provides tools for working with Git projects and code. This allows a pipeline to perform git operations, such as checking out a remote repository and adding files to the project. Outside of DataOps, Git operations can only be used if the required third-party library is available from a Git repository, such as code internal to the organization.

Using this orchestrator simplifies checking out the appropriate repo and adding the files as artifacts to the pipeline run. This orchestrator can be especially useful for importing an organization's shared libraries from other VCS platforms into DataOps pipelines.

Usage

This orchestrator allows you to execute arbitrary Git commands from a job script. In this example, an external repository is cloned into the pipeline workspace and saved as an artifact to make it available to the next jobs:

pipelines/includes/local_includes/git-jobs/my_git_job.yml
"My Git Job":
extends:
- .agent_tag
stage: "My Stage"
image: $DATAOPS_GIT_RUNNER_IMAGE
variables:
MY_LIB_REPO: https://github.com/some-amazing-library
MY_LIB_DIR: $CI_PROJECT_DIR/my-lib
script:
- git clone $MY_LIB_REPO $MY_LIB_DIR
icon: ${GIT_ICON}
artifacts:
paths:
- $MY_LIB_DIR

If you need access to the DataOps Vault, include /dataops in your script tag e.g.

"My Git Job":
script:
- /dataops
- git ...

And your script will now be able to read and write from the vault.

Supported parameters

None

Example jobs

None