This repository is used to check for a proper installation of CircleCI Server. It implements a sample app that validates some basic CircleCI features in parallel workflows.
To install and run reality check on your CircleCI Server installation, follow these steps.
-
Fork this repository to the GitHub environment tied to your server installation. See here for more information.
-
Set up your repository project in your CircleCI Server installation.
-
Generate a personal api token - not a project token, and add it as an environment variable in your project with the name
CIRCLE_TOKEN
. -
Determine the base URL of your install, including protocol, and remove the trailing slash and "app" subdomain if present. Add it as an environment variable in your project with the name
CIRCLE_HOSTNAME
.Note: As an example, if your dashboard is accessible at
https://app.server.example.com/dashboard/
yourCIRCLE_HOSTNAME
ishttps://server.example.com
-
Set the environment variable in your project with the name
CIRCLE_CLOUD_PROVIDER
as eithergcp
,aws
, orother
. depending on your installation. -
You can optionally set
CIRCLE_WINDOWS_EXECUTOR
totrue
in order to run a set of verification jobs for the windows execution environment. This requires a supported CircleCI Windows image, see instructions in CircleCI-Public/circleci-server-windows-image-builder. -
Configure the following contexts and keys (their values can be anything). Docs on how to set up contexts can be found here.
Context Name | Environment Variable Key Name | Value |
---|---|---|
org-global |
CONTEXT_END_TO_END_TEST_VAR |
1 |
individual-local |
MULTI_CONTEXT_END_TO_END_VAR |
1 |
# Project Environment Variables
CIRCLE_TOKEN=123456789-personal-access-token
CIRCLE_HOSTNAME=https://aws-server-install.example.com
CIRCLE_CLOUD_PROVIDER=aws
CIRCLE_WINDOWS_EXECUTOR=true # Optional, only if using a Windowws AMI
# org-global context environment variables
CONTEXT_END_TO_END_TEST_VAR=1
# individual-local context environment variables
MULTI_CONTEXT_END_TO_END_VAR=1
# Project Environment Variables
CIRCLE_TOKEN=123456789-personal-access-token
CIRCLE_HOSTNAME=https://gcp-server-install.example.com
CIRCLE_CLOUD_PROVIDER=gcp
CIRCLE_WINDOWS_EXECUTOR=true # Optional, only if using a Windows AMI
# org-global context environment variables
CONTEXT_END_TO_END_TEST_VAR=1
# individual-local context environment variables
MULTI_CONTEXT_END_TO_END_VAR=1
Once installed, to run reality check, make any commit to the default branch of your forked repository. If installed correctly, your CircleCI Server Installation will pick up the commit and build it in parallel workflows.
git commit --allow-empty -m "Trigger Build, Empty commit" && git push
Descriptions of the three workflows follow.
Tests all known resource_class
options—queries the CircleCI API to verify that jobs ran with the requested resources.
- Your Nomad client instances must be large enough to accommodate these resource classes — see our Configuration Reference for details on the available resource classes and our server docs about sizing your Nomad client instances.
- The base URL of your CircleCI installation (e.g. https://circleci.com) must be specified via a
CIRCLE_HOSTNAME
project environment variable - A personal API token (see
CIRCLE_HOSTNAME/account/api
URL endpoint) must be stored as aCIRCLE_TOKEN
project environment variable
Tests the functionality of the machine
executor, Remote Docker Environment, and Docker Layer Caching.
- Tests ability to save and restore caches
- Tests writing to and reading from workspaces
- Tests the default
org-global
context (NOTE: needs a key calledCONTEXT_END_TO_END_TEST_VAR
to exist in a context calledorg-global
) - Tests multiple contexts (NOTE: needs a key called
MULTI_CONTEXT_END_TO_END_VAR
to exist in a context calledindividual-local
) - Tests upload/storage of artifacts and test results
Tests android machine images on Google Cloud Platform. First checks if the environment is configured for GCP with the CIRCLE_CLOUD_PROVIDER environment variable.
You will need to have your CIRCLE_TOKEN environment variable set to a personal access token, and will need your CIRCLE_CLOUD_PROVIDER set to gcp
in lower-case. You must also have nomad clients configured, and your vm-service configured.
Tests ARM based images on AWS. First checks if the environment is configured for AWS with the CIRCLE_CLOUD_PROVIDER environment variable.
You will need to have your CIRCLE_TOKEN environment variable set to a personal access token, and will need your CIRCLE_CLOUD_PROVIDER set to aws
in lower-case. You must also have nomad clients configured, and your vm-service configured.
If you have more ideas for things that should tested, please submit a PR against the open-source repository on GitHub where this project is maintained: https://github.com/circleci/realitycheck. See the current CI status of the main repo at https://circleci.com/gh/circleci/workflows/realitycheck. View the LICENSE file in this repository for licensing information.