Configure CircleCI

Introduction

In order to call a DuploCloud API from CircleCI, you will need to obtain an API token
The basic steps are:
  1. 1.
    (Recommended) Create a "service account" user in DuploCloud that will own the API token.
  2. 2.
    Give the DuploCloud user access the desired tenant. See adding tenants to a user.
  3. 3.
    Create an API token for that user. See creating API Tokens.
  4. 4.
    Add a CircleCI environment variables in the Context created for the organization to allow CircleCI pipelines to communicate with DuploCloud portal.
Note: A 'service account' user in DuploCloud is just a user whose user name is not an email address, such as github-bot or my-api-user. These users are not able to log in.

Add environment variables in organization context

  1. 1.
    Login to CircleCI portal and Select your organization.
  2. 2.
    Click on Organization Settings in the left hand sidebar.
  3. 3.
    Click on Create Context button and create context by providing name.
  4. 4.
    Click on newly created context and scroll to Environment Variables section.
  5. 5.
    Click on Add Environment Variable button**.**
  6. 6.
    Set Environment variable name as "DUPLO_HOST" and value as DuploCloud portal and click on Add Environment Variable button.
  7. 7.
    Repeat step 6 for variable name as "DUPLO_TOKEN" and value as token created for above service account.
  8. 8.
    After adding the environment variables you should be able to see the those in Organization Settings section as bellow.
The rest of this documentation will assume that you have added above two environment variables.
Export as PDF
Copy link
Edit on GitHub
On this page
Introduction
Add environment variables in organization context