.gitlab-ci.yml.in 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. # Configuration for Gitlab-CI.
  2. # Builds appear on https://gitlab.com/buildroot.org/buildroot/pipelines
  3. # The .gitlab-ci.yml file is generated from .gitlab-ci.yml.in.
  4. # It needs to be regenerated every time a defconfig is added, using
  5. # "make .gitlab-ci.yml".
  6. image: buildroot/base
  7. .defconfig_script: &defconfig_script
  8. - echo 'Configure Buildroot'
  9. - make ${CI_BUILD_NAME}
  10. - echo 'Build buildroot'
  11. - |
  12. make > >(tee build.log |grep '>>>') 2>&1 || {
  13. echo 'Failed build last output'
  14. tail -200 build.log
  15. exit 1
  16. }
  17. check-gitlab-ci.yml:
  18. script:
  19. - mv .gitlab-ci.yml .gitlab-ci.yml.orig
  20. - make .gitlab-ci.yml
  21. - diff -u .gitlab-ci.yml.orig .gitlab-ci.yml
  22. check-DEVELOPERS:
  23. # get-developers should print just "No action specified"; if it prints
  24. # anything else, it's a parse error.
  25. # The initial ! is removed by YAML so we need to quote it.
  26. script:
  27. - "! utils/get-developers | grep -v 'No action specified'"
  28. .defconfig: &defconfig
  29. # Running the defconfigs for every push is too much, so limit to
  30. # explicit triggers through the API.
  31. only:
  32. - triggers
  33. - tags
  34. script: *defconfig_script
  35. artifacts:
  36. when: always
  37. expire_in: 2 weeks
  38. paths:
  39. - build.log
  40. - output/images/
  41. - output/build/build-time.log
  42. - output/build/packages-file-list.txt
  43. .runtime_test: &runtime_test
  44. script: ./support/testing/run-tests -o test-output/ -d test-dl/ ${CI_BUILD_NAME}
  45. artifacts:
  46. when: always
  47. expire_in: 2 weeks
  48. paths:
  49. - test-output/*.log