CI Config File

By default, it is located at .idf_ci.toml in the root of the project.

Default Settings

component_mapping_regexes = [
    "/components/(.+)/",
    "/common_components/(.+)/",
]

component_ignored_file_extensions = [
    ".md",
    ".rst",
    ".yaml",
    ".yml",
    ".py",
]

built_app_list_filepatterns = [
    "app_info_*.txt",   # collect_app_info_filename
]

Configuration Options

The following sections describe all configuration options available in the CI config file.

pydantic settings idf_ci.settings.CiSettings

Show JSON schema
{
   "title": "CiSettings",
   "type": "object",
   "properties": {
      "component_mapping_regexes": {
         "default": [
            "/components/(.+)/",
            "/common_components/(.+)/"
         ],
         "items": {
            "type": "string"
         },
         "title": "Component Mapping Regexes",
         "type": "array"
      },
      "extend_component_mapping_regexes": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Extend Component Mapping Regexes",
         "type": "array"
      },
      "component_ignored_file_extensions": {
         "default": [
            ".md",
            ".rst",
            ".yaml",
            ".yml",
            ".py"
         ],
         "items": {
            "type": "string"
         },
         "title": "Component Ignored File Extensions",
         "type": "array"
      },
      "extend_component_ignored_file_extensions": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Extend Component Ignored File Extensions",
         "type": "array"
      },
      "built_app_list_filepatterns": {
         "default": [
            "app_info_*.txt"
         ],
         "items": {
            "type": "string"
         },
         "title": "Built App List Filepatterns",
         "type": "array"
      },
      "collected_test_related_apps_filepath": {
         "default": "test_related_apps.txt",
         "title": "Collected Test Related Apps Filepath",
         "type": "string"
      },
      "collected_non_test_related_apps_filepath": {
         "default": "non_test_related_apps.txt",
         "title": "Collected Non Test Related Apps Filepath",
         "type": "string"
      },
      "preserve_test_related_apps": {
         "default": true,
         "title": "Preserve Test Related Apps",
         "type": "boolean"
      },
      "preserve_non_test_related_apps": {
         "default": true,
         "title": "Preserve Non Test Related Apps",
         "type": "boolean"
      },
      "extra_default_build_targets": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Extra Default Build Targets",
         "type": "array"
      },
      "ci_detection_envs": {
         "default": [
            "CI",
            "GITHUB_ACTIONS",
            "CIRCLECI",
            "TRAVIS",
            "JENKINS_URL",
            "DRONE",
            "APPVEYOR",
            "BITBUCKET_COMMIT",
            "SEMAPHORE",
            "TEAMCITY_VERSION"
         ],
         "items": {
            "type": "string"
         },
         "title": "Ci Detection Envs",
         "type": "array"
      },
      "local_runtime_envs": {
         "additionalProperties": true,
         "default": {},
         "title": "Local Runtime Envs",
         "type": "object"
      },
      "ci_runtime_envs": {
         "additionalProperties": true,
         "default": {},
         "title": "Ci Runtime Envs",
         "type": "object"
      },
      "gitlab": {
         "$ref": "#/$defs/GitlabSettings",
         "default": {
            "project": "espressif/esp-idf",
            "known_failure_cases_bucket_name": "ignore-test-result-files",
            "artifacts": {
               "build_job_filepatterns": [
                  "app_info_*.txt",
                  "build_summary_*.xml"
               ],
               "s3": {
                  "debug": {
                     "bucket": "idf-artifacts",
                     "patterns": [
                        "**/build*/bootloader/*.map",
                        "**/build*/bootloader/*.elf",
                        "**/build*/*.map",
                        "**/build*/*.elf",
                        "**/build*/build.log"
                     ]
                  },
                  "flash": {
                     "bucket": "idf-artifacts",
                     "patterns": [
                        "**/build*/bootloader/*.bin",
                        "**/build*/*.bin",
                        "**/build*/partition_table/*.bin",
                        "**/build*/flasher_args.json",
                        "**/build*/flash_project_args",
                        "**/build*/config/sdkconfig.json",
                        "**/build*/sdkconfig",
                        "**/build*/project_description.json"
                     ]
                  }
               },
               "test_job_filepatterns": [
                  "pytest-embedded/",
                  "XUNIT_RESULT*.xml"
               ]
            },
            "build_pipeline": {
               "job_tags": [
                  "build"
               ],
               "job_template_jinja": "{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}",
               "job_template_name": ".default_build_settings",
               "jobs_jinja": "{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: \"1\"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: \"1\"\n{%- endif %}",
               "pre_yaml_jinja": "",
               "presigned_json_job_name": "generate_presigned_json",
               "runs_per_job": 60,
               "workflow_name": "Build Child Pipeline",
               "yaml_filename": "build_child_pipeline.yml",
               "yaml_jinja": "{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}"
            },
            "test_pipeline": {
               "job_tags": [],
               "job_template_jinja": "{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: \"\"\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}",
               "job_template_name": ".default_test_settings",
               "jobs_jinja": "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}",
               "pre_yaml_jinja": "",
               "presigned_json_job_name": "generate_presigned_json",
               "runs_per_job": 30,
               "workflow_name": "Test Child Pipeline",
               "yaml_filename": "test_child_pipeline.yml",
               "yaml_jinja": "{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}"
            }
         }
      }
   },
   "$defs": {
      "ArtifactSettings": {
         "additionalProperties": false,
         "properties": {
            "s3": {
               "additionalProperties": {
                  "$ref": "#/$defs/S3FilePatternConfig"
               },
               "default": {
                  "debug": {
                     "bucket": "idf-artifacts",
                     "patterns": [
                        "**/build*/bootloader/*.map",
                        "**/build*/bootloader/*.elf",
                        "**/build*/*.map",
                        "**/build*/*.elf",
                        "**/build*/build.log"
                     ]
                  },
                  "flash": {
                     "bucket": "idf-artifacts",
                     "patterns": [
                        "**/build*/bootloader/*.bin",
                        "**/build*/*.bin",
                        "**/build*/partition_table/*.bin",
                        "**/build*/flasher_args.json",
                        "**/build*/flash_project_args",
                        "**/build*/config/sdkconfig.json",
                        "**/build*/sdkconfig",
                        "**/build*/project_description.json"
                     ]
                  }
               },
               "title": "S3",
               "type": "object"
            },
            "build_job_filepatterns": {
               "default": [
                  "app_info_*.txt",
                  "build_summary_*.xml"
               ],
               "items": {
                  "type": "string"
               },
               "title": "Build Job Filepatterns",
               "type": "array"
            },
            "test_job_filepatterns": {
               "default": [
                  "pytest-embedded/",
                  "XUNIT_RESULT*.xml"
               ],
               "items": {
                  "type": "string"
               },
               "title": "Test Job Filepatterns",
               "type": "array"
            }
         },
         "title": "ArtifactSettings",
         "type": "object"
      },
      "BuildPipelineSettings": {
         "additionalProperties": false,
         "properties": {
            "workflow_name": {
               "default": "Build Child Pipeline",
               "title": "Workflow Name",
               "type": "string"
            },
            "presigned_json_job_name": {
               "default": "generate_presigned_json",
               "title": "Presigned Json Job Name",
               "type": "string"
            },
            "job_template_name": {
               "default": ".default_build_settings",
               "title": "Job Template Name",
               "type": "string"
            },
            "job_template_jinja": {
               "default": "{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}",
               "title": "Job Template Jinja",
               "type": "string"
            },
            "job_tags": {
               "default": [
                  "build"
               ],
               "items": {
                  "type": "string"
               },
               "title": "Job Tags",
               "type": "array"
            },
            "runs_per_job": {
               "default": 60,
               "title": "Runs Per Job",
               "type": "integer"
            },
            "jobs_jinja": {
               "default": "{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: \"1\"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: \"1\"\n{%- endif %}",
               "title": "Jobs Jinja",
               "type": "string"
            },
            "pre_yaml_jinja": {
               "default": "",
               "title": "Pre Yaml Jinja",
               "type": "string"
            },
            "yaml_jinja": {
               "default": "{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}",
               "title": "Yaml Jinja",
               "type": "string"
            },
            "yaml_filename": {
               "default": "build_child_pipeline.yml",
               "title": "Yaml Filename",
               "type": "string"
            }
         },
         "title": "BuildPipelineSettings",
         "type": "object"
      },
      "GitlabSettings": {
         "additionalProperties": false,
         "properties": {
            "project": {
               "default": "espressif/esp-idf",
               "title": "Project",
               "type": "string"
            },
            "known_failure_cases_bucket_name": {
               "default": "ignore-test-result-files",
               "title": "Known Failure Cases Bucket Name",
               "type": "string"
            },
            "artifacts": {
               "$ref": "#/$defs/ArtifactSettings",
               "default": {
                  "s3": {
                     "debug": {
                        "bucket": "idf-artifacts",
                        "patterns": [
                           "**/build*/bootloader/*.map",
                           "**/build*/bootloader/*.elf",
                           "**/build*/*.map",
                           "**/build*/*.elf",
                           "**/build*/build.log"
                        ]
                     },
                     "flash": {
                        "bucket": "idf-artifacts",
                        "patterns": [
                           "**/build*/bootloader/*.bin",
                           "**/build*/*.bin",
                           "**/build*/partition_table/*.bin",
                           "**/build*/flasher_args.json",
                           "**/build*/flash_project_args",
                           "**/build*/config/sdkconfig.json",
                           "**/build*/sdkconfig",
                           "**/build*/project_description.json"
                        ]
                     }
                  },
                  "build_job_filepatterns": [
                     "app_info_*.txt",
                     "build_summary_*.xml"
                  ],
                  "test_job_filepatterns": [
                     "pytest-embedded/",
                     "XUNIT_RESULT*.xml"
                  ]
               }
            },
            "build_pipeline": {
               "$ref": "#/$defs/BuildPipelineSettings",
               "default": {
                  "workflow_name": "Build Child Pipeline",
                  "presigned_json_job_name": "generate_presigned_json",
                  "job_template_name": ".default_build_settings",
                  "job_template_jinja": "{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}",
                  "job_tags": [
                     "build"
                  ],
                  "runs_per_job": 60,
                  "jobs_jinja": "{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: \"1\"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: \"1\"\n{%- endif %}",
                  "pre_yaml_jinja": "",
                  "yaml_jinja": "{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}",
                  "yaml_filename": "build_child_pipeline.yml"
               }
            },
            "test_pipeline": {
               "$ref": "#/$defs/TestPipelineSettings",
               "default": {
                  "workflow_name": "Test Child Pipeline",
                  "presigned_json_job_name": "generate_presigned_json",
                  "job_template_name": ".default_test_settings",
                  "job_template_jinja": "{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: \"\"\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}",
                  "job_tags": [],
                  "runs_per_job": 30,
                  "jobs_jinja": "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}",
                  "pre_yaml_jinja": "",
                  "yaml_jinja": "{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}",
                  "yaml_filename": "test_child_pipeline.yml"
               }
            }
         },
         "title": "GitlabSettings",
         "type": "object"
      },
      "S3FilePatternConfig": {
         "properties": {
            "bucket": {
               "title": "Bucket",
               "type": "string"
            },
            "patterns": {
               "items": {
                  "type": "string"
               },
               "title": "Patterns",
               "type": "array"
            },
            "if_clause": {
               "title": "If Clause",
               "type": "string"
            }
         },
         "required": [
            "bucket",
            "patterns"
         ],
         "title": "S3FilePatternConfig",
         "type": "object"
      },
      "TestPipelineSettings": {
         "additionalProperties": false,
         "properties": {
            "workflow_name": {
               "default": "Test Child Pipeline",
               "title": "Workflow Name",
               "type": "string"
            },
            "presigned_json_job_name": {
               "default": "generate_presigned_json",
               "title": "Presigned Json Job Name",
               "type": "string"
            },
            "job_template_name": {
               "default": ".default_test_settings",
               "title": "Job Template Name",
               "type": "string"
            },
            "job_template_jinja": {
               "default": "{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: \"\"\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}",
               "title": "Job Template Jinja",
               "type": "string"
            },
            "job_tags": {
               "default": [],
               "items": {
                  "type": "string"
               },
               "title": "Job Tags",
               "type": "array"
            },
            "runs_per_job": {
               "default": 30,
               "title": "Runs Per Job",
               "type": "integer"
            },
            "jobs_jinja": {
               "default": "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}",
               "title": "Jobs Jinja",
               "type": "string"
            },
            "pre_yaml_jinja": {
               "default": "",
               "title": "Pre Yaml Jinja",
               "type": "string"
            },
            "yaml_jinja": {
               "default": "{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}",
               "title": "Yaml Jinja",
               "type": "string"
            },
            "yaml_filename": {
               "default": "test_child_pipeline.yml",
               "title": "Yaml Filename",
               "type": "string"
            }
         },
         "title": "TestPipelineSettings",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Fields:
field built_app_list_filepatterns: List[str] = ['app_info_*.txt']

Glob patterns for files containing built app information.

field ci_detection_envs: List[str] = ['CI', 'GITHUB_ACTIONS', 'CIRCLECI', 'TRAVIS', 'JENKINS_URL', 'DRONE', 'APPVEYOR', 'BITBUCKET_COMMIT', 'SEMAPHORE', 'TEAMCITY_VERSION']

Environment variables used to detect if running in CI.

field ci_runtime_envs: Dict[str, Any] = {}

Environment variables to set in CI environment.

Path to file containing non-test-related apps.

Path to file containing test-related apps.

field component_ignored_file_extensions: List[str] = ['.md', '.rst', '.yaml', '.yml', '.py']

File extensions to ignore when mapping files to components.

field component_mapping_regexes: List[str] = ['/components/(.+)/', '/common_components/(.+)/']

List of regex patterns to extract component names from file paths.

field extend_component_ignored_file_extensions: List[str] = []

Additional file extensions to ignore.

field extend_component_mapping_regexes: List[str] = []

Additional component mapping regex patterns to extend the default list.

field extra_default_build_targets: List[str] = []

Additional build targets to include by default.

field gitlab: GitlabSettings = GitlabSettings(project='espressif/esp-idf', known_failure_cases_bucket_name='ignore-test-result-files', artifacts=ArtifactSettings(s3={'debug': {'bucket': 'idf-artifacts', 'patterns': ['**/build*/bootloader/*.map', '**/build*/bootloader/*.elf', '**/build*/*.map', '**/build*/*.elf', '**/build*/build.log']}, 'flash': {'bucket': 'idf-artifacts', 'patterns': ['**/build*/bootloader/*.bin', '**/build*/*.bin', '**/build*/partition_table/*.bin', '**/build*/flasher_args.json', '**/build*/flash_project_args', '**/build*/config/sdkconfig.json', '**/build*/sdkconfig', '**/build*/project_description.json']}}, build_job_filepatterns=['app_info_*.txt', 'build_summary_*.xml'], test_job_filepatterns=['pytest-embedded/', 'XUNIT_RESULT*.xml']), build_pipeline=BuildPipelineSettings(workflow_name='Build Child Pipeline', presigned_json_job_name='generate_presigned_json', job_template_name='.default_build_settings', job_template_jinja='{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}', job_tags=['build'], runs_per_job=60, jobs_jinja='{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: "1"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: "1"\n{%- endif %}', pre_yaml_jinja='', yaml_jinja='{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}', yaml_filename='build_child_pipeline.yml'), test_pipeline=TestPipelineSettings(workflow_name='Test Child Pipeline', presigned_json_job_name='generate_presigned_json', job_template_name='.default_test_settings', job_template_jinja='{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: ""\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}', job_tags=[], runs_per_job=30, jobs_jinja="{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}", pre_yaml_jinja='', yaml_jinja='{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}', yaml_filename='test_child_pipeline.yml'))

GitLab-specific settings.

field local_runtime_envs: Dict[str, Any] = {}

Environment variables to set in local development.

Whether to preserve non-test-related apps.

Whether to preserve test-related apps.

classmethod read_apps_from_filepatterns(patterns: List[str]) List[App] | None

Helper method to read apps from files matching given patterns.

Parameters:

patterns – List of file patterns to search for

Returns:

List of App objects read from the files, or None if no files found

classmethod read_apps_from_files(filepaths: Sequence[str | PathLike]) List[App] | None

Helper method to read apps from files.

Parameters:

filepaths – List of file paths to read

Returns:

List of App objects read from the files, or None if no files found

get_built_apps_list() List[App] | None

Get the list of successfully built applications from the app info files.

Returns:

List of App objects representing successfully built applications, or None if no files found

get_modified_components(modified_files: Iterable[str]) Set[str]

Get the set of components that have been modified based on the provided files.

Parameters:

modified_files – Iterable of file paths that have been modified

Returns:

Set of component names that have been modified

model_post_init(_CiSettings__context: Any) None

Override this method to perform additional initialization after __init__ and model_construct. This is useful if you want to do some validation that requires the entire model to be initialized.

CONFIG_FILE_PATH: ClassVar[Path | None] = None

Path to the configuration file to be used (class variable).

property all_component_mapping_regexes: Set[Pattern]

Get all component mapping regexes as compiled pattern objects.

Returns:

Set of compiled regex patterns

property is_in_ci: bool

Check if the code is running in a CI environment.

Returns:

True if in CI environment, False otherwise

pydantic settings idf_ci.settings.GitlabSettings

Show JSON schema
{
   "title": "GitlabSettings",
   "type": "object",
   "properties": {
      "project": {
         "default": "espressif/esp-idf",
         "title": "Project",
         "type": "string"
      },
      "known_failure_cases_bucket_name": {
         "default": "ignore-test-result-files",
         "title": "Known Failure Cases Bucket Name",
         "type": "string"
      },
      "artifacts": {
         "$ref": "#/$defs/ArtifactSettings",
         "default": {
            "s3": {
               "debug": {
                  "bucket": "idf-artifacts",
                  "patterns": [
                     "**/build*/bootloader/*.map",
                     "**/build*/bootloader/*.elf",
                     "**/build*/*.map",
                     "**/build*/*.elf",
                     "**/build*/build.log"
                  ]
               },
               "flash": {
                  "bucket": "idf-artifacts",
                  "patterns": [
                     "**/build*/bootloader/*.bin",
                     "**/build*/*.bin",
                     "**/build*/partition_table/*.bin",
                     "**/build*/flasher_args.json",
                     "**/build*/flash_project_args",
                     "**/build*/config/sdkconfig.json",
                     "**/build*/sdkconfig",
                     "**/build*/project_description.json"
                  ]
               }
            },
            "build_job_filepatterns": [
               "app_info_*.txt",
               "build_summary_*.xml"
            ],
            "test_job_filepatterns": [
               "pytest-embedded/",
               "XUNIT_RESULT*.xml"
            ]
         }
      },
      "build_pipeline": {
         "$ref": "#/$defs/BuildPipelineSettings",
         "default": {
            "workflow_name": "Build Child Pipeline",
            "presigned_json_job_name": "generate_presigned_json",
            "job_template_name": ".default_build_settings",
            "job_template_jinja": "{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}",
            "job_tags": [
               "build"
            ],
            "runs_per_job": 60,
            "jobs_jinja": "{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: \"1\"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: \"1\"\n{%- endif %}",
            "pre_yaml_jinja": "",
            "yaml_jinja": "{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}",
            "yaml_filename": "build_child_pipeline.yml"
         }
      },
      "test_pipeline": {
         "$ref": "#/$defs/TestPipelineSettings",
         "default": {
            "workflow_name": "Test Child Pipeline",
            "presigned_json_job_name": "generate_presigned_json",
            "job_template_name": ".default_test_settings",
            "job_template_jinja": "{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: \"\"\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}",
            "job_tags": [],
            "runs_per_job": 30,
            "jobs_jinja": "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}",
            "pre_yaml_jinja": "",
            "yaml_jinja": "{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}",
            "yaml_filename": "test_child_pipeline.yml"
         }
      }
   },
   "$defs": {
      "ArtifactSettings": {
         "additionalProperties": false,
         "properties": {
            "s3": {
               "additionalProperties": {
                  "$ref": "#/$defs/S3FilePatternConfig"
               },
               "default": {
                  "debug": {
                     "bucket": "idf-artifacts",
                     "patterns": [
                        "**/build*/bootloader/*.map",
                        "**/build*/bootloader/*.elf",
                        "**/build*/*.map",
                        "**/build*/*.elf",
                        "**/build*/build.log"
                     ]
                  },
                  "flash": {
                     "bucket": "idf-artifacts",
                     "patterns": [
                        "**/build*/bootloader/*.bin",
                        "**/build*/*.bin",
                        "**/build*/partition_table/*.bin",
                        "**/build*/flasher_args.json",
                        "**/build*/flash_project_args",
                        "**/build*/config/sdkconfig.json",
                        "**/build*/sdkconfig",
                        "**/build*/project_description.json"
                     ]
                  }
               },
               "title": "S3",
               "type": "object"
            },
            "build_job_filepatterns": {
               "default": [
                  "app_info_*.txt",
                  "build_summary_*.xml"
               ],
               "items": {
                  "type": "string"
               },
               "title": "Build Job Filepatterns",
               "type": "array"
            },
            "test_job_filepatterns": {
               "default": [
                  "pytest-embedded/",
                  "XUNIT_RESULT*.xml"
               ],
               "items": {
                  "type": "string"
               },
               "title": "Test Job Filepatterns",
               "type": "array"
            }
         },
         "title": "ArtifactSettings",
         "type": "object"
      },
      "BuildPipelineSettings": {
         "additionalProperties": false,
         "properties": {
            "workflow_name": {
               "default": "Build Child Pipeline",
               "title": "Workflow Name",
               "type": "string"
            },
            "presigned_json_job_name": {
               "default": "generate_presigned_json",
               "title": "Presigned Json Job Name",
               "type": "string"
            },
            "job_template_name": {
               "default": ".default_build_settings",
               "title": "Job Template Name",
               "type": "string"
            },
            "job_template_jinja": {
               "default": "{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}",
               "title": "Job Template Jinja",
               "type": "string"
            },
            "job_tags": {
               "default": [
                  "build"
               ],
               "items": {
                  "type": "string"
               },
               "title": "Job Tags",
               "type": "array"
            },
            "runs_per_job": {
               "default": 60,
               "title": "Runs Per Job",
               "type": "integer"
            },
            "jobs_jinja": {
               "default": "{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: \"1\"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: \"1\"\n{%- endif %}",
               "title": "Jobs Jinja",
               "type": "string"
            },
            "pre_yaml_jinja": {
               "default": "",
               "title": "Pre Yaml Jinja",
               "type": "string"
            },
            "yaml_jinja": {
               "default": "{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}",
               "title": "Yaml Jinja",
               "type": "string"
            },
            "yaml_filename": {
               "default": "build_child_pipeline.yml",
               "title": "Yaml Filename",
               "type": "string"
            }
         },
         "title": "BuildPipelineSettings",
         "type": "object"
      },
      "S3FilePatternConfig": {
         "properties": {
            "bucket": {
               "title": "Bucket",
               "type": "string"
            },
            "patterns": {
               "items": {
                  "type": "string"
               },
               "title": "Patterns",
               "type": "array"
            },
            "if_clause": {
               "title": "If Clause",
               "type": "string"
            }
         },
         "required": [
            "bucket",
            "patterns"
         ],
         "title": "S3FilePatternConfig",
         "type": "object"
      },
      "TestPipelineSettings": {
         "additionalProperties": false,
         "properties": {
            "workflow_name": {
               "default": "Test Child Pipeline",
               "title": "Workflow Name",
               "type": "string"
            },
            "presigned_json_job_name": {
               "default": "generate_presigned_json",
               "title": "Presigned Json Job Name",
               "type": "string"
            },
            "job_template_name": {
               "default": ".default_test_settings",
               "title": "Job Template Name",
               "type": "string"
            },
            "job_template_jinja": {
               "default": "{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: \"\"\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}",
               "title": "Job Template Jinja",
               "type": "string"
            },
            "job_tags": {
               "default": [],
               "items": {
                  "type": "string"
               },
               "title": "Job Tags",
               "type": "array"
            },
            "runs_per_job": {
               "default": 30,
               "title": "Runs Per Job",
               "type": "integer"
            },
            "jobs_jinja": {
               "default": "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}",
               "title": "Jobs Jinja",
               "type": "string"
            },
            "pre_yaml_jinja": {
               "default": "",
               "title": "Pre Yaml Jinja",
               "type": "string"
            },
            "yaml_jinja": {
               "default": "{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}",
               "title": "Yaml Jinja",
               "type": "string"
            },
            "yaml_filename": {
               "default": "test_child_pipeline.yml",
               "title": "Yaml Filename",
               "type": "string"
            }
         },
         "title": "TestPipelineSettings",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Fields:
field artifacts: ArtifactSettings = ArtifactSettings(s3={'debug': {'bucket': 'idf-artifacts', 'patterns': ['**/build*/bootloader/*.map', '**/build*/bootloader/*.elf', '**/build*/*.map', '**/build*/*.elf', '**/build*/build.log']}, 'flash': {'bucket': 'idf-artifacts', 'patterns': ['**/build*/bootloader/*.bin', '**/build*/*.bin', '**/build*/partition_table/*.bin', '**/build*/flasher_args.json', '**/build*/flash_project_args', '**/build*/config/sdkconfig.json', '**/build*/sdkconfig', '**/build*/project_description.json']}}, build_job_filepatterns=['app_info_*.txt', 'build_summary_*.xml'], test_job_filepatterns=['pytest-embedded/', 'XUNIT_RESULT*.xml'])
field build_pipeline: BuildPipelineSettings = BuildPipelineSettings(workflow_name='Build Child Pipeline', presigned_json_job_name='generate_presigned_json', job_template_name='.default_build_settings', job_template_jinja='{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}', job_tags=['build'], runs_per_job=60, jobs_jinja='{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: "1"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: "1"\n{%- endif %}', pre_yaml_jinja='', yaml_jinja='{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}', yaml_filename='build_child_pipeline.yml')
field known_failure_cases_bucket_name: str = 'ignore-test-result-files'

Bucket name for storing known failure cases.

field project: str = 'espressif/esp-idf'

GitLab project path in the format ‘owner/repo’.

field test_pipeline: TestPipelineSettings = TestPipelineSettings(workflow_name='Test Child Pipeline', presigned_json_job_name='generate_presigned_json', job_template_name='.default_test_settings', job_template_jinja='{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: ""\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}', job_tags=[], runs_per_job=30, jobs_jinja="{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}", pre_yaml_jinja='', yaml_jinja='{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}', yaml_filename='test_child_pipeline.yml')
pydantic settings idf_ci.settings.ArtifactSettings

Show JSON schema
{
   "title": "ArtifactSettings",
   "type": "object",
   "properties": {
      "s3": {
         "additionalProperties": {
            "$ref": "#/$defs/S3FilePatternConfig"
         },
         "default": {
            "debug": {
               "bucket": "idf-artifacts",
               "patterns": [
                  "**/build*/bootloader/*.map",
                  "**/build*/bootloader/*.elf",
                  "**/build*/*.map",
                  "**/build*/*.elf",
                  "**/build*/build.log"
               ]
            },
            "flash": {
               "bucket": "idf-artifacts",
               "patterns": [
                  "**/build*/bootloader/*.bin",
                  "**/build*/*.bin",
                  "**/build*/partition_table/*.bin",
                  "**/build*/flasher_args.json",
                  "**/build*/flash_project_args",
                  "**/build*/config/sdkconfig.json",
                  "**/build*/sdkconfig",
                  "**/build*/project_description.json"
               ]
            }
         },
         "title": "S3",
         "type": "object"
      },
      "build_job_filepatterns": {
         "default": [
            "app_info_*.txt",
            "build_summary_*.xml"
         ],
         "items": {
            "type": "string"
         },
         "title": "Build Job Filepatterns",
         "type": "array"
      },
      "test_job_filepatterns": {
         "default": [
            "pytest-embedded/",
            "XUNIT_RESULT*.xml"
         ],
         "items": {
            "type": "string"
         },
         "title": "Test Job Filepatterns",
         "type": "array"
      }
   },
   "$defs": {
      "S3FilePatternConfig": {
         "properties": {
            "bucket": {
               "title": "Bucket",
               "type": "string"
            },
            "patterns": {
               "items": {
                  "type": "string"
               },
               "title": "Patterns",
               "type": "array"
            },
            "if_clause": {
               "title": "If Clause",
               "type": "string"
            }
         },
         "required": [
            "bucket",
            "patterns"
         ],
         "title": "S3FilePatternConfig",
         "type": "object"
      }
   },
   "additionalProperties": false
}

Fields:
field build_job_filepatterns: List[str] = ['app_info_*.txt', 'build_summary_*.xml']

List of glob patterns for CI build jobs artifacts to collect.

field s3: Dict[str, S3FilePatternConfig] = {'debug': {'bucket': 'idf-artifacts', 'patterns': ['**/build*/bootloader/*.map', '**/build*/bootloader/*.elf', '**/build*/*.map', '**/build*/*.elf', '**/build*/build.log']}, 'flash': {'bucket': 'idf-artifacts', 'patterns': ['**/build*/bootloader/*.bin', '**/build*/*.bin', '**/build*/partition_table/*.bin', '**/build*/flasher_args.json', '**/build*/flash_project_args', '**/build*/config/sdkconfig.json', '**/build*/sdkconfig', '**/build*/project_description.json']}}

Dictionary mapping artifact types to their bucket and file patterns.

field test_job_filepatterns: List[str] = ['pytest-embedded/', 'XUNIT_RESULT*.xml']

List of glob patterns for CI test jobs artifacts to collect.

property available_s3_types: List[str]

Get list of available S3 artifact types.

Returns:

List of artifact type names

pydantic settings idf_ci.settings.BuildPipelineSettings

Show JSON schema
{
   "title": "BuildPipelineSettings",
   "type": "object",
   "properties": {
      "workflow_name": {
         "default": "Build Child Pipeline",
         "title": "Workflow Name",
         "type": "string"
      },
      "presigned_json_job_name": {
         "default": "generate_presigned_json",
         "title": "Presigned Json Job Name",
         "type": "string"
      },
      "job_template_name": {
         "default": ".default_build_settings",
         "title": "Job Template Name",
         "type": "string"
      },
      "job_template_jinja": {
         "default": "{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}",
         "title": "Job Template Jinja",
         "type": "string"
      },
      "job_tags": {
         "default": [
            "build"
         ],
         "items": {
            "type": "string"
         },
         "title": "Job Tags",
         "type": "array"
      },
      "runs_per_job": {
         "default": 60,
         "title": "Runs Per Job",
         "type": "integer"
      },
      "jobs_jinja": {
         "default": "{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: \"1\"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: \"1\"\n{%- endif %}",
         "title": "Jobs Jinja",
         "type": "string"
      },
      "pre_yaml_jinja": {
         "default": "",
         "title": "Pre Yaml Jinja",
         "type": "string"
      },
      "yaml_jinja": {
         "default": "{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}",
         "title": "Yaml Jinja",
         "type": "string"
      },
      "yaml_filename": {
         "default": "build_child_pipeline.yml",
         "title": "Yaml Filename",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Fields:
field job_tags: List[str] = ['build']

List of tags for CI build jobs.

field job_template_jinja: str = '{{ settings.gitlab.build_pipeline.job_template_name }}:\n  stage: build\n  tags: {{ settings.gitlab.build_pipeline.job_tags }}\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.build_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  script:\n    - idf-ci build run\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}'

Default template for CI build jobs.

field job_template_name: str = '.default_build_settings'

Default template name for CI build jobs.

field jobs_jinja: str = '{%- if test_related_apps_count > 0 %}\nbuild_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if test_related_parallel_count > 1 %}\n  parallel: {{ test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_TEST_RELATED_APPS: "1"\n{%- endif %}\n\n{%- if non_test_related_apps_count > 0 %}\nbuild_non_test_related_apps:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n{%- if non_test_related_parallel_count > 1 %}\n  parallel: {{ non_test_related_parallel_count }}\n{%- endif %}\n  needs:\n    - pipeline: $PARENT_PIPELINE_ID\n      job: generate_build_child_pipeline\n    - pipeline: $PARENT_PIPELINE_ID\n      job: pipeline_variables\n  variables:\n    IDF_CI_BUILD_ONLY_NON_TEST_RELATED_APPS: "1"\n{%- endif %}'

Jinja2 template for build jobs configuration.

field pre_yaml_jinja: str = ''

yaml content to be injected before the yaml template.

field presigned_json_job_name: str = 'generate_presigned_json'

Name of the job within the child pipeline that creates the presigned.json file.

field runs_per_job: int = 60

Maximum number of apps to build in a single job.

field workflow_name: str = 'Build Child Pipeline'

Name for the GitLab CI workflow.

field yaml_filename: str = 'build_child_pipeline.yml'

Filename for the build child pipeline YAML file.

field yaml_jinja: str = '{{ settings.gitlab.build_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.build_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.build_pipeline.job_template_jinja %}\n{{ job_template }}\n{%- endif %}\n\n{{ jobs }}\n\n{%- if test_related_apps_count > 0 %}\ngenerate_test_child_pipeline:\n  extends: {{ settings.gitlab.build_pipeline.job_template_name }}\n  needs:\n    - build_test_related_apps\n  artifacts:\n    paths:\n      - {{ settings.gitlab.test_pipeline.yaml_filename }}\n  script:\n    - idf-ci gitlab test-child-pipeline\n\ntest-child-pipeline:\n  stage: .post\n  needs:\n    - generate_test_child_pipeline\n  variables:\n    PARENT_PIPELINE_ID: $PARENT_PIPELINE_ID\n  trigger:\n    include:\n      - artifact: {{ settings.gitlab.test_pipeline.yaml_filename }}\n        job: generate_test_child_pipeline\n    strategy: depend\n{%- endif %}'

Jinja2 template for the build child pipeline YAML content.

pydantic settings idf_ci.settings.TestPipelineSettings

Show JSON schema
{
   "title": "TestPipelineSettings",
   "type": "object",
   "properties": {
      "workflow_name": {
         "default": "Test Child Pipeline",
         "title": "Workflow Name",
         "type": "string"
      },
      "presigned_json_job_name": {
         "default": "generate_presigned_json",
         "title": "Presigned Json Job Name",
         "type": "string"
      },
      "job_template_name": {
         "default": ".default_test_settings",
         "title": "Job Template Name",
         "type": "string"
      },
      "job_template_jinja": {
         "default": "{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: \"\"\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}",
         "title": "Job Template Jinja",
         "type": "string"
      },
      "job_tags": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Job Tags",
         "type": "array"
      },
      "runs_per_job": {
         "default": 30,
         "title": "Runs Per Job",
         "type": "integer"
      },
      "jobs_jinja": {
         "default": "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}",
         "title": "Jobs Jinja",
         "type": "string"
      },
      "pre_yaml_jinja": {
         "default": "",
         "title": "Pre Yaml Jinja",
         "type": "string"
      },
      "yaml_jinja": {
         "default": "{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}",
         "title": "Yaml Jinja",
         "type": "string"
      },
      "yaml_filename": {
         "default": "test_child_pipeline.yml",
         "title": "Yaml Filename",
         "type": "string"
      }
   },
   "additionalProperties": false
}

Fields:
field job_tags: List[str] = []

Unused. tags are set by test cases.

field job_template_jinja: str = '{{ settings.gitlab.test_pipeline.job_template_name }}:\n  stage: test\n  timeout: 1h\n  artifacts:\n    paths:\n    {%- for path in settings.gitlab.artifacts.test_job_filepatterns %}\n      - {{ path }}\n    {%- endfor %}\n    expire_in: 1 week\n    when: always\n  variables:\n    PYTEST_EXTRA_FLAGS: ""\n  script:\n    - pytest ${nodes}\n      --parallel-count ${CI_NODE_TOTAL:-1}\n      --parallel-index ${CI_NODE_INDEX:-1}\n      --junitxml XUNIT_RESULT_${CI_JOB_NAME_SLUG}.xml\n      ${PYTEST_EXTRA_FLAGS}'

Default template for CI test jobs.

field job_template_name: str = '.default_test_settings'

Default template name for CI test jobs.

field jobs_jinja: str = "{% for job in jobs %}\n{{ job['name'] }}:\n  extends:\n    - {{ settings.gitlab.test_pipeline.job_template_name }}\n    {%- for extra_extend in job.get('extra_extends', []) %}\n    - {{ extra_extend }}\n    {%- endfor %}\n  tags: {{ job['tags'] }}\n{%- if job['parallel_count'] > 1 %}\n  parallel: {{ job['parallel_count'] }}\n{%- endif %}\n  variables:\n    nodes: {{ job['nodes'] }}\n{% endfor %}"

Jinja2 template for test jobs configuration.

field runs_per_job: int = 30

Maximum number of test cases to run in a single job.

field workflow_name: str = 'Test Child Pipeline'

Name for the GitLab CI workflow.

field yaml_filename: str = 'test_child_pipeline.yml'

Filename for the test child pipeline YAML file.

field yaml_jinja: str = '{{ settings.gitlab.test_pipeline.pre_yaml_jinja }}\n\nworkflow:\n  name: {{ settings.gitlab.test_pipeline.workflow_name }}\n  rules:\n    - when: always\n\n{%- if settings.gitlab.test_pipeline.job_template_jinja %}\n{{ default_template }}\n{%- endif %}\n\n{{ jobs }}'

Jinja2 template for the test child pipeline YAML content.