tomcat - How to reach /var/lib/tomcat6/webapps on remote host from Jenkins via scp plug-in -


i'm using scp plug-in on jenkins convey project's war has freshly built remote host.

by hand, copy war user on host, go there myself, root (sudo) , copy war /var/lib/tomcat6/webapps tomcat instantly deploy it.

however, can't find way use tomcat6 user of scp since user tomcat6 has no discoverable password, i'm @ loss tell jenkins how without keyboard interaction--rendering using jenkins continuous deployment useless.

i'm running jenkins on precise server , remote server war deployed running precise.

thanks reading question , profuse can set me straight smart way accomplish this.

here's relevant output (failure) jenkins:

build successful total time: 29 seconds [scp] connecting app-1.site [scp] uploading file: '/var/lib/tomcat6/webapps/myapp.war' error: failed upload files 3: permission denied     @ com.jcraft.jsch.channelsftp.throwstatuserror(channelsftp.java:2289)     @ com.jcraft.jsch.channelsftp._put(channelsftp.java:485)     @ com.jcraft.jsch.channelsftp.put(channelsftp.java:439)     @ com.jcraft.jsch.channelsftp.put(channelsftp.java:406)     @ be.certipost.hudson.plugin.scpsite.upload(scpsite.java:239)     @ be.certipost.hudson.plugin.scprepositorypublisher.perform(scprepositorypublisher.java:211)     @ hudson.tasks.buildstepmonitor$3.perform(buildstepmonitor.java:36)     @ hudson.model.abstractbuild$abstractbuildexecution.perform(abstractbuild.java:804)     @ hudson.model.abstractbuild$abstractbuildexecution.performallbuildsteps(abstractbuild.java:776)     @ hudson.model.build$buildexecution.post2(build.java:183)     @ hudson.model.abstractbuild$abstractbuildexecution.post(abstractbuild.java:726)     @ hudson.model.run.execute(run.java:1600)     @ hudson.model.freestylebuild.run(freestylebuild.java:46)     @ hudson.model.resourcecontroller.execute(resourcecontroller.java:88)     @ hudson.model.executor.run(executor.java:241) build step 'publish artifacts scp repository' changed build result unstable finished: unstable 

there 2 solutions try, don't see either good. real way, in opinion, able use tomcat6 bonafide user begin with. that, have have controllable password.

solutions try

1) endow tomcat6 password. don't know if a) can done, b) work if try or c) whether break tomcat installation don't feel doing now. needs research.

2) jack privileges on /var/lib/tomcat6/webapps such user or create specially job can copy path , tomcat willing deploy whatever gets copied there. may need modify permissions on war file ant during build.

simply make subdirectory /var/lib/tomcat6/webapps writable

/var/lib/tomcat6 $ chmod a+w webapps 

this works minimum of effort , think observing permissions on subdirectory not surprised.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -