Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to Gitea with Drone CI/CD

Bo-Yi Wu
August 06, 2017

Introduction to Gitea with Drone CI/CD

Agenda

* Git Hosting Services
* What is Gitea?
* Why we choose Gitea?
* How to install Gitea?
* Integrate CI/CD Service
* How to contribute to Gitea

Bo-Yi Wu

August 06, 2017
Tweet

More Decks by Bo-Yi Wu

Other Decks in Technology

Transcript

  1. A painless self-hosted
    Git service: Gitea
    Bo-Yi Wu
    2017.08.05

    View Slide

  2. About me
    Full Stack & DevOps engineer at Mediatek
    @appleboy at GitHub, Twitter and SlideShare
    https://blog.wu-boy.com

    View Slide

  3. Thanks

    View Slide

  4. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  5. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  6. Public Git Hosting Services
    Bitbucket GitHub Gitlab

    View Slide

  7. Git
    Hosting
    Open
    source
    Self Host Free
    Private
    Repo
    UI/UX
    GitHub No No No ★★★
    Bitbucket No Yes (Hard) Yes ★
    Gitlab Yes Yes (Hard) Yes ★
    Gitea Yes Yes (Easy) Yes ★★★
    Public Git hosting sites

    View Slide

  8. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  9. What is Gitea?
    The initial development have been done on Gogs
    https://github.com/go-gitea/gitea

    View Slide

  10. Purpose
    ò Easiest
    ò Fastest
    ò Painless

    View Slide

  11. Gitea hosted Gitea
    ò  Comment on commit and PR (#124)
    ò  Squash merge
    ò  Complete Protected branch (#32 #339 )
    ò  Complete API support (#64)
    ò  OAuth provider (#27)
    ò  API Documents (#194)
    ò  Complete notifications system (#145)
    ò  Complete Webhook support (#132 (PR #908) #895 #1002 )
    ò  Better CI Integration (#996 (PR #1332))
    ò  Approval system
    https://github.com/go-gitea/gitea/issues/1029

    View Slide

  12. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  13. Free & Open Source
    https://github.com/go-gitea

    View Slide

  14. Easy install than Gitlab
    Gitlab: https://goo.gl/YP3DF9
    Gitea: https://goo.gl/GuCuQZ

    View Slide

  15. Low memory and low cost

    View Slide

  16. Gitea is written in Golang

    View Slide

  17. Single Binary
    You don’t need to install any dependency package on your server

    View Slide

  18. Cross Platform

    View Slide

  19. ARM Platform

    View Slide

  20. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  21. Installation
    ò Docker
    ò Binary
    ò Package
    ò Source

    View Slide

  22. Installation
    ò Docker
    ò Binary
    ò Package
    ò Source

    View Slide

  23. http://bit.ly/install-gitea

    View Slide

  24. Download Binary
    https://dl.gitea.io/gitea

    View Slide

  25. Run the Gitea Service
    gitea web

    View Slide

  26. First Install

    View Slide

  27. Don’t Run Gitea as root user

    View Slide

  28. Create git User
    useradd –m git

    View Slide

  29. SSH Protocol

    View Slide

  30. Missing https?

    View Slide

  31. You don’t need to care about expire time of certificate file.

    View Slide

  32. example.com {
    proxy / localhost:3000
    }
    https://github.com/caddyserver/examples/tree/master/gitea

    View Slide

  33. Easy install in 5 minute

    View Slide

  34. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  35. Develop
    Pull
    Request
    Code
    Review
    Testing
    Deploy

    View Slide

  36. Gitea Drone

    View Slide

  37. Drone is a Continuous Delivery system
    built on container technology.
    What is Drone?

    View Slide

  38. Server
    agent
    agent
    agent
    Database
    System Structure

    View Slide

  39. Drone Server

    View Slide

  40. Drone Agent

    View Slide

  41. https://github.com/go-training/drone-tutorial

    View Slide

  42. Easy install in 5 minute

    View Slide

  43. Agenda
    ò Git Hosting Services
    ò What is Gitea?
    ò Why we choose Gitea?
    ò How to install Gitea?
    ò Integrate CI/CD Service
    ò How to contribute to Gitea

    View Slide

  44. Contribute to Gitea
    https://goo.gl/JiMsyA

    View Slide

  45. Contribution Guide
    ò Bug reports
    ò Discuss your design
    ò Testing before sending your pull request
    ò Code review

    View Slide

  46. Join us
    become a maintainer
    contributed at least 4 accepted PRs.

    View Slide

  47. Try it.
    https://try.gitea.io

    View Slide

  48. Thank you
    Any problems?

    View Slide