How do I continuously integrate code from my GitHub or GitLab repository into my pipeline in Automation Pipelines
Automation Pipelines
As a developer, you want to continuously integrate your code from a GitHub repository or a GitLab Enterprise repository. Whenever your developers update their code and commit changes to the repository,
Automation Pipelines
can listen for those changes, and trigger the pipeline. - Plan for your continuous integration build. See Planning a continuous integration native build in Automation Pipelines before using the smart pipeline template.
- Verify that a GitLab source code repository exists. For help, see yourAutomation Pipelinesadministrator.
- Add a Git endpoint. For an example, see How do I use the Git trigger in Automation Pipelines to run a pipeline.
- To haveAutomation Pipelineslisten for changes in your GitHub repository or your GitLab repository, and trigger a pipeline when changes occur, add a webhook. For an example, see How do I use the Git trigger in Automation Pipelines to run a pipeline.
- Add a Docker host endpoint, which creates a container for the continuous integration task that multiple continuous integration tasks can use. For more information about endpoints, see What are Endpoints in Automation Pipelines.
- Obtain the image URL, the build host, and the URL for the build image. For help, see yourAutomation Pipelinesadministrator.
- Verify that you use JUnit and JaCoCo for your test framework tools.
- Set up an external instance for your continuous integration build: Jenkins, TFS, or Bamboo. The Kubernetes plug-in deploys your code. For help, see yourAutomation Pipelinesadministrator.

To have
Automation Pipelines
trigger your pipeline on code changes, you use the Git trigger. Automation Pipelines
then triggers your pipeline every time you commit changes to your code. The
Automation Pipelines
pipeline workspace supports Docker and Kubernetes for continuous integration tasks and custom tasks.For more information about configuring the workspace, see Configuring the Pipeline Workspace.
The following flowchart shows the workflow that you can take if you use a smart pipeline template to create your pipeline, or build the pipeline manually.
Workflow that uses a smart pipeline template or creates a pipeline manually

The following example uses a Docker workspace.
To build your code, you use a Docker host. You use JUnit and JaCoCo as your test framework tools, which run unit tests and code coverage, and you include them in your pipeline.
Then you can use the continuous integration smart pipeline template that creates a continuous integration pipeline that builds, tests, and deploys your code to your project team Kubernetes cluster on AWS. To store the code dependency artifacts for your continuous integration task, which can save time in code builds, you can use a cache.
In the pipeline task that builds and tests your code, you can include several continuous integration steps. These steps can reside in the same working directory where
Automation Pipelines
clones the source code when the pipeline triggers. To deploy your code to the Kubernetes cluster, you can use a Kubernetes task in your pipeline. You must then enable and run your pipeline. Then, make a change to your code in the repository, and watch the pipeline trigger. To monitor and report on your pipeline trends after your pipeline runs, use the dashboards.
In the following example, to create a continuous integration pipeline that continuously integrates your code into your pipeline, you use the continuous integration smart pipeline template. This example uses a Docker workspace.
Optionally, you can manually create the pipeline, and add stages and tasks to it. For more information about planning a continuous integration build and manually creating the pipeline, see Planning a CICD native build in Automation Pipelines before manually adding tasks.
- Follow the prerequisites.
- To create the pipeline by using the smart pipeline template, open the continuous integration smart pipeline template and fill out the form.
- Click.
- Answer the questions in the template about your source code repository, build toolsets, publishing tool, and the build image workspace.
- Add Slack notifications or Email notifications for your team.
- To have the smart pipeline template create the pipeline, clickCreate.
- To make any further changes to the pipeline, clickEdit, make your changes, and clickSave.
- Enable the pipeline and run it.
- To create the pipeline manually, add stages and tasks to the canvas, and include your native continuous integration build information in the continuous integration task.
- Click.
- Click the stage, then drag the several continuous integration tasks from the navigation pane to the stage.
- To configure the continuous integration task, click it, and click theTasktab.
- Add the steps that continuously integrate your code.
- Include the paths to the dependency artifacts.
- Add the export location.
- Add the test framework tools that you'll use.
- Add the Docker host and build image.
- Add the container registry, working directory, and cache.
- Save the pipeline, then enable it.
- Make a change to your code in your GitHub repository or GitLab repository.The Git trigger activates your pipeline, which starts to run.
- To verify that the code change triggered the pipeline, click.
- To view the execution for your pipeline, clickExecutions, and verify that the steps created and exported your build image.
- To monitor the pipeline dashboard so that you can track KPIs and trends, click.
Congratulations! You created a pipeline that continuously integrates your code from a GitHub repository or GitLab repository into your pipeline, and deploys your build image.
To learn more, see the additional resources under
Getting Started with VMware Aria Automation
.