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.
 
 
 
 

56 line
1.3 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_REPOSITORY:
  15. from_secret: GIT_REPOSITORY
  16. commands:
  17. - eval $(ssh-agent)
  18. - mkdir $HOME/.ssh && echo "$KEY" > $HOME/.ssh/id_rsa && chmod 600 $HOME/.ssh/id_rsa && echo "$PUBLIC" > $HOME/.ssh/id_rsa.pub
  19. - ssh-add $HOME/.ssh/id_rsa
  20. - resolveip -s gitea.local
  21. - ssh-keyscan -t rsa -p 2222 -H gitea.local >> $HOME/.ssh/known_hosts
  22. - git clone $GIT_REPOSITORY ./
  23. - git checkout $DRONE_COMMIT
  24. - name: build_php_base
  25. image: plugins/docker
  26. settings:
  27. dockerfile: docker/php/Dockerfile
  28. registry: registry:5000
  29. repo: registry:5000/arbitry_php_base
  30. insecure: true
  31. build_args:
  32. - PHP_VERSION=7.4.4
  33. depends_on:
  34. - clone
  35. trigger:
  36. status:
  37. - success
  38. - name: build_php_fpm
  39. image: plugins/docker
  40. settings:
  41. dockerfile: docker/php-fpm/Dockerfile
  42. registry: registry:5000
  43. repo: registry:5000/arbitry_php_fpm
  44. insecure: true
  45. build_args:
  46. - BUILD_IMAGE=registry:5000/arbitry_php_base
  47. - PHP_VERSION=7.4.4
  48. depends_on:
  49. - build_php_base
  50. trigger:
  51. status:
  52. - success