You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:latest
  9. restore: true
  10. mount:
  11. - /drone/docker
  12. volumes:
  13. - /tmp/drone-cache:/cache
  14. - name: clone
  15. image: docker:git
  16. environment:
  17. KEY:
  18. from_secret: DEPLOY_KEY
  19. PUBLIC:
  20. from_secret: DEPLOY_KEY_PUBLIC
  21. GIT_HOST:
  22. from_secret: GIT_HOST
  23. GIT_PORT:
  24. from_secret: GIT_PORT
  25. GIT_REPOSITORY:
  26. from_secret: GIT_REPOSITORY
  27. commands:
  28. - eval $(ssh-agent)
  29. - mkdir $HOME/.ssh && echo "$KEY" > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa && echo "$PUBLIC" > $HOME/.ssh/id_rsa.pub
  30. - ssh-add $HOME/.ssh/id_rsa
  31. - ssh-keyscan -p $GIT_PORT -H $GIT_HOST > $HOME/.ssh/known_hosts
  32. - git clone $GIT_REPOSITORY ./
  33. - git checkout $DRONE_BRANCH
  34. - name: build_php_base
  35. image: plugins/docker
  36. settings:
  37. dockerfile: docker/php/Dockerfile
  38. registry: registry:5000
  39. repo: registry:5000/arbitry_php_base
  40. tags: ${DRONE_BRANCH//\\//-}
  41. insecure: true
  42. use_cache: true
  43. build_args:
  44. - PHP_VERSION=7.4.4
  45. depends_on:
  46. - clone
  47. trigger:
  48. status:
  49. - success
  50. volumes:
  51. - name: docker
  52. path: /var/lib/docker
  53. - name: build_php_fpm
  54. image: plugins/docker
  55. settings:
  56. dockerfile: docker/php-fpm/Dockerfile
  57. registry: registry:5000
  58. repo: registry:5000/arbitry_php_fpm
  59. tags: ${DRONE_BRANCH//\\//-}
  60. insecure: true
  61. build_args:
  62. - BUILD_IMAGE=registry:5000/arbitry_php_base:${DRONE_BRANCH//\\//-}
  63. - PHP_VERSION=7.4.4
  64. depends_on:
  65. - build_php_base
  66. trigger:
  67. status:
  68. - success
  69. - name: rebuild_cache
  70. image: drillster/drone-volume-cache:latest
  71. rebuild: true
  72. mount:
  73. - /drone/docker
  74. volumes:
  75. - /tmp/drone-cache:/cache