Commit bb4089d3 authored by bill lin's avatar bill lin

lsdfhsldsl

parent caf73282
...@@ -7,33 +7,12 @@ pipeline { ...@@ -7,33 +7,12 @@ pipeline {
} }
stages { stages {
stage('BUILD IMAGE') { stage('Build') {
steps { steps {
sh ''' sh '''
docker build -t $registry_address/$image_name:latest .''' mvn -B -DskipTests clean package
'''
} }
} }
stage('PUSH IMAGE') {
steps {
sh '''docker login -u deployment -p deployment123 nexus.gsstcloud.com:8093
docker push $registry_address/$image_name:latest
ssh -o "StrictHostKeyChecking no" root@192.168.12.47 date '''
}
}
stage('REMOVE LOCAL IMAGE') {
steps {
sh '''docker rmi -f $registry_address/$image_name:latest'''
}
}
stage('Cleanup') {
steps {
cleanWs(deleteDirs: true)
}
}
}
environment {
registry_address = 'nexus.gsstcloud.com:8093/test'
image_name = 'lxnginx'
app_server_sit = '192.168.12.47'
} }
} }
\ No newline at end of file
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