修复复制时导致的缺少字符

This commit is contained in:
zhouxiunai
2018-11-06 15:25:21 +08:00
parent 21545ac7f4
commit 01d675eeea
+11 -11
View File
@@ -1,17 +1,17 @@
node { node {
checkout scm checkout scm
docker.image('teracyangular-cli').inside() { docker.image('teracy/angular-cli').inside() {
stage('build'){ stage('build'){
sh 'npm config set registry httpregistry.npm.taobao.org' sh 'npm config set registry http://registry.npm.taobao.org/'
sh 'npm install' sh 'npm install'
sh 'ng build' sh 'ng build'
} }
} }
def imagesName = '130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT' def imagesName = '130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT'
stage('Image Build And Push'){ stage('Image Build And Push'){
docker.withRegistry('http130.120.3.193', 'privateDockerId') { docker.withRegistry('http://130.120.3.193', 'privateDockerId') {
docker.build(imagesName).push() docker.build(imagesName).push()
} }
} }
@@ -20,18 +20,18 @@ node {
stage('deploy'){ stage('deploy'){
def remote = [:] def remote = [:]
remote.name = airport-dev remote.name = "airport-dev"
remote.host = 130.120.3.231 remote.host = "130.120.3.231"
remote.allowAnyHosts = true remote.allowAnyHosts = true
withCredentials([sshUserPrivateKey(credentialsId 'e41b57a4-436a-4617-817c-9e3f25a8a47f', keyFileVariable 'kfIdentity', passphraseVariable 'pVariable', usernameVariable 'userName')]) { withCredentials([sshUserPrivateKey(credentialsId: 'e41b57a4-436a-4617-817c-9e3f25a8a47f', keyFileVariable: 'kfIdentity', passphraseVariable: 'pVariable', usernameVariable: 'userName')]) {
remote.user = userName remote.user = userName
remote.identityFile = kfIdentity remote.identityFile = kfIdentity
sshCommand remote remote, command docker stop adminweb,sudo true ,failOnError false sshCommand remote: remote, command: "docker stop adminweb",sudo: true ,failOnError: false
sshCommand remote remote, command docker rm adminweb,sudo true ,failOnError false sshCommand remote: remote, command: "docker rm adminweb",sudo: true ,failOnError: false
sshCommand remote remote, command docker rmi 130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT,sudo true ,failOnError false sshCommand remote: remote, command: "docker rmi 130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT",sudo: true ,failOnError: false
sshCommand remote remote, command docker run -d -p 9680 --name adminweb 130.120.3.193com.gzzn.ommsadmin-web0.0.1-SNAPSHOT,sudo true sshCommand remote: remote, command: "docker run -d -p 96:80 --name adminweb 130.120.3.193/com.gzzn.omms/admin-web:0.0.1-SNAPSHOT",sudo: true
} }
} }
} }