gitlab+jenkins配置自动触发构建

1、jenkins安装gitlab插件

2、启动gitlab容器

docker run -itd -v /opt/gitlab/etc:/etc/gitlab -v /opt/gitlab/log:/var/log/gitlab -v /opt/gitlab/opt:/var/opt/gitlab --restart always --privileged=true --name gitlab gitlab/gitlab-ce

3、gitlab配置ldap认证

复制代码
gitlab_rails['ldap_enabled'] = true
# gitlab_rails['prevent_ldap_sign_in'] = false

###! **remember to close this block with 'EOS' below**
gitlab_rails['ldap_servers'] = YAML.load <<-'EOS'
   main: # 'main' is the GitLab 'provider ID' of this LDAP server
     label: 'LDAP'
     host: '172.17.0.100'
     port: 389
     uid: 'sAMAccountName'
     bind_dn: 'cn=Administrator,cn=Users,dc=southpark,dc=com'
     password: '123456'
#     encryption: 'plain' # "start_tls" or "simple_tls" or "plain"
#     verify_certificates: true
#     smartcard_auth: false
     active_directory: true
     allow_username_or_email_login: true
#     lowercase_usernames: false
     block_auto_created_users: false
     base: 'ou=south,dc=southpark,dc=com'
     user_filter: ''
EOS
复制代码

参考链接:
      https://www.cnblogs.com/diaomina/p/12830449.html        # docker部署gitlab
      https://www.cnblogs.com/mingerlcm/p/12702528.html     # Jenkins配置Gitlab自动触发构建
      https://mp.weixin.qq.com/s/ZQ6woHimkhjzD3hpw7A7nA      # 基于Jenkins搭建一套CI/CD系统

posted @   風£飛  阅读(174)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
· DeepSeek 开源周回顾「GitHub 热点速览」
点击右上角即可分享
微信分享提示