Changed deployment type
This commit is contained in:
parent
15d8e4da77
commit
f07bad0d90
2 changed files with 20 additions and 6 deletions
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
|
|
@ -27,9 +27,14 @@ node {
|
||||||
}
|
}
|
||||||
|
|
||||||
stage('Deploy') {
|
stage('Deploy') {
|
||||||
input message: 'Deploy?', submitter: 'ziver'
|
timeout(time:2, unit:'HOURS') {
|
||||||
|
input message: 'Deploy?', submitter: 'ziver'
|
||||||
|
}
|
||||||
node {
|
node {
|
||||||
sh 'ant deploy'
|
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: '46f1d99b-2037-47b9-a7b7-57a1066337fc',
|
||||||
|
usernameVariable: 'USERNAME', passwordVariable: 'PASSWORD']]) {
|
||||||
|
sh 'ant -Dtomcat.user=${USERNAME} -Dtomcat.pass=${PASSWORD} deploy'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
17
build.xml
17
build.xml
|
|
@ -13,6 +13,12 @@
|
||||||
<property name="releaseDir" value="${outputRoot}/release" />
|
<property name="releaseDir" value="${outputRoot}/release" />
|
||||||
<property name="deployPath" value="/var/lib/tomcat7/webapps/Zallery.war" />
|
<property name="deployPath" value="/var/lib/tomcat7/webapps/Zallery.war" />
|
||||||
|
|
||||||
|
<!-- Deployment properties -->
|
||||||
|
<property name="tomcat.url" value="http://localhost:8080/manager/text" />
|
||||||
|
<property name="tomcat.user" value="" />
|
||||||
|
<property name="tomcat.pass" value="" />
|
||||||
|
<property name="catalina.home" value="/usr/shared/tomcat7"/>
|
||||||
|
|
||||||
<!--define standard arguments for javac-->
|
<!--define standard arguments for javac-->
|
||||||
<presetdef name="javac">
|
<presetdef name="javac">
|
||||||
<javac includeantruntime="false" />
|
<javac includeantruntime="false" />
|
||||||
|
|
@ -64,10 +70,13 @@
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="deploy" depends="package">
|
<target name="deploy" depends="package">
|
||||||
<delete file="${deployPath}" quiet="true" />
|
<import file="${catalina.home}/bin/catalina-tasks.xml"/>
|
||||||
<copy
|
<deploy url="${tomcat.url}"
|
||||||
file="${releaseDir}/Zallery.war"
|
username="${tomcat.user}"
|
||||||
toFile="${deployPath}" />
|
password="${tomcat.pass}"
|
||||||
|
path="/zallery"
|
||||||
|
update="true"
|
||||||
|
war="file:${releaseDir}/Zallery.war" />
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue