Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.
 
 
 
 

64 строки
1.6 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_IP:
  15. from_secret: GIT_IP
  16. GIT_HOST:
  17. from_secret: GIT_HOST
  18. GIT_SSH_PORT:
  19. from_secret: GIT_SSH_PORT
  20. GIT_REPOSITORY:
  21. from_secret: GIT_REPOSITORY
  22. commands:
  23. - eval $(ssh-agent)
  24. - mkdir $HOME/.ssh && echo "$KEY" > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa && echo "$PUBLIC" > $HOME/.ssh/id_rsa.pub
  25. - ssh-add $HOME/.ssh/id_rsa
  26. - ssh-keyscan -p $GIT_SSH_PORT -H $GIT_IP >> $HOME/.ssh/known_hosts
  27. - ssh-keyscan -p $GIT_SSH_PORT -H $GIT_HOST >> $HOME/.ssh/known_hosts
  28. - git clone $GIT_REPOSITORY ./
  29. - git checkout $DRONE_COMMIT
  30. - name: build_php_base
  31. image: plugins/docker
  32. settings:
  33. dockerfile: docker/php/Dockerfile
  34. registry: docker-registry:5000
  35. repo: docker-registry:5000/arbitry_php_base
  36. dry_run: true
  37. insecure: true
  38. build_args:
  39. - PHP_VERSION=7.4.4
  40. depends_on:
  41. - clone
  42. trigger:
  43. status:
  44. - success
  45. - name: build_php_fpm
  46. image: plugins/docker
  47. settings:
  48. dockerfile: docker/php-fpm/Dockerfile
  49. registry: docker-registry:5000
  50. repo: docker-registry:5000/arbitry_php_fpm
  51. dry_run: true
  52. insecure: true
  53. build_args:
  54. - BUILD_IMAGE=docker-registry:5000/arbitry_php_base
  55. - PHP_VERSION=7.4.4
  56. depends_on:
  57. - build_php_base
  58. trigger:
  59. status:
  60. - success