pre.yml 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. before_script:
  23. - test -d $HOME/.ssh || mkdir $HOME/.ssh
  24. - ssh-keyscan github.com >> $HOME/.ssh/known_hosts
  25. - eval $(ssh-agent -s)
  26. - echo "$PUSH_TO_GITHUB_SSH_PRIVATE_KEY" | ssh-add -
  27. - ssh-add -l
  28. script:
  29. - git fetch --unshallow
  30. - script/build/sync_repo.sh git@github.com:zammad/zammad.git
  31. after_script: []
  32. 'publish source archives':
  33. stage: pre
  34. tags:
  35. - push-to-ftp
  36. cache: []
  37. rules:
  38. - if: $CI_MERGE_REQUEST_ID
  39. when: never
  40. - if: $CI_COMMIT_TAG
  41. when: always
  42. - if: '$CI_COMMIT_BRANCH == "stable"'
  43. when: always
  44. - when: never
  45. before_script:
  46. - test -d $HOME/.ssh || mkdir $HOME/.ssh
  47. - ssh-keyscan ftp.zammad.com >> $HOME/.ssh/known_hosts
  48. - eval $(ssh-agent -s)
  49. - echo "$FTP_ZAMMAD_COM_SSH_PRIVATE_KEY" | ssh-add -
  50. - ssh-add -l
  51. script:
  52. - script/build/deploy_archives.sh
  53. after_script: []