Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

On this Page

Table of Contents
maxLevel2
excludeOlder Versions|Additional Resources|Related Links|Related Information

After you have authorized After authorizing SnapLogic to access GitHub on your behalf, Git operations will be available in SnapLogic Manager. Your next steps depend upon whether your Project is already associated with a GitHub repository:

...

, you can start tracking a Project’s Assets, with the exception of Snap Packs and Snaplexes, in a GitHub repository. The repository must exist in GitHub first. From SnapLogic Manager, check out a branch or a tag per Project. Create and modify Accounts, Pipelines, Files, and Tasks in your normal workflow. From Manager, add, commit, and remove Assets from the GitHub repository. You can also add,

...

commit, and

...

If Project Assets are not being tracked, first follow the steps described in Linking a Repository to a Project.

Organizations often use multiple SnapLogic Orgs for remove file Assets using a command line or the GitHub UI.

We recommend using different SnapLogic Orgs to manage Assets during development, testing, and deployment. By using Using the Git Integration, you can work on the same Project in different Orgs and track changes it in the same repoGitHub repository. For example, in a development Org, you might associate Project1 Project-1 with a dev branch of Project-Repo-1. When you the Assets are ready to move the Assets to the testing Org, check them in for testing, commit and merge them to the test branch in GitHub. In the test Org, create Project1 associate it with Project-Repo-1 and checkout the test branch.

The Project can have a maximum of 200 files. If checking out a Project with more than 200 files, SnapLogic throws an error.

Warning

When committing files to GitHub from SnapLogic, some subdirectories might be inadvertently deleted from the repository, including GitHub Actions workflows in the .github directory. Target fix version: 4.29.2 patch in July 2022

...

After a Project is associated with a repository, you can add, update, or delete files from SnapLogic or from GitHub. To link a repository to a Project, follow these steps:

...

In the SnapLogic Manager, navigate to your Project and click the arrow:

...

In the options menu, click Checkout GitHub Repository:

...

Select the repository and branch or tag to link the project:

...

. When testing and bug fixing is complete, merge the changes into the main branch and tag a release for the production Org.

Refer to the Git Integration overview page for limitations and prerequisites.

The following sections describe how to track Project Assets in GitHub:

Table of Contents
minLevel1
maxLevel2
exclude3

Associating Project Assets with a Repository

Use Manager to check out a GitHub repository for tracking Project Assets. If a repository for a Project does not exist, you must first create it in your GitHub organization.

Checking out a Branch or a Tag

Check out a respository branch or tag:

  1. In the navigation tree, find the Project and click the arrow to open the options menu:

    Image Added
  2. From the options menu, choose Checkout GitHub Repository:

    Project options menuImage Added
  3. From the dropdown menus, select the repository:

    Image Added
  4. In the Branches/Tags field:

    • To select an existing branch or tag, click the arrow to display the list.

    • To filter the list start entering a name.

  5. Click Checkout.

The Git Integration associates the Project with the branch of the repository. You must add the Assets to track and they will display in the Project Asset table. The table title includes tracking information and a column for GitHub Status:

...

or tag. The banner above the Assets table identifies which repository and branch or tag is tracking the Project. The GitHub Status column shows whether assets are Tracked, Untracked, or Added:

...

Creating a New Branch

Create a new branch from the branch that is already checked out for a Project. For example, to create a new branch from the main branch, first check out main.

To create the new branch:

  1. In the navigation tree, click the arrow to open the options menu:

    Image Added
  2. From the options menu, choose Checkout GitHub Repository:

    Project options menuImage Added
  3. Verify that the repository and a branch are selected.

  4. In the Branches/Tags field, enter a new name:

    Image Added
  5. Click Checkout.

Switching Branches

To switch Project Assets to a different branch, follow these steps in Manager:

  1. In the SnapLogic Manager, navigate to your Project and Project navigation tree, click the arrow next to the Project name:

  2. From the options menu, click Checkout GitHub Repository:

    Image RemovedImage Added
  3. In the Checkout GitHub Repository dialog, select the branch or tag to switch to:to. Enter a name to filter or to create a new branch from the existing branch.

  4. Click Checkout.

The Project Assets in the Project now reflect the state of the Assets update to the state last committed to that branch .

...

From SnapLogic Manager, you can perform the following Git operations on Project Assets:

...

Adding a Project Asset to the repository and committing it results in it being tracked by GitHubor tag.

Adding a Single Asset

Assets that are not part of the repository have a GitHub Status of Untracked. You can add untracked Assets of all types, except Snap Pack and Snaplex. The procedure for all supported types is similar to the example documented here for adding a file, but you would not be uploading them, you would instead be creating them in the SnapLogic IIP. A

Tip

An alternate way to add an Asset is to commit Project changes. The Commit Changes dialog displays Assets that were not previously added in an Untracked assets list. Select the corresponding checkbox for an Asset and click Commit. After the commit, the GitHub status for that Asset changes to Tracked.

