Git Repository

The Git action block enables you to pull your latest software version from a Git repository directly to your edge devices.

Overview

Connect's Update Flow enables your edge devices to clone from a Git repository whether you are using a public Git repository or your own private repository for your code.

When you use a Git Repository action block, the edge devices will use the git clone command to pull your Git repo.

Prerequisites

Drag the Action Block

To include the Git Repository action block in your update flow, do the following:

  1. Go to Updates in the left sidebar and click Create Update Flow.

  1. Drag the Git Repository action block and drop it in the workflow.

Configure the Action Block

Click the action block to open and configure it.

  1. Enter a name for the action block.

  2. Mark this checkbox only if you are using a private Git repository.

  3. Git Account: Choose the account where your repo exists. If the account is not in the list, you can add it according to the procedure in Link Git Account.

  1. Device Directory Path: Enter the path where the git will be installed on the device, for example, /home/user/App.

  2. Remote Repository URL: Enter the URL of the git, for example, https://github.com/jfrog-connect/app-repo.git.

Tip: The folder on the device must exist beforehand. Otherwise, the update will fail. Connect does not automatically create folders when deploying updates. You can create a folder using the Run Command action block.

  1. Configure your On Failure policy and instructions for rolling back, if necessary.

  2. Save your action block configuration.

On Failure and Rollback

For your On Failure policy, choose one of the actions for Connect to do in case the Git Repository action block fails.

  • Continue Update Flow: If the Git Repository action block fails, Connect will simply continue with the next action block in the update workflow.

  • Run General Rollback: The action block and the entire update workflow are rolled back.

As a general precaution, Connect Agent creates a backup of the relevant device folder in a temporary location. If a rollback is required, the agent restores the folder to its initial state.

Free Memory Requirement

To enable Rollback functionality, your device's free memory must be greater than the update size. Use the relationship below to calculate the amount of free memory required.

Free Memory Required > Current Folder Size + Update Size + 10MB

What’s Next?

Learn more about configuring your On Failure policy and instructions for rolling back.

Last updated