Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

61 lignes
1.4 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. - git clone $GIT_REPOSITORY ./
  28. - git checkout $DRONE_COMMIT
  29. - name: build_php_base
  30. image: plugins/docker
  31. settings:
  32. dockerfile: docker/php/Dockerfile
  33. registry: registry:5000
  34. repo: registry:5000/arbitry_php_base
  35. insecure: true
  36. build_args:
  37. - PHP_VERSION=7.4.4
  38. depends_on:
  39. - clone
  40. trigger:
  41. status:
  42. - success
  43. - name: build_php_fpm
  44. image: plugins/docker
  45. settings:
  46. dockerfile: docker/php-fpm/Dockerfile
  47. registry: registry:5000
  48. repo: registry:5000/arbitry_php_fpm
  49. insecure: true
  50. build_args:
  51. - BUILD_IMAGE=registry:5000/arbitry_php_base
  52. - PHP_VERSION=7.4.4
  53. depends_on:
  54. - build_php_base
  55. trigger:
  56. status:
  57. - success