選択できるのは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年前
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. storage_driver: overlay
  42. storage_path: /drone/docker
  43. use_cache: true
  44. dockerfile: arbitry/docker/php/Dockerfile
  45. context: arbitry
  46. registry: registry:5000
  47. repo: registry:5000/arbitry_php_base
  48. tags: ${DRONE_BRANCH//\\//-}
  49. insecure: true
  50. build_args:
  51. - PHP_VERSION=7.4.4
  52. depends_on:
  53. - clone
  54. trigger:
  55. status:
  56. - success
  57. - name: build_php_fpm
  58. image: plugins/docker
  59. settings:
  60. storage_driver: overlay
  61. storage_path: /drone/docker
  62. use_cache: true
  63. dockerfile: arbitry/docker/php-fpm/Dockerfile
  64. registry: registry:5000
  65. repo: registry:5000/arbitry_php_fpm
  66. tags: ${DRONE_BRANCH//\\//-}
  67. insecure: true
  68. build_args:
  69. - BUILD_IMAGE=registry:5000/arbitry_php_base:${DRONE_BRANCH//\\//-}
  70. - PHP_VERSION=7.4.4
  71. depends_on:
  72. - build_php_base
  73. trigger:
  74. status:
  75. - success
  76. - name: rebuild_cache
  77. image: drillster/drone-volume-cache
  78. depends_on:
  79. - build_php_fpm
  80. volumes:
  81. - name: cache
  82. path: /tmp/drone-cache
  83. settings:
  84. rebuild: true
  85. mount:
  86. - /drone/docker