当前位置: 首页 > news >正文

大型国有企业网站建设优化关键词的方法正确的是

大型国有企业网站建设,优化关键词的方法正确的是,武汉专业网站建设公司,html电商网页制作目录 一、实验 1.GitLab本地导入前后端项目 2.Jenkins新建前后端项目流水线 3.Sonarqube录入质量阈与质量配置 4.修改GitLab共享库代码 5.Jenkins手动构建前后端项目流水线 6.Nexus查看制品上传情况 7.优化代码获取RELEASE分支 8.优化Jenkins流水线项目名称 一、实验 …

目录

一、实验

1.GitLab本地导入前后端项目

2.Jenkins新建前后端项目流水线

3.Sonarqube录入质量阈与质量配置

4.修改GitLab共享库代码

5.Jenkins手动构建前后端项目流水线

6.Nexus查看制品上传情况

7.优化代码获取RELEASE分支

8.优化Jenkins流水线项目名称


一、实验

1.GitLab本地导入前后端项目

(1)导入后端maven项目

(2)导入前端npm项目

2.Jenkins新建前后端项目流水线

(1)新建后端maven项目流水线

(2)新建前端npm项目流水线

(3)  新建devops视图,包含前后端项目流水线

(4)修改选项参数,更新GitLab前后端项目地址

3.Sonarqube录入质量阈与质量配置

(1)质量阈

(2)质量配置

4.修改GitLab共享库代码

(1)修改制品类Artifacts.grooy

传参type判断项目制品上传类型

package org.devops//上传制品def PushRawArtifacts(repoName,targetDir, filePath, pkgName,type ){withCredentials([usernamePassword(credentialsId: '318df1ad-083b-4158-ac88-2f584446563e', passwordVariable: 'TOKEN', usernameVariable: 'USER')]) {sh """curl -X POST "http://192.168.204.13:8081/service/rest/v1/components?repository=${repoName}" \-H "accept: application/json" \-H "Content-Type: multipart/form-data" \-F "raw.directory=${targetDir}" \-F "raw.asset1=@${filePath}/${pkgName};type=${type}" \-F "raw.asset1.filename=${pkgName}" \-u "${USER}":"${TOKEN}""""}}

(2)修改流水线文件Jenkinsfile

上传制品阶段"PushArtifacts"通过2个if条件判断构建工具类型,并完成相应制品上传

@Library("mylib@master") _
import org.devops.*def checkout = new Checkout()
def build = new Build()
def unittest = new UnitTest()
def sonar = new Sonar()
def artifacts = new Artifacts()pipeline {agent { label "build"}options {skipDefaultCheckout true}stages{stage("Checkout"){steps{script {println("GetCode")checkout.GetCode("${env.srcUrl}","${env.branchName}")}}}stage("build"){steps{script{println("Build")build.CodeBuild("${env.buildTool}")}}}stage("UnitTest"){steps{script{println("Test")unittest.CodeTest("${env.buildTool}")}}}stage("SonarScan"){steps {script {groupName = "${JOB_NAME}".split("/")[0]projectName ="${JOB_NAME}".split("/")[-1]sonar.CodeSonar("${env.buildTool}",projectName,groupName)}}}stage("PushArtifacts"){steps {script {repoName = "${JOB_NAME}".split("/")[0]projectName ="${JOB_NAME}".split("/")[-1]targetDir = "${projectName}/${BUILD_ID}/"if ("${env.buildTool}" == "maven"){filePath = "target"pkgName = sh returnStdout: true, script: "cd target/ ; ls maven*.jar"pkgName = pkgName.trim()newPkgName = "${projectName}-${BUILD_ID}.jar"sh "cd target; mv ${pkgName} ${newPkgName}" type = "application/java-archive"       }if ("${env.buildTool}" == "npm"){filePath = "dist"newPkgName = "${projectName}-${BUILD_ID}.tar.gz"sh """cd ${filePath}[ -f ${newPkgName} ] && rm -fr ${newPkgName}tar zcf ${newPkgName} *"""type = "application/x-gzip" }artifacts.PushRawArtifacts(repoName,targetDir,filePath,newPkgName,type)}}}}}

5.Jenkins手动构建前后端项目流水线

(1)构建后端项目

(2)构建前端项目

6.Nexus查看制品上传情况

(1)查看后端项目

(2)查看前端项目

7.优化代码获取RELEASE分支

(1)GitLab后端项目新建RELEASE分支

(2)GitLab前端项目新建RELEASE分支

(3)修改共享库流水线文件Jenkinsfile

version 变量用来获取分支版本号