To add a file, follow these steps:

...

Navigate to the project in SnapLogic Manager.

...

Click (blue star) and upload the file.
The file displays in the Asset table with the GitHub Status Untracked

...

Assets individually or commit changes to add multilpe Assets at one time. Individually added Assets are not visible in GitHub until you commit them.

To add a single Asset to the repository in Manager:

  1. In the navigation tree, select the Project to display the Assets table.

  2. Find the Asset to add.

  3. Open the options menu by clicking the arrow to the right of the file Asset name

    Image Removed

    Click .

  4. Select Add to Repository. :

    Add to repositoryImage Added

    The GitHub status Status changes to Added.

    Image Removed
  5. With the file selected, open the GitHub menu and click Commit to GitHub Repository. The Commit changes dialog box opens. The file is shown under Changes to Commit in the dialog box.

  6. Add a Commit Message

    Image Removed
  7. Click Commit. The file is added to the Asset table and the GitHub Status reads Tracked

    Image Removed
  8. Refresh the GitHub page. The new file is displayed in the repository along with the commit message.

    Image Removed

...

Committing all Updated Assets

Update one or many Assets in a single commit. The following steps show an example of updating a single file. For other Assets, such as Pipelines and Tasks, edit them as usual and commit from the Project options menu.

To update a File Asset, follow these steps:

...

Navigate to the project in SnapLogic Manager.

...

Upload a file from local storage (by clicking the + symbol, and uploading it). Since the file already exists, an Asset conflict error dialog box displays. Click Overwrite to confirm.

...

Go to the GitHub menu and click Commit to GitHub. The Commit Changes dialog box opens. It automatically detects if there is a newer version of a file and lists it out in the dialog box under the Changes to Commit list.

...

When you commit Project changes, you can select which updated Assets to commit. To commit changes:

  1. In the navigation tree, click the arrow to the right of the Project name to open the options menu.

  2. Select Commit to GitHub:

    Commit to GitHubImage Added

    The Commit Changes dialog box opens and lists the Assets to commit:

    Commit changes dialogImage Added
  3. Deselect any Assets that you do not want to commit.

  4. Add a Commit Message.

  5. Click Commit. The Asset table is updated.

    Image Removed

    Refresh the GitHub repository page updates with the new GitHub Status.

  6. Log in to your GitHub account to confirm the updatecommit. 

    Image Removed

...

Removing Assets

You can delete any type of supported Asset from the GitHub repository. This does not delete the Asset in Manager, but stops GitHub from tracking it is no longer tracked by GitHub. The following provides an example of deleting a file.To delete a file . Similar to the add operation, you must commit Project changes before the Asset is removed from the repository.

To remove an Asset from the repository, follow these steps:

  1. Navigate to the project in SnapLogic Manager.

    Image Removed

    In the navigation tree, select the Project to display the Assets table.

  2. Find the Asset to remove.

  3. Open the File options menu by clicking the arrow adjacent to the right of the file Asset name.

  4. Click Remove from Repository.

    Remove from repositoryImage Added

    The GitHub Status changes to Removed:

  5. Commit the deletion from the GitHub menu by clicking Commit to GitHub Repository.  

  6. Add a Commit Message, if required:

    Image Removed
  7. Click Commit. The GitHub Status changes to Untracked and the file is deleted from the GitHub repository. 

    Image Removed
  8. Refresh the GitHub repository page to confirm deletion. 

    Image Removed

...

Pulling from a Repository

You can add, delete, or commit file Assets using the Git command line or GitHub repository page:

  • Add files

  • Update files

  • Delete files

If you make any changes from the GitHub sidethe GitHub UI. If you or a colleague makes any changes to the GitHub repository, you need to pull them in the changes into SnapLogic to synchronize the Projectchanges.

Pulling Updates with No Conflicts

The following example shows what happens when you initiate GitHub Pull in Manager after a file was pulling from GitHub after nonconflicting changes were committed to the GitHub repository:

  1. In the navigation tree, click the arrow to the right of the Project name to open the options menu.

  2. Select GitHub Pull.

  3. The GitHub Pull Messages dialog lists the Assets that were fetched from GitHub:

    Image Removed

  4. If you click OK  the new Asset displays in the Asset table:

    Image Removed
  5. .

  6. Click OK to update the Assets with the changes from GitHub.

Pulling Updates with Conflicts

If an Asset was changed in both GitHub and a change was made in Manager the IIP since the last commit, a pull operation pulling from GitHub creates a conflict. The Pull Messages dialog allows you to resolve the conflict:

...

Resolve the conflict in one of the following ways:

  • To overwrite a the local file with the repository version, select the file and it and click Pull.

  • To retain the local file, do not select the checkbox and click PullTo overwrite the version in the GitHub repository with the local file, commit it.

...

  • , then commit the Project.

Related Content