jenkins 鏈接 github
https://wiki.jenkins.io/display/JENKINS/GitHub+Plugin
https://www.jianshu.com/p/5879816dea49
-
webhook 可以讓 jenkins 自動創建,只需要在
manage jenkins
->configure system
->github
->manage hooks
打勾
-
在創建Credentials 時, 把 github 的 personal access token 通過
secret text
方式創建,可以驗證通過的。
但是 在pipeline 配置 github-repo 中的Jenkinsfile
中可能是找不到secret text
類型 credentials 的, 這個時候需要在建個username/password
類型的 credentials, username 隨便填,password 填token(github push 使用 personal access token push 時, username 要填github 的username )
-
github deploy keys 可以用來拉代碼,也就是pipeline 這裏可以是用 deploy key
-
github webhook 的ip段
https://api.github.com/meta
jenkins pipeline 的 groovy
https://jenkins.io/doc/pipeline/examples/