jenkins-pipeline-dataengine1.0-CI

  

 jenkins-pipeline-dataengine1.0-CI

  

# !groovy {


时间戳   

group_id=癳nn.cn.encdata"
artifact_id=癲ataengine1.0"
version=啊?br/>包装=皌ar.gz"
artifact_description=癲ataengine1.0 artifacts"
group_id_path=group_id.replaceAll (“\ !”,“/?
nexus_encdata_ci_url=癶ttp://101.139.139.153:38090/服务/地方/仓库/encdata-ci/content"

  {

节点remote_rootdir=WORKSPACE.replaceAll (“/workspace/$ {JOB_BASE_NAME}“,““)

  
 <代码>阶段(“结帐dataengine1.0”) {
  git_repo_url=" ssh://git@101.139.139.318:12020/$ {repo_name}”//付款([$类:GitSCM,分支:[[名称:“*/$ {branch_name} "]], doGenerateSubmoduleConfigurations:假的,扩展:[[$类:RelativeTargetDirectory, relativeTargetDir:“$ {working_dir} "],[$类:CheckoutOption,超时:100]],submoduleCfg: [], userRemoteConfigs: [[credentialsId: gitlab-10.7.0, url:“$ {git_repo_url} "))))//付款([$类:GitSCM,分支:[[名称:“*/$ {branch_name} "]], doGenerateSubmoduleConfigurations:假的,扩展:[[$类:RelativeTargetDirectory, relativeTargetDir:“$ {working_dir} "],[$类:CheckoutOption,超时:100]],submoduleCfg: [], userRemoteConfigs: [[url:“$ {git_repo_url} "))))
  
  sh”““如果[- d $ {working_dir}/it];然后
  cd $ {working_dir};
  current_branch=\ $ (git分支| sed - e " s/\ \ *//g ");
  如果[\ \ $ {current_branch} \“!=\ " $ {branch_name} \ ");然后
  git checkout - f。
  git checkout - b $ {branch_name};
  git将$ {git_repo_url} $ {branch_name};
  其他的
  git checkout - f。
  git将$ {git_repo_url} $ {branch_name};
  fi
  其他的
  git克隆$ {git_repo_url} - b $ {branch_name} $ {working_dir};
  fi”“”
  
  }
  
  阶段(“构建dataengine1.0”) {
  sh”cd $ {working_dir},,pwd,,cd dataengine-parent,,mvn清洁编译包-DskipTests=true”//sh”cd $ {working_dir},,cd 03 src/61 updatesvr/updateapp prj_linux64_ubuntu,,使清洁,,使调试:=1”//sh”cd $ {working_dir},,cp $ {remote_rootdir}/服务器/mvsapp 01 bin/部署/MVS.Server/update_3.0.1。x和,cp $ {remote_rootdir}/服务器/监督。从01 bin/部署/MVS.Server/update_3.0.1。x和,cp射频01 bin/algorithmconfig 01 bin/部署/MVS.Server/update_3.0.1。x和,cd 01 bin/部署/MVS.Server/update_3.0.1。x和,日期=\ $(日期),,sed - i \/3. x.x。x/$ {product_version}/g \”配置。xml和,sed - i \/3. x.x。x/$ {product_version}/g \“更新。xml和,sed - i \ " s/mvs_compile_date/\ ${日期}/g \ " update.xml”//sh”cd $ {working_dir},,cd 01 bin/部署/MVS。服务器,,cp射频update_3.0.1。x update_ $ {product_version},,rm射频update_3.0.1.x”//sh”cd $ {working_dir},,cd 01 bin/部署,,rm射频MVS_ * _Server,,rm - f MVS_ * _Server。邮政,,mkdir MVS_ $ {product_version} _Server,,cp射频MVS。服务器/* MVS_ $ {product_version} _Server”
  }
  
  阶段(“SonarQube分析”){
  sh”cd $ {working_dir},,cd dataengine-parent,,mvn声纳:声纳-Dsonar.projectKey=dataengine1.0 -Dsonar.host.url=http://101.139.139.153:19000 -Dsonar.login=2 f878304a05ab656bce3e9fd0fe948f7eefbd6d4”//sh”cd $ {working_dir},,cd代理网关,,mvn - b -Dmaven.test。跳过=true清洁包”
  
  }
  
  阶段(“释放NexusOSS”) {//sh”cd $ {working_dir},,pwd,,cd dataengine-core/目标,,mvn部署:deploy-file -DgroupId=com。encdata -DartifactId=dataengine -Dversion=0.0.1-SNAPSHOT -Dpackaging=jar -Dfile=/数据/jenkins/workspace/pipeline-dataengine1.0-CI/dataengine1.0/dataengine-core/目标/数据引擎。jar -Durl=http://101.139.139.153:88090/联系/内容/仓库//-DrepositoryId=快照快照”//sh”cd $ {working_dir},,cd代理网关,,mvn - b -Dmaven.test。跳过=true清洁包”
  
  }
  
  阶段(“释放测试”){//sh”cd $ {working_dir},,pwd,,cd dataengine-core/目标,,scp数据引擎。jar root@101.119.146.100:/mnt/数据/部署/scmdeploy”//sh”cd $ {working_dir},,pwd,,mvn部署:deploy-file -DgroupId=com。encdata -DartifactId=web-bcm -Dversion=1.0快照-Dpackaging=jar -Dfile=/数据/jenkins/workspace/build-BASE-COMPONENTS-CI/基本组件/目标/web-bcm。jar -Durl=http://101.139.139.153:88090/联系/内容/仓库//-DrepositoryId=快照快照”//sh”cd $ {working_dir},,cd代理网关,,mvn - b -Dmaven.test。跳过=true清洁包”
  }
  
  阶段(“部署131”){//sh”cd $ {working_dir},,pwd,,cd dataengine-core/目标,,scp数据引擎。jar root@101.119.151.131:/mnt/数据/部署/scmdeploy”//sh”cd $ {working_dir},,pwd,,mvn部署:deploy-file -DgroupId=com。encdata -DartifactId=web-bcm -Dversion=1.0快照-Dpackaging=jar -Dfile=/数据/jenkins/workspace/build-BASE-COMPONENTS-CI/基本组件/目标/web-bcm。null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null
  null

jenkins-pipeline-dataengine1.0-CI