zoukankan      html  css  js  c++  java
  • jenkins配置拉取gitlab代码

        安装Git插件和git工具:为了jenkins支持gitlab拉取源码,需要安装git插件以及在chentos上安装git工具(centosyum -y install git

     

    方法一:用户密码方式

    1、添加git用户密码

    2、使用git下载代码,需要配置项目地址和用户密码

     

    3、直接构建项目就会自动克隆代码到本地 /var/lib/jenkins/workspace/xm_name

     

    方法二:使用ssh模式

    思路:(服务器获取公钥、私钥---githab配置公钥----jenkins配置私钥---项目使用ssh模式)

    1jenkins服务器配置ssh公钥和私钥

     

    2github配置公钥

     

    3jenkins配置ssh凭证,使用ssh的私钥 (注意gitlab需要使用root账号,才有权限)

     

     4jenkins项目中配置git拉取代码

     

     5、项目构建

     

     

    做一个决定,并不难,难的是付诸行动,并且坚持到底。
  • 相关阅读:
    blocking to nonblocking of Python
    hug -- Embrace the APIs of the future
    supplychain on blockchain
    xstate -- JavaScript state machines and statecharts
    计算PI -- 采用刘徽的割圆术方法
    Gunicorn
    AIOHTTP
    APScheduler
    prefect
    FastAPI
  • 原文地址:https://www.cnblogs.com/wukc/p/15381042.html
Copyright © 2011-2022 走看看