Skip to content

2.5构建ontheway

1_6_DeployToMaven_ontheway

General Settings

Artifact paths: target\bus-server-0.0.1-SNAPSHOT.jar

VCS Root

https://gitee.com/liuchenyunol/On-The-Way-for-Web.git

Checkout Rules:
+:ontheway-server => .

Build Step: Maven

Goals: clean install
Path to POM file: pom.xml

Maven Settings
Maven: auto
User settings selection: settings-maven-liuchenyun.xml

Artifact repository: Per agent

Triggers

Trigger a build on each check-in  勾选及以下

Use default value (60 seconds) // 选择默认60秒

Trigger rules: 
+:microservices/source-code/online-microservices/pom.xml

2_NVDAnalyst

依赖检测

3_SonarQube

sonar分析项目

4_Docker_latest

latest最新版本,用于测试环境

4_DistributePackages_Docker_ontheway

distribution_ontheway
https://gitee.com/liuchenyunol/distribution_liuchenyunol.git

Checkout Rules
+:docker-compose/Dockerfile_ontheway => .

Build Step

1:
build images
chmod +x ./build.sh && ./build.sh %build.number%
2:
update image
192.168.31.157
sudo kubectl get pod |grep online-ontheway| awk '{print $1}' | xargs kubectl delete pod

Authentication method :Password // 注意第二步选Password进行ssh

Triggers

VCS Trigger   // 默认60秒

Finish Build Trigger
Wait for a successful build in: liuchenyun-online-microservices / 1_DeployToMaven / 1_3_DeployToMaven_mobilelicense
Branch filter:
+:<default>  // 选择第一步的路径

Build Features

Docker Support

Dependencies

Snapshot Dependencies
选第一步打包路径,形成执行链条,打通trigger

Artifact Dependencies
选第一步打包路径,设置bus-server-0.0.1-SNAPSHOT.jar => .

5_Docker_formal

用于生产的正式版本

4_DistributePackages_Docker_ontheway_trunk

Version Control Settings

选的时候直接选第二步的,会复制下来

// 外面设置目录
Checkout Rules
+:docker-compose/Dockerfile_ontheway => .

Build Step

chmod +x ./build_trunk.sh && ./build_trunk.sh

Build Features

Docker Support