BEST PRACTICES

Build Manually or Automatically with Webhooks and Triggers

There are multiple ways to trigger a build in Appcircle. You can trigger builds manually or automate the process with triggers.

Manual Build

As the name states, your build profile will not build your application until you tell it to. You can browse branches in your Git repository and select any commit from any branch you need built. To initiate a manual build, just press the "Build Now" button next to the commits under a branch.

Automatic Build

There are two options to set up webhooks for automatic builds

  • You can authorize the Appcircle oAuth app for GitHub, Bitbucket or GitLab repositories for direct integration. The triggers will be available for use immediately. (You can skip the next part about the webhook setup.)

  • For the repository connections through SSH, you can add the specific webhook for that build profile manually to the compatible git provider. This enables the git provider to send a POST request to Appcircle for the selected events, which you can then use for triggers.

Setting Up Manual Webhooks for SSH and Public Repositories

When you connect a repository through SSH or through a public URL, the Webhook URL option will be enabled in context menu of the build profile, accessible from the three dots on each profile card in the profile list.

If the git provider is detected, a compatible URL will be displayed automatically. If not, you will be first prompted to select the provider to display the webhook URL.

You can copy this URL and paste it in the related section in the git provider repository settings with the copy button.

You can also regenerate the URL to invalidate/revoke the previous one with the refresh button.

Please refer to the following guides to set up webhooks in various git providers:

In essence, you need to find the Webhooks section under the repository settings and paste the payload URL. You can then select the relevant events for the triggers, some examples of which are branch/tag creation/removal, pull requests and pushes.

How to enable triggers for AWS CodeCommit repositories?

Appcircle supports AWS CodeCommit triggers through an Amazon SNS topic.

For more information, please refer to: https://docs.aws.amazon.com/codecommit/latest/userguide/how-to-notify-sns.html

After you follow the steps in the referenced document above to create a trigger, you need to create a notification rule under CodeCommit Settings as shown below to add a webhook URL.

Then select the "Enable raw message delivery" option while adding the webhook URL as a subscription to the topic.

Autobuild Trigger Types

Auto build on every push

Appcircle will start building your application whenever you push a commit to your Git repository. Regardless of the branch, your project will be built automatically.

Auto build on every tagged push

Appcircle will start building your application whenever you perfom a tagged push to your Git repository. Regardless of the tag, your project will be built automatically.

Selective auto build with specific tags

Appcircle will start building your application whenever you perfom a push with certain tag or tags to your Git repository. Your project will be built automatically only if the push has the tag or tags you specify.

You can specify tags with Unix shell-style wildcards to trigger builds. Here's a list of wildcards available:

Pattern

Description

Example

*

Matches anything

Will build all tags

* *

Matches anything between asterisks

*release* will build all tags with release in the tag name

?

Matches a single character

release-? will build tag release-a and release-b but not release-ab

[ ]

Matches any character between brackets

release-[ab] will build release-[a] and release-[b] but not release-[c]

[! ]

Matches any character not in between brackets

release-[!b] will build release-[a] and release-[c] but not release-[ab]