tree: 30935df61e4c126f94d7dc746285cfa095d2854b [path history] [tgz]
  1. config-2_1.yml
  2. config-2_1.yml.high_res.patch
  3. config-2_1.yml.mid_res.patch
  4. config.yml
  5. config.yml.HIGHRES
  6. config.yml.LOWRES
  7. config.yml.MIDRES
  8. generate.sh
  9. license.yml
  10. readme.md
.circleci/readme.md

CircleCI config files

This directory contains the configuration for CircleCI continous integration platform. The file config.yml is the configuration file that is read by CircleCI. This file is automatically generated by the generate.sh script from the config-2_1.yml file.

The provided config.yml file uses low resources so users of the CircleCI free tier can use it. Additionally, there are three versions of this file using different resources so users who have access to premium CircleCI resources can use larger instances and more parallelism. These files are config.yml.LOWRES, config.yml.MIDRES and config.yml.HIGHRES. The default config.yml file is just a copy of config.yml.LOWRES.

Switching to higher resource settings

This directory contains generated files for low, middle and high resource settings. Switch between them by copying the correct file to config.yml and committing the result:

cp .circleci/config.yml.HIGHRES .circleci/config.yml

Alternatively, you can run the generate.sh script with the flags -l/-m/-h to regenerate the config.yml file from config-2_1.yml using LOWRES/MIDRES/HIGHRES. This script validates and applies any changes to the config-2_1.yml file, and it requires the CircleCI CLI to be installed.

Setting environment variables

Both config-2_1.yml and config.yml files contain a set of environment variables defining things like what dtest repo and branch to use, what tests could be repeatedly run, etc.

These environment variables can be directly edited in the config.yml file, although if you do this you should take into account that the entire set of env vars is repeated on every job.

A probably better approach is editing them in config-2_1.yml and then regenerate the config.yml file using the generate.sh script. You can also directly pass environment variable values to the generate.sh script with the -e flag. For example, to set the dtest repo and branch with MIDRES config you can run:

generate.sh -m \
  -e DTEST_REPO=https://github.com/adelapena/cassandra-dtest.git \
  -e DTEST_BRANCH=CASSANDRA-8272 

Or you can set the test multiplexer for repeating a specific test with HIGHRES:

generate.sh -h \
  -e REPEATED_UTEST_TARGET=testsome \
  -e REPEATED_UTEST_CLASS=org.apache.cassandra.cql3.ViewTest \
  -e REPEATED_UTEST_METHODS=testCompoundPartitionKey,testStaticTable \
  -e REPEATED_UTEST_COUNT=100

Updating the config

For configuration changes meant to be permanent in the Apache repo you should never edit the config.yml file manually. Instead, you should edit the config-2_1.yml file and then regenerate the config.yml, config.yml.LOWRES, config.yml.MIDRES and config.yml.HIGHRES files by runnining the generate.sh script without any flags. For using this script you need to install the CircleCI CLI.

As for temporal changes done while working in a patch, such as pointing to you dtest repo or running a test repeatedly, you can either directly edit config.yml or edit config-2_1.yml and then regenerate config.yml with the generate.sh script using a -l/-m/-h flag. When this flag is used only the config.yml will be generated.

Please note that any previous swapping or edition of the generated files will be overriden by running generate.sh without arguments, returning config.yml to the default LOWRES. So if you previously swapped your config.yml to MIDRES or HIGHRES you would need to either swap it again or use the -l/-m/-h script flags.

Read below for details how to generate the files manually without the generate.sh script:

  1. make your edits to config-2_1.yml - let it stay at lowres settings
  2. generate a valid LOWRES file: circleci config process config-2_1.yml > config.yml.LOWRES
  3. add the Apache license header to the newly created LOWRES file: cat license.yml config.yml.LOWRES > config.yml.LOWRES.new && mv config.yml.LOWRES.new config.yml.LOWRES
  4. then apply the highres patch to config-2_1.yml; patch -o config-2_1.yml.HIGHRES config-2_1.yml config-2_1.yml.high_res.patch (this creates a new file config-2_1.yml.HIGHRES instead of in-place patching config-2_1.yml) Note that if the patch no longer applies to config-2_1.yml a new patch file is needed, do this by manually making config-2_1.yml high resource and create the patch file based on the diff (don't commit it though).
  5. generate the HIGHRES file: circleci config process config-2_1.yml.HIGHRES > config.yml.HIGHRES
  6. remove the temporary patched HIGHRES file: rm config-2_1.yml.HIGHRES
  7. add the Apache license header to the newly created HIGHRES file: cat license.yml config.yml.HIGHRES > config.yml.HIGHRES.new && mv config.yml.HIGHRES.new config.yml.HIGHRES
  8. repeat the last steps to generate the MIDRES file:
    patch -o config-2_1.yml.MIDRES config-2_1.yml config-2_1.yml.mid_res.patch
    circleci config process config-2_1.yml.MIDRES > config.yml.MIDRES
    rm config-2_1.yml.MIDRES
    cat license.yml config.yml.MIDRES > config.yml.MIDRES.new && mv config.yml.MIDRES.new config.yml.MIDRES