Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 
 

63 wiersze
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. depends_on:
  10. - restore_cache
  11. environment:
  12. KEY:
  13. from_secret: DEPLOY_KEY
  14. PUBLIC:
  15. from_secret: DEPLOY_KEY_PUBLIC
  16. GIT_HOST:
  17. from_secret: GIT_HOST
  18. GIT_PORT:
  19. from_secret: GIT_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 2222 -H gitea.local > $HOME/.ssh/known_hosts
  27. - git clone $GIT_REPOSITORY ./
  28. - git checkout $DRONE_BRANCH
  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. tags: ${DRONE_BRANCH//\\//-}
  36. insecure: true
  37. build_args:
  38. - PHP_VERSION=7.4.4
  39. depends_on:
  40. - clone
  41. trigger:
  42. status:
  43. - success
  44. - name: build_php_fpm
  45. image: plugins/docker
  46. settings:
  47. dockerfile: docker/php-fpm/Dockerfile
  48. registry: registry:5000
  49. repo: registry:5000/arbitry_php_fpm
  50. tags: ${DRONE_BRANCH//\\//-}
  51. insecure: true
  52. build_args:
  53. - BUILD_IMAGE=registry:5000/arbitry_php_base:${DRONE_BRANCH//\\//-}
  54. - PHP_VERSION=7.4.4
  55. depends_on:
  56. - build_php_base
  57. trigger:
  58. status:
  59. - success