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