Xiaopei's DokuWiki

These are the good times in your life,
so put on a smile and it'll be alright

User Tools

Site Tools


it:ci

Continuous Integration CI 持续集成

jenkins + github / gitlab

github plugin

  • Hyperlinks between changes
    1. Github project: git@github.com:Person/Project.git
    2. Source Code Management, select Git, and put in: git@github.com:Person/Project.git
  • GitHub hook trigger for GITScm polling (old name Build when a change is pushed to GitHub)
    1. 在 github 的 webhook 中填入 jenkins 的 webhook 链接:https://ci.example.com/jenkins/github-webhook/.
    2. 在项目配置中勾选 Build when a change is pushed to GitHub
    3. 在 github 中只需配置一处(所有项目用的 jenkins webhook 是一样的),jenkins 知道 trigger 哪个项目
    4. 默认只 build master,如果需要 build 更多分支,需要修改 Branches to build

GitHub Plugin - Jenkins - Jenkins Wiki

gitlab plugin

  1. jenkins 创建 build 用的用户,按该用户登陆,点 左上角用户名 > Configure > Show API Token… ,复制 User IDAPI Token
  2. 在 gitlab 的 项目 > 齿轮 > integrations 中按 http://USERID:APITOKEN@JENKINS_URL/project/YOUR_JOB 创建一条 webhook
  3. 在 jenkins job 中,设置 Branches to build,勾选 Build when a change is pushed to GitLab
  4. 该插件的 github 中写了一些需要配置参数的问题,暂时还没遇到

jenkinsci/gitlab-plugin: A Jenkins plugin for interfacing with GitLab

jenkins

过时

it/ci.txt · Last modified: 2018/06/06 10:33 by admin