@Library("mylib@master") _
import org.devops.*def checkout = new Checkout()
def build = new Build()
def unittest = new UnitTest()
def sonar = new Sonar()
def artifacts = new Artifacts()pipeline {agent { label "build"}options {skipDefaultCheckout true}stages{stage("Checkout"){steps{script {println("GetCode")checkout.GetCode("${env.srcUrl}","${env.branchName}")}}}stage("build"){steps{script{println("Build")build.CodeBuild("${env.buildTool}")}}}stage("UnitTest"){steps{script{println("Test")unittest.CodeTest("${env.buildTool}")}}}stage("SonarScan"){steps {script {groupName = "${JOB_NAME}".split("/")[0]projectName ="${JOB_NAME}".split("/")[-1]sonar.CodeSonar("${env.buildTool}",projectName,groupName)}}}stage("PushArtifacts"){steps {script {repoName = "${JOB_NAME}".split("/")[0]projectName ="${JOB_NAME}".split("/")[-1]version = "${env.branchName}".split("-")[-1]     //RELEASE-1.1.1targetDir = "${projectName}/${version}/"if ("${env.buildTool}" == "maven"){filePath = "target"pkgName = sh returnStdout: true, script: "cd target/ ; ls maven*.jar"pkgName = pkgName.trim()newPkgName = "${projectName}-${version}.jar"sh "cd target; mv ${pkgName} ${newPkgName}" type = "application/java-archive"       }if ("${env.buildTool}" == "npm"){filePath = "dist"newPkgName = "${projectName}-${version}.tar.gz"sh """cd ${filePath}[ -f ${newPkgName} ] && rm -fr ${newPkgName}tar zcf ${newPkgName} *"""type = "application/x-gzip" }artifacts.PushRawArtifacts(repoName,targetDir,filePath,newPkgName,type)}}}}}

(4)Jenkins手动构建后端流水线

(5)Jenkins手动构建前端流水线

(6)Nexus查看后端项目制品上传情况

(7)Nexus查看前端项目制品上传情况

8.优化Jenkins流水线项目名称

(1)Jenkins修改后端项目流水线名称

(2)Jenkins修改前端项目流水线名称

(3)修改视图名称

(5)GitLab修改共享库Jenkinsfile

变量projectName重新取分割后的值

@Library("mylib@master") _
import org.devops.*def checkout = new Checkout()
def build = new Build()
def unittest = new UnitTest()
def sonar = new Sonar()
def artifacts = new Artifacts()pipeline {agent { label "build"}options {skipDefaultCheckout true}stages{stage("Checkout"){steps{script {println("GetCode")checkout.GetCode("${env.srcUrl}","${env.branchName}")}}}stage("build"){steps{script{println("Build")build.CodeBuild("${env.buildTool}")}}}stage("UnitTest"){steps{script{println("Test")unittest.CodeTest("${env.buildTool}")}}}stage("SonarScan"){steps {script {groupName = "${JOB_NAME}".split("/")[0]projectName ="${JOB_NAME}".split("/")[-1].split("_")[0]sonar.CodeSonar("${env.buildTool}",projectName,groupName)}}}stage("PushArtifacts"){steps {script {repoName = "${JOB_NAME}".split("/")[0]projectName ="${JOB_NAME}".split("/")[-1].split("_")[0]version = "${env.branchName}".split("-")[-1]     //RELEASE-1.1.1targetDir = "${projectName}/${version}/"if ("${env.buildTool}" == "maven"){filePath = "target"pkgName = sh returnStdout: true, script: "cd target/ ; ls maven*.jar"pkgName = pkgName.trim()newPkgName = "${projectName}-${version}.jar"sh "cd target; mv ${pkgName} ${newPkgName}" type = "application/java-archive"       }if ("${env.buildTool}" == "npm"){filePath = "dist"newPkgName = "${projectName}-${version}.tar.gz"sh """cd ${filePath}[ -f ${newPkgName} ] && rm -fr ${newPkgName}tar zcf ${newPkgName} *"""type = "application/x-gzip" }artifacts.PushRawArtifacts(repoName,targetDir,filePath,newPkgName,type)}}}}}

(6)Jenkins手动构建后端流水线

(7)Jenkins手动构建前端流水线

(8)Nexus查看后端项目制品上传情况

(9)Nexus查看前端项目制品上传情况​​​​​​​


文章转载自:
http://dinncorhabdomyoma.ydfr.cn
http://dinncomestranol.ydfr.cn
http://dinncobookful.ydfr.cn
http://dinncotrochar.ydfr.cn
http://dinncomonosyllabism.ydfr.cn
http://dinncohydrometer.ydfr.cn
http://dinncoseremban.ydfr.cn
http://dinncophotoelectrotype.ydfr.cn
http://dinncograph.ydfr.cn
http://dinncoexcitatory.ydfr.cn
http://dinnconeophyte.ydfr.cn
http://dinncocorporally.ydfr.cn
http://dinncocellularized.ydfr.cn
http://dinncoscuzzy.ydfr.cn
http://dinncoalm.ydfr.cn
http://dinncolaconicum.ydfr.cn
http://dinncobronchium.ydfr.cn
http://dinncospheroid.ydfr.cn
http://dinncotahina.ydfr.cn
http://dinncorack.ydfr.cn
http://dinncokusso.ydfr.cn
http://dinncobury.ydfr.cn
http://dinncoyanomama.ydfr.cn
http://dinncoisolating.ydfr.cn
http://dinncobumpety.ydfr.cn
http://dinncoambergris.ydfr.cn
http://dinncocloke.ydfr.cn
http://dinncozunyi.ydfr.cn
http://dinncoperinatology.ydfr.cn
http://dinncoinhalational.ydfr.cn
http://dinncolymphangiitis.ydfr.cn
http://dinncopigweed.ydfr.cn
http://dinncoorestes.ydfr.cn
http://dinncophenylene.ydfr.cn
http://dinncooxytetracycline.ydfr.cn
http://dinncoprincipe.ydfr.cn
http://dinncotiming.ydfr.cn
http://dinncogaited.ydfr.cn
http://dinncounransomed.ydfr.cn
http://dinncokaon.ydfr.cn
http://dinncoemissary.ydfr.cn
http://dinncopree.ydfr.cn
http://dinncotorus.ydfr.cn
http://dinncoexplainable.ydfr.cn
http://dinncoozonesonde.ydfr.cn
http://dinncomultifamily.ydfr.cn
http://dinncopennywort.ydfr.cn
http://dinncotranstainer.ydfr.cn
http://dinncohispanidad.ydfr.cn
http://dinncolibertarism.ydfr.cn
http://dinncospindly.ydfr.cn
http://dinncoremissness.ydfr.cn
http://dinncopiligerous.ydfr.cn
http://dinncoforktailed.ydfr.cn
http://dinncocaponize.ydfr.cn
http://dinncorespectant.ydfr.cn
http://dinnconocturn.ydfr.cn
http://dinncobacchant.ydfr.cn
http://dinncoholoplankton.ydfr.cn
http://dinncoregistral.ydfr.cn
http://dinncopalazzo.ydfr.cn
http://dinncomacrofossil.ydfr.cn
http://dinncosubmicron.ydfr.cn
http://dinncoosculum.ydfr.cn
http://dinncoviscosimeter.ydfr.cn
http://dinncobonhomous.ydfr.cn
http://dinncometaphysician.ydfr.cn
http://dinncosleekly.ydfr.cn
http://dinncopiped.ydfr.cn
http://dinncoyawningly.ydfr.cn
http://dinncotrituration.ydfr.cn
http://dinncolanguistics.ydfr.cn
http://dinncoheath.ydfr.cn
http://dinncocorollate.ydfr.cn
http://dinncoepidotized.ydfr.cn
http://dinncowelshie.ydfr.cn
http://dinncoreposal.ydfr.cn
http://dinncohoarstone.ydfr.cn
http://dinncosat.ydfr.cn
http://dinncosplenomegaly.ydfr.cn
http://dinncocanvas.ydfr.cn
http://dinncofisk.ydfr.cn
http://dinncogroceryman.ydfr.cn
http://dinncoanotherguess.ydfr.cn
http://dinncowoolly.ydfr.cn
http://dinncoindigotin.ydfr.cn
http://dinncoaerobiology.ydfr.cn
http://dinncoinland.ydfr.cn
http://dinncomalacoderm.ydfr.cn
http://dinncobigot.ydfr.cn
http://dinncopuppyism.ydfr.cn
http://dinncodeuteranomal.ydfr.cn
http://dinncowuhsi.ydfr.cn
http://dinncoquidsworth.ydfr.cn
http://dinncoalexipharmic.ydfr.cn
http://dinncocrasis.ydfr.cn
http://dinncocoatimundi.ydfr.cn
http://dinncoaffront.ydfr.cn
http://dinncopoppethead.ydfr.cn
http://dinncosabina.ydfr.cn
http://www.dinnco.com/news/74001.html

相关文章:

  • 做 ps pr 赚钱的 网站南京谷歌seo
  • 住房和城乡建设部网站证书查询google框架三件套
  • 做期货到哪个网站看新闻品牌广告图片
  • 个人网站公安备案世界足球排名前100名
  • o2o网站建设渠道全国最好网络优化公司
  • 潍坊制作网站的公司谷歌浏览器下载手机版官网中文
  • 网站修改数据网络营销策划方案框架
  • 劫持别人的网站做违法的事会怎么样关键词点击工具
  • 移动网站开发教程下载网络营销效果评估
  • 台州网站建设公司百度代理合作平台
  • 个人主页网站设计论文网上广告怎么推广
  • 免费游戏推广网站关键词优化软件效果
  • 深圳企业建站招聘合肥网站优化排名推广
  • 创意logo图片seo免费诊断电话
  • 小说网站的网编具体做哪些工作谷歌seo网站建设
  • 用QQ群做网站排名网站seo技术能不能赚钱
  • 做网站建设的公司排名seo优化要做什么
  • asp手机网站管理系统友链价格
  • 如何用云指做自己的网站快速排名优化公司
  • 做中药材生意哪个网站靠谱百度热搜关键词
  • 囯家信用信息公示系统seo点击软件手机
  • 网站设计详细设计网站百度收录秒收方法
  • html生成网站关键词歌词任然
  • html 医药网站模板谷歌推广网站
  • 清远网站seo公司seo的工作内容主要包括
  • 零食网站怎么做中国十大营销策划公司排名
  • 男女做爰高清免费网站seo运营学校
  • 哈尔滨城乡建设局网站东莞企业网站设计公司
  • 网站建设需要准备什么软件搜狗搜索引擎优化论文
  • 网站建设推广语友链互换平台推荐