修改配置文件
root@i-zk0ph8z8:/var/lib# vim /lib/systemd/system/jenkins.service
User=root
Group=root
更改...
![Mac安装jenkins](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Mac安装jenkins
安装brew命令
如之前安装过则跳过
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew...
![Jenkins集成Gitlab的SSO用户认证](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkins集成Gitlab的SSO用户认证
安装插件Gitlab Authentication
gitlab单点登录
一般我们会配置Gitlab系统与LDAP系统做用户认证集成,开发人员登录gitlab系统的频率还是...
![Jenkins动态获取主机](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkins动态获取主机
动态插件
添加环境
return["dev","test","stage","prod"]
添加主机
if(envName.equals("dev")){
re...
![Jenkins Agent](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkins Agent
配置
系统设置 > 节点管理 > 新建节点
启动方式选择Java Web
...
![Jenkins凭据](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkins凭据
在Jenkins机器生成免密
SSH免密钥登录
gitlab添加公钥
Jenkins配置私钥凭据
复制私钥到Key
隐藏用户
修改git...
![Jenkins共享库](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkins共享库
1.共享库概述
共享库这并不是一个全新的概念,其实在编程语言Python中,我们可以将Python代码写到一个文件中,当代码数量增加,我们可以将代码打包成模块然后再以import的方式使用此...
![Jenkinsfile语法](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkinsfile语法
Jenkinsfile的基本概念和Jenkins Pipeline的语法类型。
Jenkinsfile主要是用来存储用于描述Pipeline的代码。 我们将pipeline的描述代码保存...
![Pipeline简介](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Pipeline简介
Jenkins的核心是Pipeline(流水线项目),实现了Pipeline As Code。即我们将构建部署测试等步骤全部以代码的形式写到Jenkinsfile中。Jenki...
![Jenkins数据备份](https://devops.centoscn.vip/wp-content/themes/begin/prune.php?src=https://devops.centoscn.vip/wp-content/themes/begin/img/loading.png&w=280&h=210&a=&zc=1)
Jenkins数据备份
目录备份
备份目录
目录是JENKINS_HOME目录, 可以通过编写脚本结合Crontab定时任务自动备份。或者使用Jenkins的插件进行备份。
插件备份
ThinBackup...