選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

.drone.yml 2.2 KiB

4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
4年前
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. kind: pipeline
  2. type: docker
  3. name: build
  4. clone:
  5. disable: true
  6. steps:
  7. - name: restore_cache
  8. image: drillster/drone-volume-cache
  9. volumes:
  10. - name: cache
  11. path: /tmp/drone-cache
  12. settings:
  13. restore: true
  14. mount:
  15. - /drone/docker
  16. - name: clone
  17. image: docker:git
  18. depends_on:
  19. - restore_cache
  20. environment:
  21. KEY:
  22. from_secret: DEPLOY_KEY
  23. PUBLIC:
  24. from_secret: DEPLOY_KEY_PUBLIC
  25. GIT_HOST:
  26. from_secret: GIT_HOST
  27. GIT_PORT:
  28. from_secret: GIT_PORT
  29. GIT_REPOSITORY:
  30. from_secret: GIT_REPOSITORY
  31. commands:
  32. - eval $(ssh-agent)
  33. - mkdir $HOME/.ssh && echo "$KEY" > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa && echo "$PUBLIC" > $HOME/.ssh/id_rsa.pub
  34. - ssh-add $HOME/.ssh/id_rsa
  35. - ssh-keyscan -p $GIT_PORT -H $GIT_HOST > $HOME/.ssh/known_hosts
  36. - git clone $GIT_REPOSITORY arbitry
  37. - cd arbitry && git checkout $DRONE_BRANCH && rm -rf .git
  38. - name: build_php_base
  39. image: plugins/docker
  40. settings:
  41. privileged: true
  42. storage_driver: overlay2
  43. storage_path: /drone/docker
  44. use_cache: true
  45. dockerfile: arbitry/docker/php/Dockerfile
  46. context: arbitry
  47. registry: registry:5000
  48. repo: registry:5000/arbitry_php_base
  49. tags: ${DRONE_BRANCH//\\//-}
  50. insecure: true
  51. build_args:
  52. - PHP_VERSION=7.4.4
  53. depends_on:
  54. - clone
  55. trigger:
  56. status:
  57. - success
  58. - name: build_php_fpm
  59. image: plugins/docker
  60. settings:
  61. privileged: true
  62. storage_driver: overlay2
  63. storage_path: /drone/docker
  64. use_cache: true
  65. dockerfile: arbitry/docker/php-fpm/Dockerfile
  66. registry: registry:5000
  67. repo: registry:5000/arbitry_php_fpm
  68. tags: ${DRONE_BRANCH//\\//-}
  69. insecure: true
  70. build_args:
  71. - BUILD_IMAGE=registry:5000/arbitry_php_base:${DRONE_BRANCH//\\//-}
  72. - PHP_VERSION=7.4.4
  73. depends_on:
  74. - build_php_base
  75. trigger:
  76. status:
  77. - success
  78. - name: rebuild_cache
  79. image: drillster/drone-volume-cache
  80. depends_on:
  81. - build_php_fpm
  82. volumes:
  83. - name: cache
  84. path: /tmp/drone-cache
  85. settings:
  86. rebuild: true
  87. mount:
  88. - /drone/docker