Du kannst nicht mehr als 25 Themen auswählen Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
 
 
 
 

73 Zeilen
1.7 KiB

  1. kind: pipeline
  2. type: docker
  3. name: build
  4. clone:
  5. disable: true
  6. steps:
  7. - name: clone
  8. image: docker:git
  9. environment:
  10. KEY:
  11. from_secret: DEPLOY_KEY
  12. PUBLIC:
  13. from_secret: DEPLOY_KEY_PUBLIC
  14. GIT_HOST:
  15. from_secret: GIT_HOST
  16. GIT_PORT:
  17. from_secret: GIT_PORT
  18. GIT_REPOSITORY:
  19. from_secret: GIT_REPOSITORY
  20. commands:
  21. - eval $(ssh-agent)
  22. - mkdir $HOME/.ssh && echo "$KEY" > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa && echo "$PUBLIC" > $HOME/.ssh/id_rsa.pub
  23. - ssh-add $HOME/.ssh/id_rsa
  24. - ssh-keyscan -p $GIT_PORT -H $GIT_HOST > $HOME/.ssh/known_hosts
  25. - git clone $GIT_REPOSITORY ./
  26. - git checkout $DRONE_BRANCH
  27. - name: build_php_base
  28. image: plugins/docker
  29. settings:
  30. dockerfile: docker/php/Dockerfile
  31. registry: registry:5000
  32. repo: registry:5000/arbitry_php_base
  33. tags: ${DRONE_BRANCH//\\//-}
  34. insecure: true
  35. use_cache: true
  36. build_args:
  37. - PHP_VERSION=7.4.4
  38. depends_on:
  39. - clone
  40. trigger:
  41. status:
  42. - success
  43. volumes:
  44. - name: docker
  45. path: /var/lib/docker
  46. - name: build_php_fpm
  47. image: plugins/docker
  48. settings:
  49. dockerfile: docker/php-fpm/Dockerfile
  50. registry: registry:5000
  51. repo: registry:5000/arbitry_php_fpm
  52. tags: ${DRONE_BRANCH//\\//-}
  53. insecure: true
  54. build_args:
  55. - BUILD_IMAGE=registry:5000/arbitry_php_base:${DRONE_BRANCH//\\//-}
  56. - PHP_VERSION=7.4.4
  57. depends_on:
  58. - build_php_base
  59. trigger:
  60. status:
  61. - success
  62. volumes:
  63. - name: docker
  64. path: /var/lib/docker
  65. volumes:
  66. - name: docker
  67. host:
  68. path: /var/lib/docker