Artifact Registry and Continuous Integrations
Learn how to use Artifact Registry with the Continuous Integration (CI) module.
Build and push to Docker with Artifact Registry
Harness CI offers a Build and push to Docker step that allows you to build and push a docker image to any registry. Usually, this requires a connector to the registry you want, but with AR you can connect to a registry directly, within the platform, without any complicated setup.
- Interactive guide
- Step-by-step
To do so, follow these steps:
- Navigate to your pipeline, and enter your
Build
stage. - Create a new
Build and Push an image to Docker Registry
step. Harness Artifact Registry
is the default registry type. Ensure that it is selected, and move to the next step.- Select your registry under
Registry
. Clicking the field will show a list of available registries. - Once your registry is selected, a list of images will populate under
Image Name
. Choose one, or type the name of a new image that you are building the first time. - Enter any image tags you wish under
Tags
. - Click
Apply Changes
at the top right, and you are done! No connectors needed.
Add a Run or Plugin Step to Your CI Pipeline
Seamlessly reference artifacts stored in Harness Artifact Registry within your CI Run and Plugin steps. This functionality eliminates the need for an external connector, providing a streamlined and user-friendly experience, while enabling efficient and simplified workflows.
- Interactive guide
- Step-by-step
To do so, follow these steps:
- Navigate to your pipeline, and enter your
Build
stage. - Create a new
Run
step. Harness Artifact Registry
is the default registry type. Ensure that it is selected, and move to the next step.- Select your registry under
Registry
. Clicking the field will show a list of available registries. - Enter your artifact's
imageName:version
. - Add your run command, e.g. `echo "Run step completed".
- Click
Apply Changes
.
To verify the Run or Plugin step executes as expected, run the pipeline.