Connect your CircleCI Pipeline to Humanitec with an Orb
Here is a short video explaining how to connect your CircleCI Pipeline and Humanitec.
The Humanitec Orb
Humanitec is providing a CircleCI Orb Humanitec that is available from the CircleCI Orb Registry. Using this CircleCI Orb allows for a simple and convenient integration between CircleCI and Hunmanitec.
Create a new pipeline
If you do not have a CircleCI Pipeline set up, you will need to create one.
- Go to the Git Repository you want to connect.
- Create a new folder called
- Create a new file called
- The new file look like this, where
YOUR-HUMANITEC-ORGANIZATIONis the name of your organization in Humanitec:
# Use the latest 2.1 version of CircleCI pipeline process engine. See: https://circleci.com/docs/2.0/configuration-reference version: 2.1 # Use a package of configuration called an orb. orbs: humanitec: humanitec/[email protected] # Orchestrate or schedule a set of jobs workflows: build-push-and-notify-humanitec: jobs: - humanitec/build-push-and-notify-humanitec: organization: YOUR-HUMANITEC-ORGANIZATION
Note that you will need to commit this file to your Git repository and establish a connection between the repository and your CircleCI account. Follow the explanations in the CircleCI app to create the connection. You will need to have third-party orbs support enabled in your Organization Settings in CircleCI.
Add token to the CircleCI project
In order to finalize the connection between CircleCI and Humanitec, you will need to add a token to the CircleCI project. This requires the following steps:
- Log in to Humanitec.
- Click the profile icon in the top right.
- Select Organization Settings.
- Select the Images tab.
- Click the CircleCI button.
From there, Humanitec will provide you with an access token for connecting to Humanitec’s registry. Instructions will appear in the modal.
First, add the token as an Environment Variable in your CircleCI project:
- Go to the project you want to connect.
- Go to Project Settings, and then go to Environment Variables > Add Variable.
- Create a variable called
HUMANITEC_TOKEN, and paste the token from the modal as the value.
Then, add the snippet from the modal to the end of your
config.yml file and commit the changes.
The last step is trigger a build of your image. If the build is successful, then your image will become available on Humanitec as a module that can be added to your environments.