Commit ef183a9e authored by 温海元's avatar 温海元

change the url for docker server

parent 98d3a48c
...@@ -36,7 +36,7 @@ def dockerbuild_and_push(buildNumber, branchName, harborGroup, systemName, conte ...@@ -36,7 +36,7 @@ def dockerbuild_and_push(buildNumber, branchName, harborGroup, systemName, conte
imageTag = "192.168.4.4/${harborGroup}/${systemName}:${safeBranchName}-${buildNumber}" imageTag = "192.168.4.4/${harborGroup}/${systemName}:${safeBranchName}-${buildNumber}"
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://172.29.1.15:2375/"]) {
withDockerRegistry([credentialsId: 'harbor-qajenkins', url: "http://192.168.4.4"]) { withDockerRegistry([credentialsId: 'harbor-qajenkins', url: "http://192.168.4.4"]) {
def image = docker.build(imageTag, "--build-arg SYSTEM_NAME=${systemName} ${contextDir}") def image = docker.build(imageTag, "--build-arg SYSTEM_NAME=${systemName} ${contextDir}")
image.push() image.push()
......
...@@ -45,7 +45,7 @@ def call(body) { ...@@ -45,7 +45,7 @@ def call(body) {
try { try {
sh "mkdir -p ${contextDir}" sh "mkdir -p ${contextDir}"
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://172.29.1.15:2375/"]) {
def volume = "-v /root/.m2:/root/.m2 " def volume = "-v /root/.m2:/root/.m2 "
volume +="-v /home/quant_group/qg-dockerfiles:/home/quant_group/qg-dockerfiles " volume +="-v /home/quant_group/qg-dockerfiles:/home/quant_group/qg-dockerfiles "
......
...@@ -53,7 +53,7 @@ def call(body) { ...@@ -53,7 +53,7 @@ def call(body) {
} }
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://172.29.1.15:2375/"]) {
_utils.beautyEcho("checkout & build < ${systemName} : ${branchName} >", "stage") _utils.beautyEcho("checkout & build < ${systemName} : ${branchName} >", "stage")
dir(systemName){ dir(systemName){
branchHashCode = _stage.check_and_build(buildType, systemName, branchName, contextDir) branchHashCode = _stage.check_and_build(buildType, systemName, branchName, contextDir)
...@@ -63,7 +63,7 @@ def call(body) { ...@@ -63,7 +63,7 @@ def call(body) {
/* 3 */ /* 3 */
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://172.29.1.15:2375/"]) {
_utils.beautyEcho("make docker image", "stage") _utils.beautyEcho("make docker image", "stage")
_stage.dockerbuild_and_push(imageTagInfo,buildNumber,systemName,branchName ,cluster,timeStemp,contextDir,branchHashCode) _stage.dockerbuild_and_push(imageTagInfo,buildNumber,systemName,branchName ,cluster,timeStemp,contextDir,branchHashCode)
......
...@@ -46,7 +46,7 @@ def call(body) { ...@@ -46,7 +46,7 @@ def call(body) {
/* 2 */ /* 2 */
echo systemName echo systemName
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://172.29.1.15:2375/"]) {
_utils.beautyEcho("checkout & build < ${systemName} : ${branchName} >", "stage") _utils.beautyEcho("checkout & build < ${systemName} : ${branchName} >", "stage")
dir(systemName){ dir(systemName){
branchHashCode = _stage.check_and_build(config.buildType, systemName, branchName, contextDir) branchHashCode = _stage.check_and_build(config.buildType, systemName, branchName, contextDir)
...@@ -63,7 +63,7 @@ def call(body) { ...@@ -63,7 +63,7 @@ def call(body) {
} }
/* 3 */ /* 3 */
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) { withDockerServer([uri: "tcp://172.29.1.15:2375/"]) {
_utils.beautyEcho("make docker image", "stage") _utils.beautyEcho("make docker image", "stage")
def regex = "[`,./;\\[\\]&<>?:\"()|-]+" def regex = "[`,./;\\[\\]&<>?:\"()|-]+"
def k8sSystemName = systemName.replaceAll("_","-").toLowerCase() def k8sSystemName = systemName.replaceAll("_","-").toLowerCase()
......
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