pre.yml 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. # Write CI cache once for faster runs
  2. 'write runner cache: ruby':
  3. stage: pre
  4. cache: !reference [.cache, read_write_ruby]
  5. before_script:
  6. - !reference [.scripts, source_rvm]
  7. script:
  8. - !reference [.scripts, bundle_install]
  9. after_script: []
  10. 'write runner cache: nodejs':
  11. stage: pre
  12. cache: !reference [.cache, read_write_nodejs]
  13. before_script: []
  14. script:
  15. - !reference [.scripts, yarn_install_all]
  16. - yarn cypress:install
  17. - yarn --cwd ./.eslint-plugin-zammad install
  18. after_script: []
  19. 'push to github':
  20. stage: pre
  21. cache: []
  22. rules:
  23. - if: $CI_COMMIT_REF_NAME =~ /^(private|cherry-pick-|renovate|dependabot)/
  24. when: never
  25. - when: always
  26. before_script:
  27. - test -d $HOME/.ssh || mkdir $HOME/.ssh
  28. - ssh-keyscan github.com >> $HOME/.ssh/known_hosts
  29. - eval $(ssh-agent -s)
  30. - echo "$PUSH_TO_GITHUB_SSH_PRIVATE_KEY" | ssh-add -
  31. - ssh-add -l
  32. script:
  33. - git fetch --unshallow
  34. - script/build/sync_repo.sh git@github.com:zammad/zammad.git
  35. after_script: []
  36. 'publish source archives':
  37. stage: pre
  38. tags:
  39. - push-to-ftp
  40. cache: []
  41. rules:
  42. - if: $CI_COMMIT_TAG
  43. when: always
  44. - if: $CI_COMMIT_BRANCH == "stable"
  45. when: always
  46. - when: never
  47. before_script:
  48. - test -d $HOME/.ssh || mkdir $HOME/.ssh
  49. - ssh-keyscan ftp.zammad.com >> $HOME/.ssh/known_hosts
  50. - eval $(ssh-agent -s)
  51. - echo "$FTP_ZAMMAD_COM_SSH_PRIVATE_KEY" | ssh-add -
  52. - ssh-add -l
  53. script:
  54. - script/build/deploy_archives.sh
  55. after_script: []