post_check.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. # copy from .gitlab-ci.yml as anchor is not global
  2. .show_submodule_urls: &show_submodule_urls |
  3. git config --get-regexp '^submodule\..*\.url$' || true
  4. .post_check_base_template:
  5. stage: post_check
  6. image: $CI_DOCKER_REGISTRY/esp32-ci-env$BOT_DOCKER_IMAGE_TAG
  7. tags:
  8. - host_test
  9. dependencies: []
  10. .post_check_job_template:
  11. extends:
  12. - .post_check_base_template
  13. - .before_script_lesser_nofilter
  14. .post_check_job_template_with_filter:
  15. extends:
  16. - .post_check_base_template
  17. - .before_script_lesser
  18. check_submodule_sync:
  19. extends:
  20. - .before_script_slim
  21. - .post_check_job_template
  22. tags:
  23. - github_sync
  24. retry: 2
  25. variables:
  26. GIT_STRATEGY: clone
  27. SUBMODULES_TO_FETCH: "none"
  28. PUBLIC_IDF_URL: "https://github.com/espressif/esp-idf.git"
  29. script:
  30. - git submodule deinit --force .
  31. # setting the default remote URL to the public one, to resolve relative location URLs
  32. - git config remote.origin.url ${PUBLIC_IDF_URL}
  33. # check if all submodules are correctly synced to public repository
  34. - git submodule init
  35. - *show_submodule_urls
  36. - git submodule update --recursive
  37. - echo "IDF was cloned from ${PUBLIC_IDF_URL} completely"
  38. check_ut_cmake_make:
  39. extends:
  40. - .post_check_job_template_with_filter
  41. - .rules:dev
  42. tags:
  43. - build
  44. script:
  45. - tools/ci/check_ut_cmake_make.sh
  46. check_artifacts_expire_time:
  47. extends: .post_check_job_template
  48. script:
  49. # check if we have set expire time for all artifacts
  50. - python tools/ci/check_artifacts_expire_time.py
  51. check_pipeline_triggered_by_label:
  52. extends:
  53. - .post_check_job_template
  54. - .rules:dev
  55. script:
  56. # If the pipeline is triggered with label, the pipeline will only succeeded if "regular_test" label is added.
  57. # We want to make sure some jobs are always executed to detect regression.
  58. - test "$BOT_LABEL_REGULAR_TEST" = "true" || { echo "CI can only pass if 'regular_test' label is included"; exit -1; }
  59. check_commit_msg:
  60. extends: .post_check_job_template
  61. script:
  62. - git status
  63. - git log -n10 --oneline
  64. # commit start with "WIP: " need to be squashed before merge
  65. - 'git log --pretty=%s master.. -- | grep "^WIP: " && exit 1 || exit 0'