我正在尝试将WAR文件部署到tomcat docker容器。 这里是config.xml:
<?xml version='1.0' encoding='UTF-8'?>
<project>
<actions/>
<description></description>
<keepDependencies>false</keepDependencies>
<properties/>
<scm class="hudson.plugins.git.GitSCM" plugin="git@2.4.3">
<configVersion>2</configVersion>
<userRemoteConfigs>
<hudson.plugins.git.UserRemoteConfig>
<url>https://github.com/spring-projects/spring-petclinic.git</url>
</hudson.plugins.git.UserRemoteConfig>
</userRemoteConfigs>
<branches>
<hudson.plugins.git.BranchSpec>
<name>*/master</name>
</hudson.plugins.git.BranchSpec>
</branches>
<doGenerateSubmoduleConfigurations>false</doGenerateSubmoduleConfigurations>
<submoduleCfg class="list"/>
</scm>
<canRoam>true</canRoam>
<disabled>false</disabled>
<blockBuildWhenDownstreamBuilding>false</blockBuildWhenDownstreamBuilding>
<blockBuildWhenUpstreamBuilding>false</blockBuildWhenUpstreamBuilding>
<triggers/>
<concurrentBuild>false</concurrentBuild>
<builders>
<hudson.tasks.Maven>
<targets>clean package</targets>
<mavenName>3.3.9</mavenName>
<usePrivateRepository>false</usePrivateRepository>
<settings class="jenkins.mvn.DefaultSettingsProvider"/>
<globalSettings class="jenkins.mvn.DefaultGlobalSettingsProvider"/>
</hudson.tasks.Maven>
</builders>
<publishers>
<hudson.plugins.deploy.DeployPublisher plugin="deploy@1.10">
<adapters>
<hudson.plugins.deploy.tomcat.Tomcat7xAdapter>
<userName>admin</userName>
<passwordScrambled>YWRtaW4=</passwordScrambled>
<url>http://localhost:8888</url>
</hudson.plugins.deploy.tomcat.Tomcat7xAdapter>
</adapters>
<contextPath>spring-petclinic</contextPath>
<war>target/*.war</war>
<onFailure>false</onFailure>
</hudson.plugins.deploy.DeployPublisher>
</publishers>
<buildWrappers/>
</project>
结果:
Tests run: 39, Failures: 0, Errors: 0, Skipped: 1
[INFO]
[INFO] --- maven-jar-plugin:2.6:jar (default-jar) @ spring-petclinic ---
[INFO] Building jar: /var/lib/jenkins/jobs/deploy2Docker/workspace/target/spring-petclinic-1.4.2.jar
[INFO]
[INFO] --- spring-boot-maven-plugin:1.4.2.RELEASE:repackage (default) @ spring-petclinic ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 51.388 s
[INFO] Finished at: 2016-12-25T15:52:20+00:00
[INFO] Final Memory: 87M/214M
[INFO] ------------------------------------------------------------------------
Finished: SUCCESS
作业成功完成,但尚未创建docker容器。 我检查了war文件在那里。
-rw-r--r-- 1 jenkins jenkins 35689865 Dec 25 15:52 /var/lib/jenkins/jobs/deploy2Docker/workspace/target/spring-petclinic-1.4.2.jar
有人可以帮忙吗?我错过了什么使这个工作?