ci: move dynamic pipeline related jobs to ci/actions/common

This commit is contained in:
Fu Hanxi
2026-07-15 13:56:55 +02:00
parent 13c3d51631
commit 44687303cf
5 changed files with 6 additions and 204 deletions
+3 -72
View File
@@ -9,7 +9,6 @@
IDF_CCACHE_ENABLE: "1"
dependencies: # set dependencies to null to avoid missing artifacts issue
########################################
# Clang Build Apps Without Tests Cases #
########################################
@@ -68,62 +67,9 @@ build_clang_test_apps_riscv:
####################
# Dynamic Pipeline #
####################
pre_check_complete:
stage: build
image: $ESP_ENV_IMAGE
tags: [fast_run, shiny]
variables:
GIT_STRATEGY: none
cache: []
before_script: []
dependencies: []
script:
- echo "pre_check stage completed"
generate_build_child_pipeline:
extends:
- .build_template
tags: [fast_run, shiny]
dependencies: # set dependencies to null to avoid missing artifacts issue
needs:
- pipeline_variables
- job: baseline_manifest_sha
optional: true
artifacts:
paths:
- build_child_pipeline.yml
- test_related_apps.txt
- non_test_related_apps.txt
expire_in: 1 week
when: always
script:
- run_cmd idf-ci --debug gitlab build-child-pipeline
-p components
-p examples
-p tools/test_apps
- '[ -f test_related_apps.txt ] && shuf test_related_apps.txt -o test_related_apps.txt || echo "test_related_apps.txt not found, skipping."'
- '[ -f non_test_related_apps.txt ] && shuf non_test_related_apps.txt -o non_test_related_apps.txt || echo "non_test_related_apps.txt not found, skipping."'
build_child_pipeline:
stage: build
needs:
- job: fast_build_check
optional: true
artifacts: false
- pipeline_variables
- generate_build_child_pipeline
- job: pre_check_complete
artifacts: false
variables:
PARENT_PIPELINE_ID: $CI_PIPELINE_ID
# https://gitlab.com/gitlab-org/gitlab/-/issues/214340
inherit:
variables: false
trigger:
include:
- artifact: build_child_pipeline.yml
job: generate_build_child_pipeline
strategy: depend
# !!!
# configurations moved to ci/actions/common/idf/
# !!!
# Generates a separate child-pipeline YAML for the cmakev2 build system.
# The build_dir stays identical to cmakev1 (build_<target>_<config>); v1/v2
@@ -193,18 +139,3 @@ build_child_pipeline_buildv2:
job: generate_build_child_pipeline_buildv2
strategy: depend
allow_failure: true
generate_prebuild_report:
extends:
- .build_template
tags: [fast_run, shiny]
needs:
- pipeline_variables
artifacts:
paths:
- prebuild_report.html
expire_in: 1 week
when: always
script:
- run_cmd idf-ci build collect --format html -o prebuild_report.html
- echo "Report generated at https://${CI_PAGES_HOSTNAME}:${CI_SERVER_PORT}/-/esp-idf/-/jobs/${CI_JOB_ID}/artifacts/prebuild_report.html"
-46
View File
@@ -147,52 +147,6 @@ check_test_scripts_build_test_rules:
# requires basic pytest dependencies
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
snapshot_known_failure_cases:
extends:
- .pre_check_template
script:
- run_cmd idf-ci gitlab download-known-failure-cases-file ${KNOWN_FAILURE_CASES_FILE_NAME}
- mkdir -p artifacts
- mv ${KNOWN_FAILURE_CASES_FILE_NAME} artifacts/${KNOWN_FAILURE_CASES_FILE_NAME}.freeze
artifacts:
paths:
- artifacts/${KNOWN_FAILURE_CASES_FILE_NAME}.freeze
expire_in: 1 week
when: always
baseline_manifest_sha:
extends:
- .pre_check_template
- .rules:dev-push
script:
- |
# merged results pipelines, by default
# diff between target-branch-head and merged-result-head
if [ -n "$CI_MERGE_REQUEST_TARGET_BRANCH_SHA" ]; then
git fetch origin $CI_MERGE_REQUEST_TARGET_BRANCH_SHA --depth=1
git checkout FETCH_HEAD
idf-build-apps dump-manifest-sha \
--manifest-files $(find . -name ".build-test-rules.yml" | xargs) \
--output .manifest_sha
# merge request pipelines, when the mr got conflicts
# diff between diff-base-sha and merge-request-head
elif [ -n "$CI_MERGE_REQUEST_DIFF_BASE_SHA" ]; then
git fetch origin $CI_MERGE_REQUEST_DIFF_BASE_SHA --depth=1
git checkout FETCH_HEAD
idf-build-apps dump-manifest-sha \
--manifest-files $(find . -name ".build-test-rules.yml" | xargs) \
--output .manifest_sha
# other pipelines, like the protected branches pipelines
# not triggered in this job
fi
artifacts:
paths:
- .manifest_sha
expire_in: 1 week
when: always
retry_failed_jobs:
extends:
- .pre_check_template