echo ‘mysuccess’
cp target/autojava-0.0.1-SNAPSHOT.jar btmaster-
(
d
a
t
e
+
(date +%Y)
(date+(date +%m)
(
d
a
t
e
+
s
c
p
−
r
/
v
a
r
/
j
e
n
k
i
n
s
h
o
m
e
/
w
o
r
k
s
p
a
c
e
/
t
e
s
t
j
a
r
2
/
b
t
m
a
s
t
e
r
−
(date +%d).jar scp -r /var/jenkins_home/workspace/testjar2/btmaster-
(date+scp−r/var/jenkinshome/workspace/testjar2/btmaster−(date +%Y)
(
d
a
t
e
+
(date +%m)
(date+(date +%d).jar root@192.168.117.129:/data/testjenkins/
ssh root@192.168.117.129 -t ‘sudo nohup sh /data/testjenkins/stopjava.sh’
ssh root@192.168.117.129 -t ‘sudo nohup sh /data/testjenkins/runjava.sh’
ssh root@192.168.117.129 -t ‘sudo nohup sh /data/testjenkins/runjava.sh’ 远程执行脚本