- 博客(12)
- 收藏
- 关注
原创 test_interception
dct= [(project1,branch1,branch2,review1)(project2,branch1,branch2,review2)(project3,branch1,branch2,review3)]msg = “S,需要减分{0}”管控方法def R_666_interception(branch_2_change,review,interception_name,subInterceptionType):passget_all_changeds(project,cha
2022-01-14 01:54:12 167
原创 openpyxl获取excel范围内的数据并返回二维数组
#!/usr/bin/env python#coding:utf-8import sysreload(sys)sys.setdefaultencoding(‘utf-8’)def get_range_data(data_range,save_path,sheetName):‘’’獲取excel範圍內的數據,並返回二維數組:param data_range: 需要獲取的數據的範圍: “B11:H34”:param save_path: excel的文件路徑,不存在報錯並退出:param s
2021-11-23 22:30:11 1127
原创 openpyxl模板简单使用
#!/usr/bin/env python* coding:utf-8 *import openpyxlfrom openpyxl.workbook import Workbookfrom openpyxl.writer.excel import ExcelWriterimport jsondef newwb_write_data(data,save_path,sheetName,f_row,f_col):try:book = openpyxl.load_workbook(save_path
2021-11-21 22:52:53 547
原创 2021-11-03-urllib
参考文档1参考文档2中文编码解决方法中文解决方法2#!/usr/bin/pythoncoding:utf-8-- coding:UTF-8 --from future import unicode_literalsimport sysver = sys.version_info.majorif ver == 2:reload(sys)sys.setdefaultencoding(‘utf-8’)import jsonversin = sys.version_info.major
2021-11-03 00:46:20 81
原创 Tools--
#coding:utf-8import timeimport datetimeimport reimport urlparseclass Tools(object): @staticmethod def num_to_timestr(num): return time.strftime('%Y-%m-%d %H:%M:%S',time.localtime(num)) @staticmethod def timestr_to_num(time_
2021-10-07 22:32:43 84
原创 2021-10-07-check_job_failed
# coding:utf-8import osimport sysimport jenkinsimport jenkins_moudleimport yamlimport xml.dom.minidomfrom jenkins_moudle.tools import Tools# 判断是否陪跑。def is_job_online(branch,component): # dom = xml.dom.minidom.parse() pass# 判断工程是否超过一天
2021-10-07 22:30:07 157
原创 2021-10-07-jobinfo2
#!/usr/bin/python# coding:utf-8import jenkinsimport numpyimport threadingimport timeimport buildinfoimport datetimefrom tools import Toolsimport collectionsimport operatordef LoginJenkins(master_url,username=None,password=None): return
2021-10-07 22:28:33 120
原创 2021-10-07-build_info
#!/usr/bin/python# coding:utf-8import reimport jenkinsfrom tools import Toolsdef LoginJenkins(master_url,username=None,password=None): return jenkins.Jenkins(master_url,username,password)class BuildInfo(object): def __init__(self,Instanc
2021-10-07 22:26:53 133
原创 jenkins_获取json
import jenkinsimport yamlimport jsonimport urllib.parseimport xmltodictfrom xml.etree import ElementTreedef LoginJenkins(url, username=None, password=None): return jenkins.Jenkins(url,username,password)Ljenkins = LoginJenkins("http://10
2021-09-17 01:29:21 450
原创 jenkins获取build_info
import jenkinsimport timedef LoginJenkins(url, username=None, password=None): return jenkins.Jenkins(url,username,password)InstanceJenkins = LoginJenkins("http://10.0.0.40:8080/","admin","Lipanxiang@1102")def get_build_info_detail(Instance.
2021-09-17 01:20:00 766
原创 jenkins获取job_info
import jenkinsimport timedef LoginJenkins(url, username=None, password=None): return jenkins.Jenkins(url,username,password)class JobInfo(object): def __init__(self,InstanceJenkins,job_name): self.detail_Dict = InstanceJenkins.get_jo
2021-09-17 01:19:06 795
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人