上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 90 下一页
  2020年9月10日
摘要: Json String转换为Json Object Pipeline中写法如下: ec2 = '{"first_name":"John","full_name":"John Doe","last_name":"Doe"}' println ec2.getClass() //Return: class 阅读全文
posted @ 2020-09-10 15:55 momingliu11 阅读(1561) 评论(0) 推荐(0) 编辑
  2020年8月19日
摘要: 安装 build-name-setter 插件,然后使用如下: script{ wrap([$class: 'BuildUser']) { def deploylog="${BUILD_USER} use pipeline '${JOB_NAME}(${BUILD_NUMBER})' " print 阅读全文
posted @ 2020-08-19 14:05 momingliu11 阅读(2733) 评论(0) 推荐(0) 编辑
摘要: 方法一: import hudson.model.* def specificCause = currentBuild.getBuildCauses('hudson.model.Cause$UserIdCause') println "specificCause: $specificCause" / 阅读全文
posted @ 2020-08-19 11:29 momingliu11 阅读(3623) 评论(0) 推荐(1) 编辑
  2020年8月18日
摘要: 1.安装 SSH Pipeline Steps 插件 2.在凭据中添加remote server凭据,如下 3.Pipeline编写: def GetRemoteServer(ip){ def remote = [:] remote.name = ip remote.host = ip remote 阅读全文
posted @ 2020-08-18 16:13 momingliu11 阅读(6912) 评论(1) 推荐(0) 编辑
  2020年8月12日
摘要: res_dl是一个json字符串,如下: [{'time': '2020/8/10 12:37:29', 'url': 'http://www.baidu.com/Account/QrCodeLoginPost?returnUrl=127.0.0.1', 'ip': '120.229.137.87' 阅读全文
posted @ 2020-08-12 18:33 momingliu11 阅读(1278) 评论(0) 推荐(0) 编辑
  2020年8月6日
摘要: 一、使用Windows Server Backup整机备份到远程服务器 二、AD授权还原 1.Hyper-V虚机通过msconfig引导进入目录修复模式,正常按F8选择即可。 2.使用.\administrator账号登录本地,域账号无法登录。登录后虽然本地连接显示断开状态,但实际上网络是可用的 登 阅读全文
posted @ 2020-08-06 15:26 momingliu11 阅读(1739) 评论(0) 推荐(0) 编辑
  2020年8月4日
摘要: 将Pipeline script放到git,执行的时候从git拉下来执行 1.使用Jenkins本地git库测试,配置如下: 2.新建Pipeline,选择“Pipeline script from SCM”,配置Repositories地址为上图git仓库路径 脚本路径可以按需自定义,此处配置如下 阅读全文
posted @ 2020-08-04 15:34 momingliu11 阅读(7163) 评论(0) 推荐(1) 编辑
摘要: import jenkins.model.* //定义函数,get all pipeline jobs. @NonCPS def getPipelineJobNames() { Hudson.instance.getAllItems(org.jenkinsci.plugins.workflow.jo 阅读全文
posted @ 2020-08-04 14:33 momingliu11 阅读(2106) 评论(0) 推荐(0) 编辑
摘要: 1.在Jenkins Server本地创建git库 mkdir /data/Jenkins2Library/SharedLibrary #vars目录托管定义可从Pipeline访问的全局脚本(一般我们可以在这里编写标准化脚本)。 我们在pipeline中调用的指令就是在这里定义的 mkdir /d 阅读全文
posted @ 2020-08-04 10:59 momingliu11 阅读(2174) 评论(0) 推荐(1) 编辑
摘要: pipeline{ agent any stages{ stage("任务申请"){ steps{ wrap([$class: 'BuildUser']) { script { //获取当前登录用户账户、姓名、邮箱 Applier_id = "${BUILD_USER_ID}" } script{ 阅读全文
posted @ 2020-08-04 09:55 momingliu11 阅读(662) 评论(0) 推荐(0) 编辑
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 90 下一页