upload_cache.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. # pull only for most of the use cases for cache
  2. # only set "push" policy for the jobs under this file.
  3. # The cache would be updated when files matched specified patterns changes.
  4. .upload_cache_template:
  5. stage: upload_cache
  6. image: $ESP_ENV_IMAGE
  7. upload-pip-cache:
  8. extends:
  9. - .upload_cache_template
  10. - .before_script:minimal
  11. - .rules:patterns:python-cache
  12. tags:
  13. - $GEO
  14. - cache
  15. cache:
  16. key: pip-cache
  17. paths:
  18. - .cache/pip
  19. policy: push
  20. script:
  21. - rm -rf .cache/pip # clear old packages
  22. - bash install.sh --enable-ci --enable-pytest
  23. parallel:
  24. matrix:
  25. - GEO: [ 'shiny', 'brew' ]
  26. upload-submodules-cache:
  27. extends:
  28. - .upload_cache_template
  29. - .before_script:minimal
  30. - .rules:patterns:submodule
  31. tags:
  32. - $GEO
  33. - cache
  34. cache:
  35. key: submodule-cache
  36. paths:
  37. - .cache/submodule_archives
  38. policy: push
  39. script:
  40. # use the default gitlab server
  41. - unset LOCAL_GITLAB_HTTPS_HOST
  42. - rm -rf .cache/submodule_archives # clear old submodule archives
  43. - add_gitlab_ssh_keys
  44. - fetch_submodules
  45. parallel:
  46. matrix:
  47. - GEO: [ 'shiny', 'brew' ]
  48. upload-danger-npm-cache:
  49. stage: upload_cache
  50. image: node:18.15.0-alpine3.16
  51. extends:
  52. - .rules:patterns:dangerjs
  53. tags:
  54. - $GEO
  55. - cache
  56. cache:
  57. key:
  58. files:
  59. - .gitlab/dangerjs/package-lock.json
  60. paths:
  61. - .gitlab/dangerjs/node_modules/
  62. policy: push
  63. before_script:
  64. - echo "Skip before scripts ...."
  65. script:
  66. - cd .gitlab/dangerjs
  67. - npm install --no-progress --no-update-notifier
  68. parallel:
  69. matrix:
  70. - GEO: [ 'shiny', 'brew' ]