jenkins构建案例
案例:后端项目
1.创建git项目仓库
Git 全局设置
git config --global user.name "蒙仕业"git config --global user.email "mengsy@bwoil.com"创建一个新仓库
git clone http://192.168.102.84:10080/mengsy/backend.gitcd backendtouch README.mdgit add README.mdgit commit -m "add README"git push -u origin master案例:前端项目
1.创建git项目仓库 frontend
GIT地址: http://192.168.102.84:10080/mengsy/frontend.git
2.clone 仓库及准备版本文件
3.创建分支并切换分支
4.文件准备及提交到dev分支(分支名称可改)
5.jenkins 配置,多分支流水线
前端nodejs项目:
GIT项目地址:http://192.168.102.84:10080/mengsy/frontend.git
根据名称过滤: dev
Build Configuration
script path (打包调用的脚本名称)
nodejs-jenkinsfile-repo
Fallback Branch
master
Jenkinsfile SCM
GIT
Repository URL
#http://192.168.102.84:10080/devops/meta-tools/jenkins.git
http://192.168.102.84:10080/mengsy/devops.git
指定分支
*/master