In the previous section, you forked the example project repository in GitHub. Now you will learn how to add that project to CircleCI.

Step 1 — Adding the project to CircleCI

  1. Go to your CircleCI dashboard. If you haven’t signed up at this point, log in with your GitHub credentials
  2. CircleCI Login
  3. On the left-hand side, click the Projects section and you will land here:
  4. CircleCI Projects Dashboard
  5. Click Set Up Project next to the name of your new project
  6. On the New Project Set Up page, select the Skip this step option
  7. Skip Config
  8. Click the Use Existing Config button
  9. Click the Start Building button

Congratulations! You have just triggered your first pipeline build on CircleCI. The example project is using the default config.yml file with the default pipeline definition. The pipeline definition will trigger the first build in your new project. Over the course of this workshop, you will replace the entire contents of this file.

Step 2 — Configure project environment variables

Before you start building your pipeline, you must create project environment variables to provide integration access to the services you previously registered for. All of the access and API tokens you previous generated will be assigned to new project environment variables that will serve as values in your config syntax.

Now you will create new project environment variables in CircleCI using those keys and tokens you previously created.

On your CircleCI dashboard, navigate to Project Settings > Environment Variables in the CircleCI control panel. Add these keys and values in their respective fields:

Value: Your AWS IAM Accounts Access Key ID

Value: Your AWS IAM Accounts Secret Access Key

** Note: Only use during AWS hosted events. Otherwise ignore **

    Value: Your AWS IAM Accounts session token


Value: Your Docker Hub user name

Value: Your Docker Hub Access Token

Value: Your Snyk Access Token

Value: Your Terraform Cloud API Token

After entering all of these environment variables, the environment variables dialog should look something like this.

Add Env Variable

Click the X in the top right corner to return to the pipeline dashboard.

Your project is now set up in CircleCI and you can start building a new pipeline for your project.