For the complete documentation index, see llms.txt. This page is also available as Markdown.

Move inline entities to Git

Convert existing inline entities to remote and save them in Git

You can move your inline pipelines and input sets to Git. Release Orchestration processes, activities, and process inputs support the same Move to Git action.

What you will learn from this topic

Moving inline entities like pipelines to a Git repository can provide several benefits, including:

  • Version control: By storing the pipelines in a Git repository, you can easily track changes and roll back if necessary.

  • Collaboration: Multiple people can work on pipelines at the same time. This makes it easy to review and merge changes.

  • Reusability: You can pull the pipelines from the Git repository and use it in different projects or environments.

  • Compliance: Storing pipelines in a Git repository can help with compliance and auditing.

  • Flexibility: The pipelines can be run from different environments by using a CI/CD pipeline.

  • Security: Only authorized users can access them.

Move Inline Pipeline

This section explains steps to move an inline pipeline and its associated input sets to Git.

  1. In app.harness.io, go to your project.

  2. Select Pipelines.

  3. Select Move to Git next to the inline pipeline you want to move to Git.

  4. The Move Pipeline to Git dialog opens.

  5. In Git Connector, select or create a Git Connector to the repo for your Project. For more information, see Code Repo Connectors.

IMPORTANT

Connector must use the Enable API access option and Token The Connector must use the Enable API access option and Username and Token authentication. Harness requires the token for API access. Generate the token in your account on the Git provider and add it to Harness as a Secret. Next, use the token in the credentials for the Git Connector.​

For GitHub, the token must have the following scopes:

  1. In Repository, select your repository. There are only a few repositories listed here, so if yours is not listed, enter its name.

    Create the repository in Git before entering it in Select Repository. Harness does not create the repository for you.

  2. In Git Branch, select your branch. If your branch is not listed, enter its name since only a select few branches are filled here.

    Create the branch in your repository before entering it in Git Branch. Harness does not create the branch for you.

  3. Harness pre-populates the YAML Path. You can change this path and the file name.

  4. Enter a message in Commit Message.

  5. Select Move to Git.

    Your pipeline now appears in the list as a remote entity with the repository details next to it.

Move Inline Input Sets

After you move your pipeline to Git, you can move your input sets to Git as well.

  1. Go to Input Sets in your pipeline.

  2. Click the 3 dots to the right of the set and click Move to Git

  3. Repeat steps 4-10 for move inline pipeline

Move Inline Process

This section explains steps to move an inline Release Orchestration process to Git.

Move to Git is available only when the process is stored inline. A process that is already remote does not show this option.

  1. In app.harness.io, go to your project and select Release Orchestration > Processes.

  2. Select the 3 dots next to the inline process you want to move, then select Move to Git.

  3. The Move Process to Git dialog opens.

  4. In Git Connector, select or create a Git Connector to the repo for your project. For more information, go to Code Repo Connectors.

  5. In Repository, select your repository, or enter its name if it is not listed.

  6. In Git Branch, select your branch, or enter its name if it is not listed.

  7. Harness pre-populates the File Path as .harness/process/<process-identifier>.yaml. You can change this path and the file name.

  8. Select Continue.

    Your process now appears in the list as a remote entity with the repository details next to it.

Move Inline Activity

This section explains steps to move an inline Release Orchestration activity to Git.

  1. In app.harness.io, go to your project and select Release Orchestration > Activity Store.

  2. Select the 3 dots next to the inline activity you want to move, then select Move to Git.

  3. The Move Activity to Git dialog opens with the same fields as the process dialog: Git Connector, Repository, Git Branch, and File Path.

  4. Harness pre-populates the File Path as .harness/activity/<activity-identifier>.yaml. You can change this path and the file name.

  5. Select Continue.

    Your activity now appears in the list as a remote entity with the repository details next to it.

An activity moves independently of the process that references it. Moving a process to Git does not move its activities, and moving an activity does not require its process to be remote.

Move Inline Process Input

Move to Git for a process input is available only after its parent process is already remote.

If the parent process is still inline, the Move to Git option next to a process input is disabled. Move the parent process to Git first, using the steps in Move Inline Process.

Once the parent process is remote, any new process input set you create under it is created directly as remote, since Harness only shows Git configuration fields for input sets created under a remote process. A process input set created earlier, while the parent process was still inline, keeps its inline storage even after the parent process moves. Move that existing inline process input to Git separately:

  1. Go to Input Store in your process.

  2. Select the 3 dots next to the inline process input, then select Move to Git.

  3. The Move Process Input to Git dialog opens. The Git Connector, Repository, and Git Branch are locked to the parent process and cannot be changed.

  4. Harness pre-populates the File Path as .harness/process/<process-identifier>/<input-set-identifier>.yaml. You can change this path and the file name.

  5. Select Continue.

    Your process input now appears in the list as a remote entity with the repository details next to it.

Move each process input one at a time. Moving the parent process, or moving one process input, does not move any other process input.


Next steps

Last updated

Was this helpful?