Skip to main content

Git Orchestrator

TypeFlexible
Image$DATAOPS_GIT_RUNNER_IMAGE

The Git Orchestrator is a flexible orchestrator, providing 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 subsequent 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.

  script:
- /dataops
- git ...

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

Supported Parameters

None

Example Jobs

None

Project Resources

None

Host Dependencies (and Resources)

None