Git Clone
The Git Clone step is used to fetch the source code repository from a Git provider, such as GitHub, GitLab, Bitbucket, or Azure DevOps, and clone it into the runner where the build and deployment processes take place. This step ensures that the latest version of the codebase is available for subsequent build and deployment steps.
Prerequisites
Below is a list of workflow steps that must be completed before executing the Git Clone workflow step, along with their respective descriptions:
Prerequisite Workflow Step | Description |
---|---|
Activate SSH Private Key | This step sets up your SSH key on the build machine if you used one to connect your repository with SSH. |
If you have not connected your repo via SSH, the Git Clone does not have any dependency on the Activate SSH Private Key step.
We recommend using this step at the beginning of the workflow to avoid any problems in the workflow.
Input Variables
You can find all the parameters required for this step in the table below, with their descriptions in detail.
After connecting the repository, the following Reserved Environment Variables, which Git Clone uses as input, will be automatically populated. Ensure that the variable you provide has a value if you intend to make any changes. The required variables must not be left empty.
Variable Name | Description | Status |
---|---|---|
$AC_GIT_URL | URL of the repository. After the provider connection is completed with the Git provider, these values will be set automatically. | Required |
$AC_GIT_COMMIT | Commit of the repository. This value will come from the Git provider. When a new commit is pushed, Appcircle fetches the details of the latest commit. | Optional |
$AC_GIT_BRANCH | Branch of the repository. You can find more details about branch management. The branch information selected before starting manual build on the interface is automatically included here. | Optional |
$AC_GIT_TAG | Tag of the repository. If you have tags in your repository, Appcircle can start a build according to the tags. | Optional |
$AC_GIT_LFS | Used to specify whether large files will be downloaded. The default value is false . | Optional |
$AC_GIT_SUBMODULE | Used to specify whether the submodule should be cloned. | Optional |
$AC_GIT_CACHE_CREDENTIALS | If this variable is set to true , the credentials will be cached. This can be useful if the same credentials are used for multiple repositories. The default value is true . | Optional |
$AC_GIT_EXTRA_PARAMS | If this variable is set, it sends additional parameters for Git requests. | Optional |
Output Variables
Variable Name | Description |
---|---|
$AC_REPOSITORY_DIR | Specifies the root directory of the cloned repository. This path is automatically generated after the repository is cloned. |
To access the source code of this component, please use the following link: