The repo contains a shell script to generate a basic configuration file for CircleCI 2.0
If a project (git repo) is connected to CircleCI and has no circle.yml
(for CircleCI 1.0) or .circleci/config.yml
(for CircleCI 2.0) file, CircleCI will try to build on CircleCI 1.0 using 'inference' (we inspect the files and 'infer' what tests to run).
CircleCI 1.0 will be EOL soon (https://circleci.com/sunset1-0/). So all projects will need a .circleci/config.yml
file to build on 2.0.
This script is helpful if you're building on 1.0 without a config file (you do not have a circle.yml
file at the root of your project). It will help you get started on CircleCI 2.0.
Running this script locally from the root of your project will:
- Create a new Git branch called
circleci-20-test
and check out that branch - Generate a
.circleci/config.yml
file in the new branch - Optionally push a new commit on that branch and build it on CircleCI 2.0
You will need:
- Git and Curl installedon on your local computer
- Project checked out on your local computer
- Push access to your GitHub or Bitbucket repo
- A CircleCI API token (see below)
This script makes use of the CircleCI 'config translation' tool which is documented here: https://circleci.com/docs/2.0/config-translation/
- Download this script https://github.com/CircleCI-Public/circleci-config-generator/blob/master/cci-config-generator.sh
- Make sure the script is in the root of your project
- Make the script executable:
chmod +x cci-config-generator.sh
- Create an API token in the CircleCI UI: https://circleci.com/account/api
- Copy the API token to your clipboard
- Run the script
./cci-config-generator.sh
- Paste in your API token when prompted
- The script will generate the config, and optionally create a branch and kick off a build
Visit your project page on CircleCI https://circleci.com/gh/ORG/REPO
to see the new build that ran on CircleCI 2.0
If your build is green - congratulations you're now using CircleCI 2.0. Read the docs to take advantage of more CircleCI 2.0 features: https://circleci.com/docs/2.0/
It the build is red, you can troubleshoot any error messages using our docs: https://circleci.com/docs/2.0/
If you need more help, please open a support ticket here: https://support.circleci.com/hc/en-us/requests/new