diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2906953bbe4..0920ba0c4d5 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,26 +2,15 @@ include: - project: "ci/actions/common" - ref: "v2" file: - "templates/stable/default-workflow.yml" - - "templates/idf/pre_check.yml" + - "templates/idf/v2/pre_check.yml" + - "templates/idf/pre-commit.yml" - "templates/idf/build.yml" - "templates/idf/deploy-github.yml" - "templates/idf/deploy-docs.yml" - "templates/idf/integration-test.yml" - - "templates/idf/pre_check.yml" - - project: "ci/actions/common" - ref: "v2" - file: "templates/idf/sync-files.yml" - inputs: - job_name: "sync-pre-commit-config" - remote_repo_url: "https://__token__:${CI_SYNC_REPO_TOKEN}@${CI_SERVER_FQDN}/ci/images.git" - ref_name: "ci/sync_idf_pre_commit_config" - file_mappings: - - ".pre-commit-config.yaml:pre-commit/idf/.pre-commit-config.v6.1.yaml" - changes: - - ".pre-commit-config.yaml" + - "templates/idf/sync-files.yml" - project: "ci/actions/common" file: "templates/idf/build-docs.yml" inputs: @@ -41,7 +30,6 @@ include: - ".gitlab/ci/upload_cache.yml" - ".gitlab/ci/pre_check.yml" - ".gitlab/ci/static-code-analysis.yml" - - ".gitlab/ci/pre_commit.yml" - ".gitlab/ci/build.yml" - ".gitlab/ci/host-test.yml" - ".gitlab/ci/test-win.yml" diff --git a/.gitlab/ci/common.yml b/.gitlab/ci/common.yml index ec1b1d9ac56..9749fc50b77 100644 --- a/.gitlab/ci/common.yml +++ b/.gitlab/ci/common.yml @@ -17,7 +17,6 @@ stages: include: - project: "ci/actions/common" - ref: "v2" file: "templates/idf/common-scripts.yml" inputs: ci_python_constraint_file: "espidf.constraints.v6.1.txt" @@ -68,6 +67,7 @@ variables: ESP_ENV_IMAGE: "${CI_REGISTRY}/ci/images/idf-v6.1:1" ESP_IDF_DOC_ENV_IMAGE: "${CI_REGISTRY}/ci/images/idf-v6.1-docs:1" TARGET_TEST_ENV_IMAGE: "${CI_REGISTRY}/ci/images/idf-v6.1-target-test:1" + PRE_COMMIT_ENV_IMAGE: "${CI_REGISTRY}/ci/images/pre-commit-idf-v6.1:1" # Set this variable to the branch of idf-constraints repo in order to test a custom Python constraint file. The # branch name must be without the remote part ("origin/"). Keep the variable empty in order to use the constraint diff --git a/.gitlab/ci/pre_commit.yml b/.gitlab/ci/pre_commit.yml index 49b6dfbd4d2..e98b4f87909 100644 --- a/.gitlab/ci/pre_commit.yml +++ b/.gitlab/ci/pre_commit.yml @@ -1,34 +1,3 @@ -.check_pre_commit_template: - extends: - - .before_script:minimal - stage: pre_check - image: "${CI_DOCKER_REGISTRY}/esp-idf-pre-commit:2" - tags: [pre-commit] - variables: - # Both shiny and brew runners can pick this job - GIT_STRATEGY: fetch - GIT_DEPTH: 1 - SUBMODULES_TO_FETCH: "all" - needs: - - pipeline_variables - script: - - fetch_submodules - - pre-commit run --files $MODIFIED_FILES - - pre-commit run --hook-stage post-commit validate-sbom-manifest - -check_pre_commit: - extends: - - .check_pre_commit_template - rules: - - if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/) && $CI_PIPELINE_SOURCE == "push"' - when: never - - when: on_success - cache: - - key: submodule-cache-${LATEST_GIT_TAG} - paths: - - .cache/submodule_archives - policy: pull - check_powershell: extends: - .before_script:minimal diff --git a/tools/ci/dynamic_pipelines/templates/test_child_pipeline.yml b/tools/ci/dynamic_pipelines/templates/test_child_pipeline.yml index 1b6ed573982..0888b4f42d9 100644 --- a/tools/ci/dynamic_pipelines/templates/test_child_pipeline.yml +++ b/tools/ci/dynamic_pipelines/templates/test_child_pipeline.yml @@ -35,6 +35,11 @@ generate_presigned_json: script: - idf-ci gitlab generate-presigned-json --output presigned.json +include: + - project: "ci/actions/common" + file: + - "templates/idf/app-size-metrics-full-report.yml" + generate_pytest_child_pipeline: # finally, we can get some use out of the default behavior that downloads all artifacts from the previous stage stage: assign_test