Jenkins单个git仓库多个项目

时间:2018-05-25 10:06:50

标签: jenkins

项目代码结构:

$ git clone git@git-server:/data/git/project.git

$ tree -L 1 project
.
├── pushServer
├── README
├── redis_cloud_task
├── Time
├── access
├── business
├── business_client
├── common
├── parent
└── web

$ tree -L 1 project/pushServer/
pushServer/
├── cert
├── config
├── lib
├── pom.xml
├── resource
├── src
└── WebRoot

我应该如何在jenkins中配置它们?它们都是java web项目。

例如,在配置常见项目时,在jenkins中配置git源只能配置为git @ git-server:/data/git/project.git。

maven config 1

maven config 2

构建

Building in workspace /data/srv/tomcat/jenkins/workspace/common
 > git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > git config remote.origin.url git@git-server:/data/git/project.git # timeout=10
Fetching upstream changes from git@git-server:/data/git/project.git
 > git --version # timeout=10
 > git fetch --tags --progress git@git-server:/data/git/project.git +refs/heads/*:refs/remotes/origin/*
 > git rev-parse origin/${branch_tag}^{commit} # timeout=10
 > git rev-parse ${branch_tag}^{commit} # timeout=10
ERROR: Couldn't find any revision to build. Verify the repository and branch configuration for this job.
Finished: FAILURE

0 个答案:

没有答案