Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 

66 рядки
1.5 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: localhost
  35. repo: arbitry_php_base
  36. dry_run: true
  37. insecure: true
  38. build_args:
  39. PHP_VERSION: 7.4.4
  40. commands:
  41. - ls -la
  42. depends_on:
  43. - clone
  44. trigger:
  45. status:
  46. - success
  47. - name: build_php_fpm
  48. image: plugins/docker
  49. settings:
  50. dockerfile: docker/php-fpm/Dockerfile
  51. registry: localhost
  52. repo: arbitry_php_fpm
  53. dry_run: true
  54. insecure: true
  55. build_args:
  56. PHP_VERSION: 7.4.4
  57. BUILD_IMAGE: 'arbitry_php_base'
  58. depends_on:
  59. - build_php_base
  60. trigger:
  61. status:
  62. - success