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

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