CircleCI integration with container registries
Batel Zohar
Posted on December 11, 2019
CircleCI is a cloud-based continuous integration and delivery platform, It’s free for open-source repositories and supports most languages. From version 2.1, CircleCI supports orbs, that are shareable packages of configuration elements, including jobs, commands, and executors. Therefore we don’t need to reinvent the wheel as we can easily use the artifactory-orb which contains the JFrog CLI to store our build artifacts for future distribution in our Docker Container Registry. In this blog, I will show you how to use CircleCI by using a private JFrog Container Registry to store your builds, artifacts, and build information.
Let’s take a closer look at how this actually works. The following example describes how to easily configure CircleCI to push Docker builds as artifacts to JFrog container registry using orbs.
Step 1: Clone the sample repository
Create a repository in GitHub and clone this sample GitHub project into your git repository.
Step 2: Create the CircleCI configuration files
In this example, we use the artifactory-orbs to download the JFrog CLI to perform thee following under the hood:
This is the full config file.:
Here also in the background, we are using the Building Docker Imagescommands via the JFrog CLI.
Step 3: Enable Pipelines
To orbs, we have to enable Pipelines via the UI under Project Settings -> Advanced Settings as follows.
Step 4: Configure the environment variables
Enable your project build in CircleCI by adding the following variables to your build settings:
ARTIFACTORY_URL
ARTIFACTORY_USERNAME
ARTIFACTORY_API_KEY
Step 5: View your build in the JFrog Container Registry
You can now view build in details in the JFrog Container RegistryBuild Browser. Click any build to drill down and view all the build info that the JFrog Container Registry captures.
Great! That’s it. You have successfully completed integrating the JFrog Container Registry in CircelCI done.
Posted on December 11, 2019
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
November 30, 2024