demos icon indicating copy to clipboard operation
demos copied to clipboard

Use CircleCI reusable executors

Open m3ller opened this issue 5 years ago • 0 comments

Application Even when using templates, there is still duplicate code in .circleci/config.yml. For example,

version: 2
..
  test-osx-3.6:                                                                                     
    <<: *osx-tests-template                                                                         
    environment:                                                                                    
      PYTHON: 3.6.5                                                                                 
      HOMEBREW_NO_AUTO_UPDATE: 1                                                                    
      SUM_REQ_FILE: temp_requirements_summary.txt                                                   
      IGNORED_DIRS: envs|tests|circuit-fault-diagnosis|factoring                                    
                                                                                                    
  test-osx-3.5:                                                                                     
    <<: *osx-tests-template                                                                         
    environment:                                                                                    
      PYTHON: 3.5.5                                                                                 
      HOMEBREW_NO_AUTO_UPDATE: 1                                                                    
      SUM_REQ_FILE: temp_requirements_summary.txt                                                   
      IGNORED_DIRS: envs|tests|circuit-fault-diagnosis|factoring                                    
                                                                                                    
  test-osx-2.7:                                                                                     
    <<: *osx-tests-template                                                                         
    environment:                                                                                    
      PYTHON: 2.7.15                                                                                
      HOMEBREW_NO_AUTO_UPDATE: 1                                                                    
      SUM_REQ_FILE: temp_requirements_summary.txt                                                   
      IGNORED_DIRS: envs|tests|circuit-fault-diagnosis|factoring

Proposed Solution Use Reusable Executors, a feature that is available in CircleCI version 2.1. This will involve refactoring config.yml and replacing the existing templates with reusable executors. You may also need to enable Pipelines in order to run version 2.1.

https://circleci.com/docs/2.0/reusing-config/#overriding-keys-when-invoking-an-executor

m3ller avatar Apr 22 '19 22:04 m3ller