Commit 4cc3475b authored by zhijie.xue's avatar zhijie.xue

替换为海元的jenkins credentials

parent e0f9b104
...@@ -14,9 +14,9 @@ def sonaar_check(GIT_REPO_NAME,GIT_BRANCH,currentPath){ ...@@ -14,9 +14,9 @@ def sonaar_check(GIT_REPO_NAME,GIT_BRANCH,currentPath){
sonarScanner = "/home/quant_group/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar/bin/sonar-scanner" sonarScanner = "/home/quant_group/jenkins_home/tools/hudson.plugins.sonar.SonarRunnerInstallation/sonar/bin/sonar-scanner"
currentPath = sh (script: 'pwd',returnStdout: true).trim() currentPath = sh (script: 'pwd',returnStdout: true).trim()
git branch: "${GIT_BRANCH}", credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "${GIT_REPO_SSH_URL}" git branch: "${GIT_BRANCH}", credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: "${GIT_REPO_SSH_URL}"
/* git commit: "${GIT_BRANCH}", credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "${GIT_REPO_SSH_URL}"*/ /* git commit: "${GIT_BRANCH}", credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: "${GIT_REPO_SSH_URL}"*/
sh "${sonarScanner} -e \ sh "${sonarScanner} -e \
-Dsonar.host.url=http://sonar.quantgroups.com \ -Dsonar.host.url=http://sonar.quantgroups.com \
......
...@@ -28,7 +28,7 @@ def checkout(GIT_REPO,BRANCH_NAME){ ...@@ -28,7 +28,7 @@ def checkout(GIT_REPO,BRANCH_NAME){
body =[:] body =[:]
def projectAttr = project_attr(GIT_REPO) def projectAttr = project_attr(GIT_REPO)
git_path = projectAttr["git_path"] git_path = projectAttr["git_path"]
git branch: "${BRANCH_NAME}", credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "${git_path}" git branch: "${BRANCH_NAME}", credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: "${git_path}"
def branchHashCode = sh (script: 'git log -1 --pretty=%H',returnStdout: true).trim() def branchHashCode = sh (script: 'git log -1 --pretty=%H',returnStdout: true).trim()
echo "branchHashCode: ${branchHashCode} with 'git log -1 --pretty=%H'" echo "branchHashCode: ${branchHashCode} with 'git log -1 --pretty=%H'"
body["branchHash"] = branchHashCode body["branchHash"] = branchHashCode
......
...@@ -140,7 +140,7 @@ def checkout_java(systemName, branchName) { ...@@ -140,7 +140,7 @@ def checkout_java(systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["gitPath"] def gitPath =projectAttr["gitPath"]
def configPath = projectAttr["configPath"] def configPath = projectAttr["configPath"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
//if(systemName =="credit_league"){ //if(systemName =="credit_league"){
// sh "cp -rf /home/quant_group/config_repository/java/${systemName}.properties ${configPath}/application.properties" // sh "cp -rf /home/quant_group/config_repository/java/${systemName}.properties ${configPath}/application.properties"
...@@ -150,7 +150,7 @@ def checkout_java(systemName, branchName) { ...@@ -150,7 +150,7 @@ def checkout_java(systemName, branchName) {
def checkout_python(systemName, branchName) { def checkout_python(systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["gitPath"] def gitPath =projectAttr["gitPath"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
def checkout_nodejs(systemName, branchName) { def checkout_nodejs(systemName, branchName) {
...@@ -173,7 +173,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -173,7 +173,7 @@ def checkout_nodejs(systemName, branchName) {
echo "${currentPath}/.git/hooks" echo "${currentPath}/.git/hooks"
if( !folder.exists()){ if( !folder.exists()){
echo ">>>>>>>>> first git clone" echo ">>>>>>>>> first git clone"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def bowerFile = fileExists './bower.json' def bowerFile = fileExists './bower.json'
if (bowerFile) { if (bowerFile) {
sh "bower install --allow-root" sh "bower install --allow-root"
...@@ -183,7 +183,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -183,7 +183,7 @@ def checkout_nodejs(systemName, branchName) {
echo ">>>>>>>>> not first git clone" echo ">>>>>>>>> not first git clone"
sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
sh "chmod +x .git/hooks/post-checkout" sh "chmod +x .git/hooks/post-checkout"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
sh "npm install" sh "npm install"
...@@ -216,7 +216,7 @@ def checkout_luaui(systemName, branchName) { ...@@ -216,7 +216,7 @@ def checkout_luaui(systemName, branchName) {
echo ">>>>>>> first checkout project ${systemName}" echo ">>>>>>> first checkout project ${systemName}"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def bowerResult = ext_bower_install() def bowerResult = ext_bower_install()
def npmResult = ext_npm_intall() def npmResult = ext_npm_intall()
...@@ -244,7 +244,7 @@ def checkout_luaui(systemName, branchName) { ...@@ -244,7 +244,7 @@ def checkout_luaui(systemName, branchName) {
if(!packejson.exists()){ if(!packejson.exists()){
echo ">>>>>>> is simple ui project" echo ">>>>>>> is simple ui project"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def dist = fileExists './dist' def dist = fileExists './dist'
if(!dist){ if(!dist){
sh "mkdir dist" sh "mkdir dist"
...@@ -255,7 +255,7 @@ def checkout_luaui(systemName, branchName) { ...@@ -255,7 +255,7 @@ def checkout_luaui(systemName, branchName) {
sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
sh "chmod +x .git/hooks/post-checkout" sh "chmod +x .git/hooks/post-checkout"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
sh "sudo npm install" sh "sudo npm install"
} }
......
...@@ -315,13 +315,13 @@ def checkout_java(systemName, branchName) { ...@@ -315,13 +315,13 @@ def checkout_java(systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["git_path"] def gitPath =projectAttr["git_path"]
def configPath = projectAttr["config_path"] def configPath = projectAttr["config_path"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
def checkout_python(systemName, branchName) { def checkout_python(systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["git_path"] def gitPath =projectAttr["git_path"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
def checkout_nodejs(systemName, branchName) { def checkout_nodejs(systemName, branchName) {
...@@ -335,7 +335,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -335,7 +335,7 @@ def checkout_nodejs(systemName, branchName) {
echo "${currentPath}/.git/hooks" echo "${currentPath}/.git/hooks"
if( !folder.exists()){ if( !folder.exists()){
echo ">>>>>>>>> first git clone" echo ">>>>>>>>> first git clone"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def bowerFile = fileExists './bower.json' def bowerFile = fileExists './bower.json'
if (bowerFile) { if (bowerFile) {
sh "bower install --allow-root" sh "bower install --allow-root"
...@@ -345,7 +345,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -345,7 +345,7 @@ def checkout_nodejs(systemName, branchName) {
echo ">>>>>>>>> not first git clone" echo ">>>>>>>>> not first git clone"
// sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" // sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
// sh "chmod +x .git/hooks/post-checkout" // sh "chmod +x .git/hooks/post-checkout"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
// sh "npm install" // sh "npm install"
} }
...@@ -373,7 +373,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -373,7 +373,7 @@ def checkout_nodejs(systemName, branchName) {
if(!hookfolder.exists()){ if(!hookfolder.exists()){
echo ">>>>>>> first checkout project ${systemName}" echo ">>>>>>> first checkout project ${systemName}"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def bowerResult = ext_bower_install() def bowerResult = ext_bower_install()
def npmResult = ext_npm_intall() def npmResult = ext_npm_intall()
...@@ -398,7 +398,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -398,7 +398,7 @@ def checkout_nodejs(systemName, branchName) {
}else{ }else{
if(!packejson.exists()){ if(!packejson.exists()){
echo ">>>>>>> is simple ui project" echo ">>>>>>> is simple ui project"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def dist = fileExists './dist' def dist = fileExists './dist'
if(!dist){ if(!dist){
sh "mkdir dist" sh "mkdir dist"
...@@ -409,7 +409,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -409,7 +409,7 @@ def checkout_nodejs(systemName, branchName) {
// sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" // sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
// sh "chmod +x .git/hooks/post-checkout" // sh "chmod +x .git/hooks/post-checkout"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
sh "npm install" sh "npm install"
} }
} }
......
...@@ -247,7 +247,7 @@ def checkout(buildType,systemName, branchName) { ...@@ -247,7 +247,7 @@ def checkout(buildType,systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["git_path"] def gitPath =projectAttr["git_path"]
def configPath = projectAttr["config_path"] def configPath = projectAttr["config_path"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def branchHashCode = sh (script: 'git log -1 --pretty=%H',returnStdout: true).trim() def branchHashCode = sh (script: 'git log -1 --pretty=%H',returnStdout: true).trim()
echo "branchHashCode : ${branchHashCode} with 'git log -1 --pretty=%H'" echo "branchHashCode : ${branchHashCode} with 'git log -1 --pretty=%H'"
...@@ -258,13 +258,13 @@ def checkout_java(systemName, branchName) { ...@@ -258,13 +258,13 @@ def checkout_java(systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["git_path"] def gitPath =projectAttr["git_path"]
def configPath = projectAttr["config_path"] def configPath = projectAttr["config_path"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
def checkout_python(systemName, branchName) { def checkout_python(systemName, branchName) {
def projectAttr = project_attr(systemName) def projectAttr = project_attr(systemName)
def gitPath =projectAttr["git_path"] def gitPath =projectAttr["git_path"]
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
def checkout_nodejs(systemName, branchName) { def checkout_nodejs(systemName, branchName) {
...@@ -278,7 +278,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -278,7 +278,7 @@ def checkout_nodejs(systemName, branchName) {
echo "${currentPath}/.git/hooks" echo "${currentPath}/.git/hooks"
if( !folder.exists()){ if( !folder.exists()){
echo ">>>>>>>>> first git clone" echo ">>>>>>>>> first git clone"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def bowerFile = fileExists './bower.json' def bowerFile = fileExists './bower.json'
if (bowerFile) { if (bowerFile) {
sh "bower install --allow-root" sh "bower install --allow-root"
...@@ -288,7 +288,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -288,7 +288,7 @@ def checkout_nodejs(systemName, branchName) {
echo ">>>>>>>>> not first git clone" echo ">>>>>>>>> not first git clone"
// sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" // sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
// sh "chmod +x .git/hooks/post-checkout" // sh "chmod +x .git/hooks/post-checkout"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
} }
// sh "npm install" // sh "npm install"
} }
...@@ -316,7 +316,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -316,7 +316,7 @@ def checkout_nodejs(systemName, branchName) {
if(!hookfolder.exists()){ if(!hookfolder.exists()){
echo ">>>>>>> first checkout project ${systemName}" echo ">>>>>>> first checkout project ${systemName}"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def bowerResult = ext_bower_install() def bowerResult = ext_bower_install()
def npmResult = ext_npm_intall() def npmResult = ext_npm_intall()
...@@ -341,7 +341,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -341,7 +341,7 @@ def checkout_nodejs(systemName, branchName) {
}else{ }else{
if(!packejson.exists()){ if(!packejson.exists()){
echo ">>>>>>> is simple ui project" echo ">>>>>>> is simple ui project"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
def dist = fileExists './dist' def dist = fileExists './dist'
if(!dist){ if(!dist){
sh "mkdir dist" sh "mkdir dist"
...@@ -352,7 +352,7 @@ def checkout_nodejs(systemName, branchName) { ...@@ -352,7 +352,7 @@ def checkout_nodejs(systemName, branchName) {
// sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/" // sh "cp -rf /home/quant_group/config_repository/lua-ui/hook/post-checkout .git/hooks/"
// sh "chmod +x .git/hooks/post-checkout" // sh "chmod +x .git/hooks/post-checkout"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: gitPath git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: gitPath
sh "npm install" sh "npm install"
} }
} }
......
...@@ -19,7 +19,7 @@ def prepare_eos(contextDir) { ...@@ -19,7 +19,7 @@ def prepare_eos(contextDir) {
} }
def checkout_eos(branchName) { def checkout_eos(branchName) {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@git.quantgroup.cn:QA/eos.git" git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: "git@git.quantgroup.cn:QA/eos.git"
} }
def build_eos(contextDir) { def build_eos(contextDir) {
......
...@@ -58,7 +58,7 @@ def call(body) { ...@@ -58,7 +58,7 @@ def call(body) {
git_path = "git@gitabc.xyqb.com:data-riskcontrol/urge_dispatcher.git" git_path = "git@gitabc.xyqb.com:data-riskcontrol/urge_dispatcher.git"
} }
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: git_path git branch: branchName, credentialsId: 'c6be40a7-235a-46db-89b8-61cfcbcbc1c4', url: git_path
sh 'mvn clean package -P test -D maven.test.skip=true' sh 'mvn clean package -P test -D maven.test.skip=true'
......
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