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.
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.
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.
Prerequisites
- 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 your Automation Pipelines administrator.
- Add a Git endpoint. For an example, see How do I use the Git trigger in Automation Pipelines to run a pipeline.
- To have Automation Pipelines listen 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 your Automation Pipelines administrator.
- 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 your Automation Pipelines administrator.
Procedure
Results
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.
What to do next
To learn more, see the additional resources under Getting Started with VMware Aria Automation.