BEST PRACTICES

Adding a Build Profile & Connecting a Repository

New to Appcircle Build module? Follow our quick start guide to build your iOS and Android apps in the cloud.

The Build Module allows you to streamline and automate your mobile app build flows.

The Build Module is the first step to automate your CI/CD processes to achieve a NoOps environment.

Create a build profile (app)

A build profile is an app that you can build in a target OS and framework.

To create your first build profile, click on the orange "Add New" button on top left of the screen.

Enter a name for your build profile and select target operating system (iOS or Android) and target platform.

Connect your repository

You can connect GitHub, Bitbucket and GitLab repositories to your build profile through oAuth apps or GitHub through a GitHub app. Alternatively, You can connect private repositories through SSH and public repositories directly on GitHub, Bitbucket, GitLab and other compatible git providers such as Azure DevOps and AWS CodeCommit. (Please refer here for more information on AWS CodeCommit connections.)

If you authorize Appcircle to connect to your Github, BitBucket or GitLab account, you can auto-build your project with hooks, get build statuses and the full list of commits. If you connect to a repository through SSH or through a public URL, you need to set up webhooks manually.

To test drive Appcircle, you can find various sample projects in the Appcircle GitHub page or you can just press on the "Proceed with a sample project" button to populate the repository URL field with a compatible project based on the selected framework.

To enable triggered auto builds with hooks for SSH repository connections, please refer to the following guide: Build Manually or Automatically with Webhooks and Triggers

Connecting to a Cloud Git Provider (GitHub, Bitbucket and GitLab)

If you authorize Appcircle to access your repositories, you can select the repository that you want to connect in the next screen.

If you are a part of an organization, you can also connect your organization's repositories too. To grant Appcircle permission to access the repositories of an organization, you need to have the necessary privileges at the organization level. If you are using the GitHub app to connect, you have provide selective access to specific repositories.

In such a case, only the selected repositories will be listed. To be able to view other repositories, you must grant access for them under the Applications section in the account/organization settings screen on GitHub. You can directly access this screen by clicking on the "Missing a repository?" link in the previous screen.

On the top right of the repository selection screen, you can switch organizations (e.g. the personal account and any organizations that granted access to Appcircle).

Connecting to a Private Repository with SSH

If you use a private repository using an SSH Key, you need to have an SSH key pair ready and enter your private key to Appcircle so Appcircle can access your repository.

For the SSH key field in the repository connection, the private key is required. The public key is entered/stored in the Git provider while the private key is entered in Appcircle.

To generate a new key pair, you can run the following command:

ssh-keygen -t rsa -b 4096 -P '' -f ./appcircle-ssh -m PEM

Two files will be created as appcircle-ssh.pub (Public key) and appcircle-ssh (Private key)

You can then run the cat ./appcircle-ssh command and enter its output to Appcircle and run the cat ./appcircle-ssh.pub command and enter its output to the SSH keys section of the Git provider.

How to connect to AWS CodeCommit repositories through SSH?

AWS CodeCommit requires the creation of a dedicated user for repository connections through SSH (i.e. the root user cannot be used for this purpose).

  • First, create a user in AWS IAM and assign the following permissions to the user:

  • Go to IAM -> Users -> User -> Security credentials and select "Upload SSH key".

  • Take a note of the SSH key ID generated by AWS as follows:

  • Once you login with the newly generated user and copy the repository URL in SSH format, you will receive URL as follows: ssh://git-codecommit.us-east-2.amazonaws.com/v1/repos/MyDemoRepo

  • For the SSH connection to be initialized, you need to add the public key to your URL to have it in the following format, which then can be entered in Appcircle to be used in SSH connections.ssh://[email protected]/v1/repos/MyDemoRepo

View the newly created build profile

You will see your build profile once it has been created. Click on the build profile to connect a repository and fetch your code to Appcircle.

Appcircle will then pull your branches, commits and other information from your repository.