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

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