Connecting External CI

Guide on how to connect GitHub and CircleCI to Limio.

Limio uses AWS CodeCommit to store and manage versions of your Custom Components. If you use another platform, such as GitHub or GitLab, you can continue using it, but you must mirror your changes to Limio's AWS CodeCommit repository.

To automate this process and make sure all your continuous changes to Custom Components are in Limio, you should set up a CI pipeline using GitHub Actions or CircleCI.

In this tutorial, we will be using GitHub Actions and CircleCI with GitHub.

Prerequisite

To connect an external CI in GitHub, you will need to have the following:

  • Cloned the Limio Components Repository. If you haven't done this yet, go here. As part of this setup, you will have:

    • Securely stored the credentials (username and password).

      • If you don't have this, contact the person who initially cloned the repository or contact [email protected] to request credentials.

    • The URL of the AWS CodeCommit repository to mirror. For example:

      • https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/{tenant}-components
  • For GitHub Actions, you have access to Github Actions.

  • For CircleCI, you have connected CircleCI to GitHub.

    • You have GitHub API key to the repository you wish to use for the mirroring.

    • You have GitHub Admin access.

  • Be familiar with YAML files

Mirroring Your Repository with a CI Pipeline

To mirror your repository, Limio recommends using a Cron Job in your CI pipeline. Alternatively, some tools may support Triggers, which also allow you to automatically duplicate the repository when pushing to specific branches of your GitHub repository.

Regardless of the method you choose, you will need to use the Limio-provided credentials along with your GitHub API key to run a scripted process. Tools like Python can be used to automate cloning and syncing your repository.

The key step is to commit a YAML file in the source repository you intend to use for Limio. In this tutorial, we'll explain how you can do this in GitHub Actions or CircleCI.

Use another tool? Contact [email protected] for help.

GitHub Actions

To set this up, you should follow this guide from GitHub. When you need to provide a YAML file, you can use this template below. Make sure to:

  • Modify ${{ secrets.CODECOMMIT_USER }} and ${{ secrets.CODECOMMIT_PASS }} with your credentials

  • Modify the https://git-codecommit.eu-central-1.amazonaws.com/v1/repos/{tenant}-components URL with your tenant's URL.

You can see also see an example of a mirrored public repository in Github with Github Actions here.

CircleCI

To do this, you should be familiar with Circle CI YAML file (see here). We've prepared an example YAML configuration, though you should double-check it meets your company's practices.

The YAML file will run two files, setup-ssh.sh and clone.js, also described below

setup-ssh.sh

This file sets up your credentials for the Limio Components Repository and should be structured as follows:

clone.js

This file handles the cloning of the repository. While this example uses Node, any scripting language can be used. It also includes a cleanup job to delete the local repository after the sync is complete. Here’s an example:

Next steps

Once you've set up the repository mirroring, you can manage the repository as per your coding convention. Other developers can also clone the mirrored repository to their local machine.

To make sure everything work, you should create your first Custom Components. Go the README file in the repository and follow the guidance there. You can also find it here.

Once you push a change to a Custom Component, your repository will be updated. All the Custom Components in your repository will be automatically built and made available in the Component selector under the "Custom Component" category in Limio Page Builder.

Custom Components in the Component selector in the Limio application
Custom Component in Page Builder in the Limio application

If you version your components, you can also check the version of your Custom Component matches your expectation.

Last updated

Was this helpful?