Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Jenkins vs GitLab CI

4,056 views

Published on

Иван Немытченко, GitLab

Published in: Technology
  • Be the first to comment

Jenkins vs GitLab CI

  1. 1. GitLab CI vs Jenkins Ivan Nemytchenko | CEE SECR | October 29, 2016
  2. 2. Continous Integration
  3. 3. Motivational part of CI Let's prevent integration problems!
  4. 4. Motivational part of CI Let's combine all pieces together once a day to check if it works!
  5. 5. No need to motivate anyone anymore
  6. 6. CI is like VC
  7. 7. Practical part of CI CI used to be manual
  8. 8. Practical part of CI CI configuration used to require separate job position
  9. 9. Modern CI tools are not usually that complex
  10. 10. You can use CI not only in big projects
  11. 11. GitLab CI vs Jenkins Напрямую сравнивать неверно Но мы сделаем это!
  12. 12. Сравниваем в лоб → GitLab CI - часть основного продукта → Jenkins - самостоятельный продукт
  13. 13. Сравниваем в лоб → GitLab CI - Ruby on Rails + Go → Jenkins - Java
  14. 14. Сравниваем в лоб → GitLab CI - GitLab + Runners → Jenkins - Master + Slaves
  15. 15. Сравниваем в лоб → GitLab CI - Ничего лишнего, Convention over configuration → Jenkins - Плагины разработанные сообществом
  16. 16. Сравниваем в лоб → GitLab CI - Technology-agnostic → Jenkins - В каком-то смысле тоже, но плагины
  17. 17. Сравниваем в лоб → GitLab CI - Configuration as code → Jenkins - Настройка через UI*
  18. 18. CatGrep Sophisticated Technologies inc. → file1.txt → file2.txt
  19. 19. CatGrep Sophisticated Technologies inc. The code is on GitLab.com
  20. 20. Requirement #1 Concatenation result should contain "Hello world"
  21. 21. cat file1.txt file2.txt | grep -q "Hello world"
  22. 22. Run first test inside CI
  23. 23. Run first test inside CI .gitlab-ci.yml
  24. 24. Run first test inside CI test: script: cat file1.txt file2.txt | grep -q 'Hello world'
  25. 25. Run first test inside CI
  26. 26. Run first test inside CI
  27. 27. Requirement #2 Package code before sending it to customer
  28. 28. Package code test: script: cat file1.txt file2.txt | grep -q 'Hello world' package: script: cat file1.txt file2.txt | gzip > package.gz
  29. 29. Package code
  30. 30. Make results of your build downloadable
  31. 31. Make results of your build downloadable
  32. 32. Make results of your build downloadable
  33. 33. Make results of your build downloadable test: script: cat file1.txt file2.txt | grep -q 'Hello world' package: script: cat file1.txt file2.txt | gzip > packaged.gz artifacts: paths: - packaged.gz
  34. 34. Run jobs sequentially
  35. 35. Run jobs sequentially
  36. 36. Speeding up the build
  37. 37. Removing Duplication
  38. 38. Learning what Docker image to use
  39. 39. Learning what Docker image to use
  40. 40. Learning what Docker image to use image: alpine
  41. 41. Learning what Docker image to use
  42. 42. Learning what Docker image to use
  43. 43. Requirement #3 ISO instead of GZIP
  44. 44. Dealing with complex scenarios
  45. 45. Dealing with complex scenarios script: - apk add -U cdrkit - mkisofs -o ./packaged.iso ./compiled.txt
  46. 46. → 3 stages → passing files between stages → downloadable artifacts → optimized execution time → custom pipeline
  47. 47. @inemation ivan@gitlab.com → bit.ly/gitlab-ci1 → bit.ly/gitlab-ci2
  48. 48. → Environment variables → Environments (Staging, Production) → GitLab Pages → Roillback → Manual deployment
  49. 49. Requirement #4 Publish a website, containing packages
  50. 50. Publish a website aws s3 cp ./ s3://yourbucket/ --recursive
  51. 51. Publish a website
  52. 52. Publish a website
  53. 53. First Automated Deployment → awscli can be installed using pip → pip goes together with python
  54. 54. First Automated Deployment s3: image: python stage: deploy script: - pip install awscli - aws s3 cp ./ s3://yourbucket/ --recursive
  55. 55. First Automated Deployment AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY
  56. 56. First Automated Deployment
  57. 57. Keeping Secret Things Secret
  58. 58. Keeping Secret Things Secret Settings → Variables
  59. 59. Keeping Secret Things Secret s3: image: python stage: deploy script: - pip install awscli - aws s3 cp ./ s3://yourbucket/ --recursive
  60. 60. Keeping Secret Things Secret
  61. 61. Requirement #5 Two developers on the project
  62. 62. Two developers on the project
  63. 63. Two developers on the project
  64. 64. Requirement #6 Need a separate place for testing
  65. 65. Separate place for testing GitLab Pages
  66. 66. Host website using GitLab Pages → your job should be named "pages" → put your files into "public" folder → specify "artifacts" section with this "public" folder
  67. 67. Host website using GitLab Pages http://<username>.gitlab.io/<projectname>
  68. 68. Host website using GitLab Pages pages: stage: deploy image: alpine script: - mkdir -p ./public && cp ./*.* ./public/ artifacts: paths: - public except: - master
  69. 69. Separate place for testing s3: image: python stage: deploy script: - pip install awscli - aws s3 cp ./ s3://yourbucket/ --recursive only: - master pages: image: alpine stage: deploy script: - mkdir -p ./public && cp ./*.* ./public/ artifacts: paths: - public except: - master
  70. 70. Separate place for testing
  71. 71. Separate place for testing
  72. 72. Separate place for testing
  73. 73. Using Environments
  74. 74. Using Environments
  75. 75. Using Environments
  76. 76. Requirement #7 Do not mess up production
  77. 77. Do not mess up production
  78. 78. Do not mess up production
  79. 79. Questions? @inem ivan@gitlab.com → bit.ly/gitlab-ci1 → bit.ly/gitlab-ci2

×