Uploaded image for project: 'Apache Cassandra'
  1. Apache Cassandra
  2. CASSANDRA-16871

Add resource flags to CircleCi config generation script

    XMLWordPrintableJSON

Details

    • Quality Assurance
    • Low Hanging Fruit
    • All
    • None
    • Hide

      Testing should be done manually by running the modified script. The patch includes changes in the documentation for CircleCI.

      Show
      Testing should be done manually by running the modified script. The patch includes changes in the documentation for CircleCI.

    Description

      Currently we have three versions of the CircleCI config file using different resources. Changing the resources configuration is as easy as copying the desired template file, for example:

      cp .circleci/config.yml.MIDRES .circleci/config.yml
      

      If we want to make changes to the file, for example to set a specific dtest repo or running the test multiplexer, we can run the provided generation script, copy the template file and probably exclude the additional changes:

      # edit config-2_1.yml
      .circleci/generate.sh
      cp .circleci/config.yml.MIDRES .circleci/config.yml
      # undo the changes in config.yml.LOWRES, config.yml.MIDRES and config.yml.HIGHRES
      

      A very common alternative to this is just editing the environment variables in the automatically generated config.yml file, which are repeated some 19 times across the file:

      cp .circleci/config.yml.MIDRES .circleci/config.yml
      # edit config.yml, where env vars are repeated
      

      I think we could do this slightly easier by adding a set of flags to the generation script to apply the resources patch directly to config.yml, without changing the templates:

      # edit config-2_1.yml
      .circleci/generate.sh -m
      

      This has the advantage of not requiring manually editing the automatically generated file and also providing some validation.

      Attachments

        Issue Links

          Activity

            People

              adelapena Andres de la Peña
              adelapena Andres de la Peña
              Andres de la Peña
              Ekaterina Dimitrova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m