On this Page
Table of Contents | ||||
---|---|---|---|---|
|
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 |
...
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 | ||||||
---|---|---|---|---|---|---|
|
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:
In the navigation tree, find the Project and click the arrow to open the options menu:
From the options menu, choose Checkout GitHub Repository:
From the dropdown menus, select the repository:
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.
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:
In the navigation tree, click the arrow to open the options menu:
From the options menu, choose Checkout GitHub Repository:
Verify that the repository and a branch are selected.
In the Branches/Tags field, enter a new name:
Click Checkout.
Switching Branches
To switch Project Assets to a different branch, follow these steps in Manager:
In the SnapLogic Manager, navigate to your Project and Project navigation tree, click the arrow next to the Project name:
From the options menu, click Checkout GitHub Repository:
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.
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 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:
In the navigation tree, select the Project to display the Assets table.
Find the Asset to add.
Open the options menu by clicking the arrow to the right of the file Asset name:
Click .
Select Add to Repository. :
The GitHub status Status changes to Added.
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.
Add a Commit Message.
Click Commit. The file is added to the Asset table and the GitHub Status reads Tracked.
Refresh the GitHub page. The new file is displayed in the repository along with the commit message.
...
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:
In the navigation tree, click the arrow to the right of the Project name to open the options menu.
Select Commit to GitHub:
The Commit Changes dialog box opens and lists the Assets to commit:
Deselect any Assets that you do not want to commit.
Add a Commit Message.
Click Commit. The Asset table is updated.
Refresh the GitHub repository page updates with the new GitHub Status.
Log in to your GitHub account to confirm the updatecommit.
...
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:
Navigate to the project in SnapLogic Manager.
In the navigation tree, select the Project to display the Assets table.
Find the Asset to remove.
Open the File options menu by clicking the arrow adjacent to the right of the file Asset name.
Click Remove from Repository.
The GitHub Status changes to Removed:
Commit the deletion from the GitHub menu by clicking Commit to GitHub Repository.
Add a Commit Message, if required:
Click Commit. The GitHub Status changes to Untracked and the file is deleted from the GitHub repository.
Refresh the GitHub repository page to confirm deletion.
...
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:
In the navigation tree, click the arrow to the right of the Project name to open the options menu.
Select GitHub Pull.
The GitHub Pull Messages dialog lists the Assets that were fetched from GitHub:
If you click OK the new Asset displays in the Asset table:
.
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 Pull. To overwrite the version in the GitHub repository with the local file, commit it.
...
, then commit the Project.