forked from TTFHW/jenkins_pipeline_java_maven
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Jenkinsfile
31 lines (29 loc) · 795 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
pipeline {
agent any
tools {
jdk 'jdk1.8'
maven 'maven3.3'
}
stages {
stage('Build') {
steps {
sh "mvn clean package"
}
}
stage ('Publish to Test-D') {
steps {
script {
sh 'echo "${WORKSPACE}" '
war_name='test-jenkinsfile_master'
host ='172.16.0.217'
user = 'root'
passwd ='yst9ol.0p;/'
sh """
cd ${WORKSPACE}/target
/usr/bin/sshpass -p'$passwd' scp -o StrictHostKeyChecking=no *.jar '$user'@'$host':/opt/testp/
"""
}
}
}
}
}