上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 95 下一页
  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 阅读(1316) 评论(0) 推荐(0)
  2020年8月6日
摘要: 一、使用Windows Server Backup整机备份到远程服务器 二、AD授权还原 1.Hyper-V虚机通过msconfig引导进入目录修复模式,正常按F8选择即可。 2.使用.\administrator账号登录本地,域账号无法登录。登录后虽然本地连接显示断开状态,但实际上网络是可用的 登 阅读全文
posted @ 2020-08-06 15:26 momingliu11 阅读(2273) 评论(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 阅读(7845) 评论(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 阅读(2284) 评论(0) 推荐(0)
摘要: 1.在Jenkins Server本地创建git库 mkdir /data/Jenkins2Library/SharedLibrary #vars目录托管定义可从Pipeline访问的全局脚本(一般我们可以在这里编写标准化脚本)。 我们在pipeline中调用的指令就是在这里定义的 mkdir /d 阅读全文
posted @ 2020-08-04 10:59 momingliu11 阅读(2270) 评论(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 阅读(713) 评论(0) 推荐(0)
  2020年8月3日
摘要: function fts($a,$b){ $sum=$a+$b Write-Host $sum } function hs($fun,$a,$b){ $c = 32 #调用函数 Invoke-Command $fun -ArgumentList $a,$c } #函数hs调用fts函数 hs ${f 阅读全文
posted @ 2020-08-03 17:13 momingliu11 阅读(506) 评论(0) 推荐(0)
摘要: steps{ script{ //等待审批人审批,并通过timeout设置任务过期时间,防止任务永远挂起 def userInput timeout(timeout_mins){ try { userInput = input( id: 'inputap', message: "$input_mes 阅读全文
posted @ 2020-08-03 16:04 momingliu11 阅读(1432) 评论(0) 推荐(0)
  2020年7月30日
摘要: def m = [:] //定义空map def m = [a:6,b:20,c:1,d:22] def sorted = m.sort { a, b -> b.value <=> a.value } //降序排列 def sorted = m.sort { a, b -> a.value <=> 阅读全文
posted @ 2020-07-30 18:43 momingliu11 阅读(1043) 评论(0) 推荐(0)
  2020年7月27日
摘要: Jenkins Pipeline使用File parameter,将文件通过publish over cifs上传到Windows Share. Jenkins Pipeline直接使用File parameter,无法将文件上传到当前job的workspace下面,需要通过调用第三方jenkins 阅读全文
posted @ 2020-07-27 15:57 momingliu11 阅读(8242) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 95 下一页