25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

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