Manage Input Sets and Overlays in Git Repos

Updated 4 months ago by Michael Cretzman

Currently, this feature is in Beta. Once the feature is released to a general audience, it will be available for Harness Professional, Essentials, Trial, and Community Editions.

Once you have enabled Harness Git Experience in your Project, you can create Pipelines and resources and store their YAML files in your Git repo's branches and folders. Git is the single source of truth. The Pipelines and resources are stored in the repo first, and then synced with Harness.

Pipeline Input Sets and Overlays can be stored in Git also. They can be stored in repos, branches, and folders separate from the Pipeline where they were created.

This topic covers add an Input Set to your Git repo as part of Harness Git Experience. It does not cover Input Sets and Overlays in detail. For details on those, see Run Pipelines using Input Sets and Overlays.

In this topic:

Before You Begin

Make sure that you've added a Source Code Manager (SCM) and enabled Harness Git Experience in your Project.

Limitations

Do not enable Harness Git Experience on a Project that already has Pipelines and resources. You must enable Harness Git Experience on a new Project when you first create the Project.

This is a temporary limitation.

Step 1: Create a Pipeline

Before you can add an Input Set to Git, you need to create and save its Pipeline. This topic does not covering adding a Pipeline to Git.

Follow the steps in Manage Pipelines in Git Repos to set up a Pipeline and save it to a Git repo, branch, and folder.

Now that you have your Pipeline set up, let's create the Input Set.

Step 2: Create an Input Set

In your Pipeline, click Input Sets.

The New Input Set settings appear, including the Git Repository Details settings.

In Repository name, select the repo where you want to store this Input Set. This is not the actual repo name, it is the name you gave to the repo connection when you added it in the Project's Git Experience settings.

In Select a Brach, select repo branch to use.

Configure the rest of the Input Set and click Save.

Save Input Sets to Git appears.

Step 3: Save Input Set to Git

In Save Input Sets to Git, you define the Harness Folder, subfolder(s), and file path for the Input Set YAML file. You also select the branch for the commit.

In Harness Folder, select one of the folders set up in the Project's Git Experience settings. See Enable Git Experience in a Project.

The YAML file for the Input Set will be saved to this folder. But you can add subfolders in File Path.

In File Path, enter a name for the YAML file, such as GitExpInputSet.yaml. Harness will generate one automatically from the Input Set name, but you can add your own.

To enter a subfolder of the Harness Folder you selected, enter the folder name in front of the file name like inputsets/GitExpInputSet.yaml.

In Commit Details, enter a message.

In Select Branch to Commit, commit to an existing or new branch.

  • Existing branch: you can start a pull request if you like.
  • New branch: enter the new branch name. You can start a pull request if you like.

Here's a simple example:

Click Save.

The Input Set is saved to the repo, branch, folder, and file.

In your Git repo, locate the branch, folder, and file.

Harness created a .harness folder under the folder you selected in Harness Folder.

If you added a folder to File Path, open that folder.

Click the YAML file for your Input Set. The YAML is displayed.

See Also

See Git Experience How-tos.


Please Provide Feedback