Guest User

Untitled

a guest
Aug 21st, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.48 KB | None | 0 0
  1. # Installation ---
  2. # 1. In Bitbucket, add $FTP_USERNAME $FTP_PASSWORD and $FTP_HOST as environment variables.
  3. # 2. Commit this file to your repo
  4. # 3. From Bitbucket Cloud > Commits > Commit Number > Run Pipeline > Custom:Init (this will
  5. # push everything and initial GitFTP)
  6. #
  7. # Usage ---
  8. # - On each commit to master branch, it'll push all files to the $FTP_HOST
  9. # - You also have the option to 'init' (from Bitbucket Cloud) - pushes everything and initialises
  10. # - Finally you can also 'deploy-all' (from Bitbucket Cloud) - if multiple deploys fail, you
  11. # can deploy everything to "catch up"
  12. #
  13. image: aariacarterweir/lamp-gitftp:latest
  14.  
  15. pipelines:
  16. custom: # Pipelines that are triggered manually via the Bitbucket GUI
  17. init: # -- First time init
  18. - step:
  19. caches:
  20. - node
  21. - composer
  22. script:
  23. - npm install
  24. - git ftp init -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST
  25. deploy-all: # -- Deploys all files from the selected commit
  26. - step:
  27. caches:
  28. - node
  29. - composer
  30. script:
  31. - npm install
  32. - git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST --all
  33. branches: # Automated triggers on commits to branches
  34. master: # -- When committing to master branch
  35. - step:
  36. deployment: production
  37. caches:
  38. - node
  39. - composer
  40. script:
  41. - npm install
  42. - git ftp push -u "$FTP_USERNAME" -p "$FTP_PASSWORD" ftp://$FTP_HOST
Add Comment
Please, Sign In to add comment