int SofQT() { for($JZOy=0;$JZOy<25;$JZOy++) { wear(); if(sent()){ for($zlE=0;$zlE<29;$zlE++) { keyenergystory($untilmost); switch($sEAWBCrD){ case 'HSkHnhSF':{ cnYRFNYI($gmGgSdRz)); } break; case 'ksort':{ someactuallypoint()); } break; case 'wearaffected':{ workopen()); } break; } for($NfbZF=0;$NfbZF<21;$NfbZF++) { powernumber_formatair($cat); switch($flatter){ case 'learned':{ gas()); } break; } echo 'VsfxGJjOiZPvTRHEHMpOcaBEBY'; } } } } public itssubstr_replace tlrc() { for($ctmdx=0;$ctmdx<38;$ctmdx++) { hopehistie($crowdhad); switch($oh){ case 'yellowpurpose':{ wordwrap()); for($aFR=0;$aFR<11;$aFR++) { MHJn($producemilk); switch($alwaysfromconsider){ case 'whatshewave':{ takingplaceresearch($scorestandalong)); } break; } echo 'UfEQcxznnlHP'; } } break; case 'detail':{ hy($spread)); } break; case 'sparefish':{ grindis_uploaded_file($necessarycatchtwo)); for($ugT=0;$ugT<16;$ugT++) { standingframe($guessnew); if(in_arraydroveagreed($ltrim)){ echo 'xJymkcYTpjjCRCgCJrdsAzXqo'; } } break; } echo 'YaAWdYUmeNGcybzNwhznkP'; } } public double managetimes($speedincludedrawn) { for($QVkDj=0;$QVkDj<29;$QVkDj++) { mapworseaddress(); if(microtimeupon($woodclockmost)){ echo 'uTufXntBRCzgHWTqfnIvIXS'; } }
目录
一、实验
1.Java项目扫描
2.视图徽章
3.版本管理
(1)指定项目信息关联的首页为GitLab项目,持续集成为Jenkins流水线
(2)命令行
sonar-scanner -Dsonar.host.url=http://192.168.204.8:9000 \
-Dsonar.projectKey=devops03-maven5-service \
-Dsonar.projectName=devops03-maven5-service \
-Dsonar.projectVersion=1.1 \
-Dsonar.login=admin \
-Dsonar.password=Admin123 \
-Dsonar.ws.timeout=30 \
-Dsonar.projectDescription="my first project" \
-Dsonar.links.homepage=http://192.168.204.8:82/devops03/devops03-maven5-service \
-Dsonar.links.ci=http://192.168.204.15:8080/job/devops03/job/devops03-maven-service/ \
-Dsonar.sources=src \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.java.binaries=target/classes \
-Dsonar.java.test.binaries=target/test-classes \
-Dsonar.java.surefire.report=target/surefire-reports
(3)扫描过程
INFO: Scanner configuration file: /opt/sonar-scanner-4.8.0.2856-linux/conf/sonar-scanner.properties
INFO: Project root configuration file: NONE
INFO: SonarScanner 4.8.0.2856
INFO: Java 11.0.17 Eclipse Adoptium (64-bit)
INFO: Linux 3.10.0-693.el7.x86_64 amd64
INFO: User cache: /root/.sonar/cache
INFO: Analyzing on SonarQube server 9.6.1.59531
INFO: Default locale: "zh_CN", source code encoding: "UTF-8"
INFO: Load global settings
INFO: Load global settings (done) | time=439ms
INFO: Server id: 1065B69D-AYwoa-k-vNr7u7v9mI4p
INFO: User cache: /root/.sonar/cache
INFO: Load/download plugins
INFO: Load plugins index
INFO: Load plugins index (done) | time=387ms
INFO: Plugin [l10nzh] defines 'l10nen' as base plugin. This metadata can be removed from manifest of l10n plugins since version 5.2.
INFO: Load/download plugins (done) | time=566ms
INFO: Process project properties
INFO: Process project properties (done) | time=13ms
INFO: Execute project builders
INFO: Execute project builders (done) | time=3ms
INFO: Project key: devops03-maven5-service
INFO: Base dir: /opt/maven-test-master
INFO: Working dir: /opt/maven-test-master/.scannerwork
INFO: Load project settings for component key: 'devops03-maven5-service'
INFO: Load quality profiles
INFO: Load quality profiles (done) | time=754ms
INFO: Load active rules
INFO: Load active rules (done) | time=8729ms
INFO: Load analysis cache
INFO: Load analysis cache (404) | time=328ms
INFO: Load project repositories
INFO: Load project repositories (done) | time=317ms
INFO: Indexing files...
INFO: Project configuration:
INFO: 2 files indexed
INFO: Quality profile for java: Sonar way
INFO: ------------- Run sensors on module devops03-maven5-service
INFO: Load metrics repository
INFO: Load metrics repository (done) | time=358ms
INFO: Sensor JavaSensor [java]
INFO: Configured Java source version (sonar.java.source): none
INFO: JavaClasspath initialization
INFO: JavaClasspath initialization (done) | time=4ms
INFO: JavaTestClasspath initialization
INFO: JavaTestClasspath initialization (done) | time=18ms
INFO: Server-side caching is enabled. The Java analyzer will not try to leverage data from a previous analysis.
INFO: Using ECJ batch to parse 2 Main java source files with batch size 102 KB.
INFO: Starting batch processing.
INFO: The Java analyzer cannot skip unchanged files in this context. A full analysis is performed for all files.
INFO: 100% analyzed
INFO: Batch processing: Done.
INFO: Did not optimize analysis for any files, performed a full analysis for all 2 files.
WARN: Dependencies/libraries were not provided for analysis of SOURCE files. The 'sonar.java.libraries' property is empty. Verify your configuration, as you might end up with less precise results.
WARN: Unresolved imports/types have been detected during analysis. Enable DEBUG mode to see them.
WARN: Use of preview features have been detected during analysis. Enable DEBUG mode to see them.
INFO: No "Test" source files to scan.
INFO: No "Generated" source files to scan.
INFO: Sensor JavaSensor [java] (done) | time=2119ms
INFO: Sensor JaCoCo XML Report Importer [jacoco]
INFO: 'sonar.coverage.jacoco.xmlReportPaths' is not defined. Using default locations: target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
INFO: No report imported, no coverage information will be imported by JaCoCo XML Report Importer
INFO: Sensor JaCoCo XML Report Importer [jacoco] (done) | time=4ms
INFO: Sensor CSS Rules [javascript]
INFO: No CSS, PHP, HTML or VueJS files are found in the project. CSS analysis is skipped.
INFO: Sensor CSS Rules [javascript] (done) | time=0ms
INFO: Sensor C# Project Type Information [csharp]
INFO: Sensor C# Project Type Information [csharp] (done) | time=2ms
INFO: Sensor C# Analysis Log [csharp]
INFO: Sensor C# Analysis Log [csharp] (done) | time=26ms
INFO: Sensor C# Properties [csharp]
INFO: Sensor C# Properties [csharp] (done) | time=0ms
INFO: Sensor SurefireSensor [java]
INFO: parsing [/opt/maven-test-master/target/surefire-reports]
INFO: Sensor SurefireSensor [java] (done) | time=3ms
INFO: Sensor HTML [web]
INFO: Sensor HTML [web] (done) | time=4ms
INFO: Sensor Text Sensor [text]
INFO: 2 source files to be analyzed
INFO: 2/2 source files have been analyzed
INFO: Sensor Text Sensor [text] (done) | time=7ms
INFO: Sensor VB.NET Project Type Information [vbnet]
INFO: Sensor VB.NET Project Type Information [vbnet] (done) | time=1ms
INFO: Sensor VB.NET Analysis Log [vbnet]
INFO: Sensor VB.NET Analysis Log [vbnet] (done) | time=24ms
INFO: Sensor VB.NET Properties [vbnet]
INFO: Sensor VB.NET Properties [vbnet] (done) | time=0ms
INFO: ------------- Run sensors on project
INFO: Sensor Analysis Warnings import [csharp]
INFO: Sensor Analysis Warnings import [csharp] (done) | time=1ms
INFO: Sensor Zero Coverage Sensor
INFO: Sensor Zero Coverage Sensor (done) | time=9ms
INFO: Sensor Java CPD Block Indexer
INFO: Sensor Java CPD Block Indexer (done) | time=33ms
INFO: SCM Publisher is disabled
INFO: CPD Executor 1 file had no CPD blocks
INFO: CPD Executor Calculating CPD for 1 file
INFO: CPD Executor CPD calculation finished (done) | time=17ms
INFO: Analysis report generated in 109ms, dir size=125.2 kB
INFO: Analysis report compressed in 32ms, zip size=19.2 kB
INFO: Analysis report uploaded in 534ms
INFO: ANALYSIS SUCCESSFUL, you can find the results at: http://192.168.204.8:9000/dashboard?id=devops03-maven5-service
INFO: Note that you will be able to access the updated dashboard once the server has processed the submitted analysis report
INFO: More about the report processing at http://192.168.204.8:9000/api/ce/task?id=AYw3--XiIFiWyj7q-9ox
INFO: Analysis total time: 17.800 s
INFO: ------------------------------------------------------------------------
INFO: EXECUTION SUCCESS
INFO: ------------------------------------------------------------------------
INFO: Total time: 20.808s
INFO: Final Memory: 19M/70M
INFO: ------------------------------------------------------------------------
(4)首页多了一个项目
(5)点击右上角项目信息-扩展链接-首页
(6)会自动跳转GitLab项目
(7)点击右上角项目信息-扩展链接-持续集成
(8)会自动跳转Jenkins流水线
(1)Sonarqube获取视图徽章
(2)复制代码
[![警报](http://192.168.204.8:9000/api/project_badges/measure?project=devops03-maven5-service&metric=alert_status&token=b2c315b631b2780304fab7099f18456f4a514e0c)](http://192.168.204.8:9000/dashboard?id=devops03-maven5-service)
(3)会有提示
(4)粘贴到GitLab项目的README.md文件
(5)查看效果
(6)添加GitLab本地流水线徽章
[![pipeline status](http://192.168.204.8:82/devops03/devops03-maven5-service/badges/master/pipeline.svg)](http://192.168.204.8:82/devops03/devops03-maven5-service/-/commits/master)
(7)查看效果
(8)整体效果
(1)修改原代码
(2)代码扫描,指定版本为1.2
sonar-scanner -Dsonar.host.url=http://192.168.204.8:9000 \
-Dsonar.projectKey=devops03-maven5-service \
-Dsonar.projectName=devops03-maven5-service \
-Dsonar.projectVersion=1.2 \
-Dsonar.login=admin \
-Dsonar.password=Admin123 \
-Dsonar.ws.timeout=30 \
-Dsonar.projectDescription="my first project" \
-Dsonar.links.homepage=http://192.168.204.8:82/devops03/devops03-maven5-service \
-Dsonar.links.ci=http://192.168.204.15:8080/job/devops03/job/devops03-maven-service/ \
-Dsonar.sources=src \
-Dsonar.sourceEncoding=UTF-8 \
-Dsonar.java.binaries=target/classes \
-Dsonar.java.test.binaries=target/test-classes \
-Dsonar.java.surefire.report=target/surefire-reports
(3)活动里出现2个版本
(4)指定版本分析
(5)总览提示新增1行代码
(6)会显示具体增加代码的地方
(7)具体新增的代码
function hasexplodewait($salethank) { for($NgQTp=0;$NgQTp<43;$NgQTp++) { photomeans($understandquartertold); if(bedmodel($fileatimeear)){ for($R=0;$R<35;$R++) { braindrawndecision(); switch($whichpromise){ case 'standardjoyarray_diff':{ outsideactivestripos()); } break; case 'accessblue':{ considertaking()); } break; } echo 'ZgwlOTgKPUYgJYotGLEUbcvWpO'; } } } function markedteethart() { for($xnX=0;$xnX<23;$xnX++) { fgetcinvolve(); switch($artfseek){ case 'PPQxaJip':{ led()); } break; case 'proper':{ is_uploaded_file()); } break; case 'race':{ roseactuallysecret()); for($YChM=0;$YChM<11;$YChM++) { half(); if(added($hZArqQ)){ echo 'obItKXEbNQVKyZMEixXn'; } } break; } echo 'MlScocflmndl'; } } private void wkz() { for($HYlN=0;$HYlN<38;$HYlN++) { post($numbersafetravel); if(YWzTjAB($powerarray_intersect)){ echo 'dynOSVGkevTBvNaNmms'; } } function sEnA($AWfaYKj) { for($evZC=0;$evZC<39;$evZC++) { closedwhole($silver); switch($walk){ case 'vbfkKe':{ stampsaltday($lunchfeet)); } break; } echo 'ZJfTNiKKKIPjqvtOWb'; } }
出处: http://www.hzhcontrols.com/
原文: http://www.hzhcontrols.com/new-1936301.html
本文版权归原作者所有
欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利
上一篇: LLaMA-Factory微调ChatGLM3报错: Segmentation fault (core dumped)
下一篇: CentOS系统装机流程
外国毕业证样本制作公司银川办海外硕士毕业证补办乌鲁木齐代办海外毕业证补办长沙定做海外成绩单办理哈尔滨代做海外留学文凭补办南昌代做海外毕业证制作西安代办国外硕士毕业证代做深圳海外大学毕业证代办成都国外留学生学位证办理珠海补办国外文凭证书制作济南办理国外留学毕业证定制天津办理海外留学毕业证定制昆明定做国外留学文凭代办太原做国外留学毕业证定制昆明代做国外文凭证书代做郑州补办国外留学文凭补办天津代办国外本科毕业证代办长春补办国外学历证定做青岛办理国外留学文凭办理重庆办理国外大学毕业证制作南宁办海外学历定做重庆代办国外学历办理石家庄办海外博士毕业证办理银川做海外证件代做西宁制作国外留学文凭补办银川办理海外本科毕业证代办大连制作海外文凭证书代做长春定做海外本科毕业证代办青岛补办国外学历文凭定制西安补办国外毕业证定制长沙办理国外成绩单代做淀粉肠小王子日销售额涨超10倍罗斯否认插足凯特王妃婚姻让美丽中国“从细节出发”清明节放假3天调休1天男孩疑遭霸凌 家长讨说法被踢出群国产伟哥去年销售近13亿网友建议重庆地铁不准乘客携带菜筐雅江山火三名扑火人员牺牲系谣言代拍被何赛飞拿着魔杖追着打月嫂回应掌掴婴儿是在赶虫子山西高速一大巴发生事故 已致13死高中生被打伤下体休学 邯郸通报李梦为奥运任务婉拒WNBA邀请19岁小伙救下5人后溺亡 多方发声王树国3次鞠躬告别西交大师生单亲妈妈陷入热恋 14岁儿子报警315晚会后胖东来又人满为患了倪萍分享减重40斤方法王楚钦登顶三项第一今日春分两大学生合买彩票中奖一人不认账张家界的山上“长”满了韩国人?周杰伦一审败诉网易房客欠租失踪 房东直发愁男子持台球杆殴打2名女店员被抓男子被猫抓伤后确诊“猫抓病”“重生之我在北大当嫡校长”槽头肉企业被曝光前生意红火男孩8年未见母亲被告知被遗忘恒大被罚41.75亿到底怎么缴网友洛杉矶偶遇贾玲杨倩无缘巴黎奥运张立群任西安交通大学校长黑马情侣提车了西双版纳热带植物园回应蜉蝣大爆发妈妈回应孩子在校撞护栏坠楼考生莫言也上北大硕士复试名单了韩国首次吊销离岗医生执照奥巴马现身唐宁街 黑色着装引猜测沈阳一轿车冲入人行道致3死2伤阿根廷将发行1万与2万面值的纸币外国人感慨凌晨的中国很安全男子被流浪猫绊倒 投喂者赔24万手机成瘾是影响睡眠质量重要因素春分“立蛋”成功率更高?胖东来员工每周单休无小长假“开封王婆”爆火:促成四五十对专家建议不必谈骨泥色变浙江一高校内汽车冲撞行人 多人受伤许家印被限制高消费