1、General: 项目名称
2、源码管理:git/subversion
3、构建触发器: Generic Webhook Tigger
4、Build:Root POM: pom.xml, Goals and options: clean install -Dmaven.test.skip=true -e
5、Post Steps:
5.1 Execute shell:
scp -P 222 /root/.jenkins/workspace/jenkins_test/web-client/target/web-client/WEB-INF/lib/office* root@ip:/data/webapps/office/ROOT/WEB-INF/lib
scp -P 222 /root/.jenkins/workspace/jenkins_test/web-client/target/web-client/WEB-INF/lib/web* root@ip:/data/webapps/office/ROOT/WEB-INF/lib
scp -P 222 /root/.jenkins/workspace/jenkins_test/web-client/src/main/webapp/api_data.* root@ip:/data/webapps/office/ROOT
5.2 Execute shell scripte on remote host using ssh:
chown -R user1:sftp /data/webapps/office/ROOT
/data/tomcat/oa/bin/shutdown.sh
sleep 5
/data/tomcat/oa/bin/startup.sh
Execute each line
阅读(732) | 评论(0) | 转发(0) |