Commit 99d5edd4 authored by daidekun's avatar daidekun

checkout 逻辑

parent 79d5a139
......@@ -56,6 +56,27 @@ def checkout(branchName, systemName) {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: git_path
}
def checkout_nodejs(branchName, systemName) {
git_path = project_attr(systemName)["gitPath"]
def folder = new File( '.git/hooks/' )
if( !folder.exists() ) {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: git_path
def bowerFile = fileExists './bower.json'
if (bowerFile) {
sh "bower install --allow-root"
}
sh "npm install"
}else{
sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-merge .git/hooks/"
sh "chmod +x .git/hooks/post-merge"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: git_path
}
}
def checkout_lua_ui(branchName, gitRepo) {
if(gitRepo.contains("--")){
t1 = gitRepo.split("/")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment