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

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