jenkinsci / publish-over-ssh-plugin Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://plugins.jenkins.io/publish-over-ssh/
Home Page: https://plugins.jenkins.io/publish-over-ssh/
Publish-over-ssh follows the Ant patterns (http://ant.apache.org/manual/dirtasks.html#patterns) but does not allow me to set the defaultexcludes="no" attribute.
I want to send all my .git* files to the remote system.
I know this can be bad practice, but I imagine it's a pretty common request.
My SSH sites keep disappearing...All jobs using them get a blank site, then fail.
I'm trying to use jenkins to make sftp get of files from remote server of my software support costumers.
The default behavior of publish-over-ssh plugin is to make an sftp put of the files to remote servers. I would like to make sftp get to bring files from remote servers.
This will agree with ours same security policies. We don't want to pass the jenkins server password to ours costumers but we have yours servers password.
I've made a git patch (publish-over-ssh.patch) to bring this feature to the version 1.9 but I would love to see it in the main line of this plugin.
Hi, we have two jobs that need to execute command on SSH server, but they both have the problem that job would not exit even if the task is finished.
1. command is "scp username@server:branch/something.tar .", the tar file is almost 400M. After running for 30 minutes, I could see that the file is already in the directory and the scp process is finished, but the Jenkins job is still running with no stdout and stderr in Jenkin console. But when I select the option "Exec in pty", this job runs well.
2. For another job, it still could not exit even if I check the " Exec in pty" option. In this job, we run a script to check out code from svn and the files is a bit lot. We found the same situation that all files have been checked out and the svn process is no longer existed, but Jenkins job is still running and we have to abort manually.
I'm not sure if this issue is related to JENKINS-10680, could you please tell me what should we do, is the problem of the script or others?
Thanks
Add an option to mark a build as unstable if an error occurs. This feature is comparable to existing option "Fail the build if an error occurs".
When use configuration of Job got "LOADING" overlay which is not go away. After disable publish-over-ssh plugin got no problem with configuring.
I configured publish-over-ssh plugin (v1.6) on my current jenkins, with port 2232, and it fails to connect.
Using port 22 (on another host) works fine though.
When I use verbose mode on the plugin, I have :
SSH: Connecting from host [jenkins-slave-ubuntu3]
SSH: Connecting with configuration [XXX nightly] ...
SSH: Creating session: username [xxx], hostname [X.X.X.X], port [2,232]
SSH: Connecting session ...
ERROR: Exception when publishing, exception message [Failed to connect session for config [XXX nightly]. Message [java.net.ConnectException: Connection refused]]
I think the "2,232" is the cause of the problem
Steps:
1) Deploy a fresh jenkins.war into tomcat with an empty ~/.jenkins configuration.
2) Create a job Foo
3) Install Publish Over SSH plugin
4) Go to job Foo
Expected: able to edit Foo's configuration
Actual: config screen hangs at "Loading ..."
No errors in the tomcat log. If I revert to Jenkins 1.527 the issue disappears.
Big projects definitely require rsync instead of plain file copying.
The usage of rsync over ssh should be available as an option.
In the current version only transfer parameters seem to be able to replaced by build parameters. But in some cases it would be really usefuly to let credentials be replaced as well, especially the username.
I'm having a problem that sometimes when a multi-module project is built and one or more modules have NOT_BUILT as result, the Publish Over SSH Plugin prints this in the console:
[INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESSFUL [INFO] ------------------------------------------------------------------------ ... channel stopped ... [EnvInject] - Injecting environment variables from a build step. ... [EnvInject] - Variables injected successfully. [EnvInject] - Unset unresolved 'BUILD_USER_LAST_NAME' variable. [EnvInject] - Unset unresolved 'NODE_NAME' variable. >>> SSH: Current build result is [NOT_BUILT], not going to run. <<< [M2Release] marking build to keep until the next release build
Despite the fact that the total build result is SUCCESS:
Finished: SUCCESS
I suggest that the plugin should check the build result of the complete build without checking the result of the modules.
When upgrading from 1.527 to 1.528, no jobs can be edited anymore!
When clicking the configure button (or going to jobname/configure), it starts loading the fields and filling in the data from the configuration, but the "LOADING" overlay never disappears, and the job settings can't be changed.
When looking at the web browser console, I see a lot of ajax POST requests from the browser, but the LOADING never disappears.
Downgrading to 1.527 solves the problem.
Are there any more logs I can attach to help solving the problem?
This is a 1.419 server with the Publish Over SSH (no other Publish Over.. plugins) installed.
We have one SSH server set up in the Manage Jenkins configuration
The follow stacktrace appears any time we access a job/configure page (downgrading to 0.14 allowed us to function again)
[Winstone 2011/07/08 20:36:45] - Untrapped Error in Servlet
javax.servlet.ServletException: org.apache.commons.jelly.JellyTagException: jar:file:/var/run/jenkins/war/WEB-INF/lib/jenkins-core-1.419.jar!/lib/form/optionalBlock.jelly:84:23: class jenkins.plugins.publish_over.Retry is missing its descriptor
at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:97)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
at hudson.plugins.audit_trail.AuditTrailFilter.doFilter(AuditTrailFilter.java:65)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:157)
at net.bull.javamelody.MonitoringFilter.doFilter(MonitoringFilter.java:131)
at net.bull.javamelody.PluginMonitoringFilter.doFilter(PluginMonitoringFilter.java:82)
at org.jvnet.hudson.plugins.monitoring.HudsonMonitoringFilter.doFilter(HudsonMonitoringFilter.java:84)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
at hudson.plugins.greenballs.GreenBallFilter.doFilter(GreenBallFilter.java:52)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:97)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.UnwrapSecurityExceptionFilter.doFilter(UnwrapSecurityExceptionFilter.java:51)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:166)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.providers.anonymous.AnonymousProcessingFilter.doFilter(AnonymousProcessingFilter.java:125)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.rememberme.RememberMeProcessingFilter.doFilter(RememberMeProcessingFilter.java:142)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.AbstractProcessingFilter.doFilter(AbstractProcessingFilter.java:271)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.ui.basicauth.BasicProcessingFilter.doFilter(BasicProcessingFilter.java:173)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at org.acegisecurity.context.HttpSessionContextIntegrationFilter.doFilter(HttpSessionContextIntegrationFilter.java:249)
at hudson.security.HttpSessionContextIntegrationFilter2.doFilter(HttpSessionContextIntegrationFilter2.java:66)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:87)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
at java.lang.Thread.run(Thread.java:636)
Caused by: org.apache.commons.jelly.JellyTagException: jar:file:/var/run/jenkins/war/WEB-INF/lib/jenkins-core-1.419.jar!/lib/form/optionalBlock.jelly:84:23: class jenkins.plugins.publish_over.Retry is missing its descriptor
at org.apache.commons.jelly.impl.TagScript.handleException(TagScript.java:728)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:290)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:63)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.ScopeTag.doTag(ScopeTag.java:37)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.ScopeTag.doTag(ScopeTag.java:37)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:63)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:63)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ForEachTag.doTag(ForEachTag.java:150)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.WhenTag.doTag(WhenTag.java:46)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
at org.apache.commons.jelly.tags.core.ChooseTag.doTag(ChooseTag.java:38)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:63)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:146)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$1.run(CoreTagLibrary.java:98)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.ReallyStaticTagLibrary$1.run(ReallyStaticTagLibrary.java:99)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.CallTagLibScript.run(CallTagLibScript.java:119)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:89)
... 55 more
Caused by: java.lang.AssertionError: class jenkins.plugins.publish_over.Retry is missing its descriptor
at jenkins.model.Jenkins.getDescriptorOrDie(Jenkins.java:982)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:63)
at org.kohsuke.stapler.jelly.DefaultScriptInvoker.invokeScript(DefaultScriptInvoker.java:53)
at org.kohsuke.stapler.jelly.JellyFacet$1.dispatch(JellyFacet.java:89)
... 55 more
Caused by: java.lang.AssertionError: class jenkins.plugins.publish_over.Retry is missing its descriptor
at jenkins.model.Jenkins.getDescriptorOrDie(Jenkins.java:982)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.apache.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.kohsuke.stapler.jelly.CallTagLibScript$1.run(CallTagLibScript.java:98)
at org.apache.commons.jelly.tags.define.InvokeBodyTag.doTag(InvokeBodyTag.java:91)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
... 216 more
It would be great if it would be possible to define a parameter and a necessary value for each server or each transfer group, that is evaluated before publishing, and will skip the publishing if the parameter does not have the value.
Say, I have a job which publishes data to servers A, B and C. I would configure parameter X as .*A.* for server A, .*\B.* for server B and .*C.* for server C.
If I set the parameter X to "A" the files will only be published to server A, if I set X to "ABC" the files will be published to all three servers.
We use SSH Tectia for our SSH connectivity. In my Jenkins job, i have provided the userid (destination) and the private keyfile (absolute path in the Source box). When i try to test the configuration it fails with the below exception
Failed to connect or change directory
jenkins.plugins.publish_over.BapPublisherException: Failed to add SSH key. Message [invalid privatekey: TheKey]
But the same connection id works through command prompt and i can see the keyfile is the same that i have provided.
The values of the "SSH Server" section is used when I run the job, but when i go to Configure on the job, the Transferset(s) are empty, no values in them.
When I click on Save the next time, the Transferset(s) are overwritten to be empty.
The problem is not in "Post-build Actions" the "Send built-artifacts over SSH" is able to hold the values when I go to Configure.
The problem seem to be with "Send files or execute commands over SSH" which is in the dropdown list of e.g. Build steps, Release steps.
I have attached an image where I go to Configure on my job, seeing that the values are empty.
Jenkins 1.406
Promoted build 2.0
Publish over SSH 0.9
Go to a job without any promotion process.
Click: Configure
Click: Promote builds when...
Click: Add action
Click: Send build artifact over SSH
500 error:
java.lang.NullPointerException
at jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor.doCheckSourceFiles(BapSshPublisherPlugin.java:94)
at sun.reflect.GeneratedMethodAccessor314.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.kohsuke.stapler.Function$InstanceFunction.invoke(Function.java:282)
at org.kohsuke.stapler.Function.bindAndInvoke(Function.java:149)
at org.kohsuke.stapler.Function.bindAndInvokeAndServeResponse(Function.java:88)
at org.kohsuke.stapler.MetaClass$1.doDispatch(MetaClass.java:103)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:233)
at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:561)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:646)
at org.kohsuke.stapler.Stapler.invoke(Stapler.java:477)
at org.kohsuke.stapler.Stapler.service(Stapler.java:159)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:45)
at winstone.ServletConfiguration.execute(ServletConfiguration.java:249)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:335)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:378)
at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:94)
at hudson.util.PluginServletFilter.doFilter(PluginServletFilter.java:86)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.csrf.CrumbFilter.doFilter(CrumbFilter.java:47)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.security.ChainedServletFilter$1.doFilter(ChainedServletFilter.java:84)
at hudson.security.ChainedServletFilter.doFilter(ChainedServletFilter.java:76)
at hudson.security.HudsonFilter.doFilter(HudsonFilter.java:164)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at hudson.util.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:81)
at winstone.FilterConfiguration.execute(FilterConfiguration.java:195)
at winstone.RequestDispatcher.doFilter(RequestDispatcher.java:368)
at winstone.RequestDispatcher.forward(RequestDispatcher.java:333)
at winstone.RequestHandlerThread.processRequest(RequestHandlerThread.java:244)
at winstone.RequestHandlerThread.run(RequestHandlerThread.java:150)
at java.lang.Thread.run(Thread.java:662)
Here "getConfiguration" logically returns null:
94: if (getConfiguration(configName).isEffectiveDisableExec()) {
Workaround: first save the promotion process.
This is a small feature improvement for "Publish Over ..."
I tested the plugin beforehand (1.7) and read this information:
https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+...#PublishOver...-Remotedirectory
https://wiki.jenkins-ci.org/display/JENKINS/Publish+Over+...#PublishOver...-examples
The "Eg 3 Environment variables" works for variables that need be resolved only once (e.g $JOB_NAME/$BUILD_NUMBER)
However, this won't work with a variable $MY_JOB_PARAM that is defined as $JOB_NAME/$BUILD_NUMBER.
Would it be possible to have a mechanism to resolve the env variable more than once? Possibly, the level of resolution could be specified by a number to enter.
Hi,
I'm trying to perform some action on build promotion on some other unix server (I'm running jenkins on windows server). I've installed the above mentioned plugins and get the option Send files or execute commands over ssh options in add build step dropdown, but the same is missing from add actions dropdown in build promotion - action section.
I would like to move files and execute some commands on the unix server. I would appreciate any advice on a workaround better than setting up another job and triggering that job on promotion.
Thanks,
Deepak
Now when downloading large files for a long time at the destination may not be a complete file. This can lead to various problems.
To avoid this problem you need to load it under a temporary name and then rename the.
For example:
sftp> put bigfile.bin bigfile.bin~tmp123 sftp> rename bigfile.bin~tmp123 bigfile.bin
Now you need to do:
This workaround looks like ugly
When trying to execute a command over SSH I get:
SSH: EXEC: STDOUT/STDERR from command [.../some.exe
] ...
AllowDesktopAccess failed.
Unable to execute command or shell on remote system: Failed to Execute process.
This seems like a bug because SSH seem to work otherwise:
1. Transferring files with Jenkins over SSH works fine.
2. Executing commands from PuTTy, from my other Windows machine works (it is a bit slow, but works).
3. Executing commands from the computer Jenkins is on (over command line ssh client) also works.
Currently FreeSSHd is running as a service and I've set up logging in with Windows auth, but auth itself seem to be working fine even with Jenkins (test of setup passed, transferring files works fine).
Host configuration has an absolute directory and the publisher step has a relative path.
The creation of the folder structure works, but the commands are executed in the home directory of the user itself.
Only open SFTP channel if there are Transfer Sets containing Source files.
I have EjnvInject Plugin 1.44 and Publish over SSH Plugin 1.6 installed for Jenkins Version 1.456. When I perform a build promotion it completes successfully but displays a EnvInject Error at the bottom of the promotion log. Looks like this is because of some incompatibility between EnvInject and Publish over SSH Plugins. Below is the log with the EnjInject error.
build BapSshPromotionPublisherPlugin[delegate=BapSshPublisherPlugin[consolePrefix=SSH: ,delegate=BPInstanceConfig[publishers=[BapSshPublisher[configName=DEV BIG-IP,verbose=false,transfers=[BapSshTransfer[sourceFiles=scripts/Environments/SSPQA/*,excludes=/_jdbc.properties,removePrefix=scripts/Environments/,remoteDirectory=,remoteDirectorySDF=false,flatten=false,cleanRemote=false,execCommand=chmod 755 SSPQA -R
,execTimeout=120000,pseudoTty=false]],useWorkspaceInPromotion=false,usePromotionTimestamp=true,retry=,label=,credentials=]],continueOnError=false,failOnError=true,masterNodeName=,alwaysPublishFromMaster=false,paramPublish=]]] SUCCESS
[EnvInject] - [ERROR] - SEVERE ERROR occurs: Job type hudson.plugins.promoted_builds.PromotionProcess@18e8006[SSP-CAS_WS-BUILD/promotion/Promote to SSP QA] is not supported
The publishing step takes forever.
We have a master node and a few build nodes. Only the nodes build anything.
Nodes are started by master through ssh.
Our doxygen generated documentation is 61 MB in size, and 3164 files.
And this amount of documentation takes 90 minutes to publish.
If I check what jenkins is doing in the 90 minutes nothing stands out, no cpu usage, no io wait nothing. Just extremely slow publish. I can see arriving the files roughly 1 file / second.
A remote scp copy from the node to the master takes 6 seconds, on the same directory.
I am trying to use Jenkins environment variables and variables injected through Env Inject plugin in Execute section of 'Send build artifacts over SSH'. It does not recognize them. It does recognize the build parameters and replaces them with the values. When I look at the 'Injected environment variables' I see all the variables I want to use. Not sure if I have to do anything different to be able to use those variables.
In Job configuration I checked 'Prepare an environment for the run' and 'Keep Jenkins Environment Variables', 'Keep Jenkins Build Variables'.
I have an 'Evaluated Groovy script' that sets 'MODULE_HOME' based on build time parameter MODULE_NAME.
Please let me know how to proceed.
I would like to have a possibility to publish the build artifacts and to execute a command on the remote host manually.
Please provide a config option "Run post-build action manually" and a text-input for the menu label.
The defined menulabel should appear with the defined text as a link in the job menu which can be used to trigger this action manually.
The XML configuration for the publish over ssh plugin fails to load in the current (1.504) version of jenkins and the plugin (1.10). On my system, the file is located at: /var/lib/jenkins/jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml.
It seems to be an issue with xstream conversion. Here's the relevant bit of the stack trace (full trace is at the bottom).
Caused by: com.thoughtworks.xstream.converters.ConversionException: object is not an instance of declaring class : object is not an instance of declaring class
---- Debugging information ----
message : object is not an instance of declaring class
cause-exception : java.lang.IllegalArgumentException
cause-message : object is not an instance of declaring class
class : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
required-type : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
converter-type : hudson.util.RobustReflectionConverter
path: /jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor/hostConfigurations/jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
line number : 25
class[1] : hudson.util.CopyOnWriteList
converter-type[1] : hudson.util.XStream2$AssociatedConverterImpl
class[2] : jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor
version : null
-------------------------------
Jenkins still starts, however the configured ssh hosts do not show up. The configuration element that ends on line 25 is:
over_ssh.BapSshHostConfiguration>
[redacted]
[redacted]
[redacted]
[redacted]
[redacted]
22
[redacted]
.ssh/id_rsa
false
300000
false
false
[redacted]
over_ssh.BapSshHostConfiguration>
The full stack trace:
WARNING: Failed to load /var/lib/jenkins/jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml
hudson.util.IOException2: Unable to read /var/lib/jenkins/jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin.xml
at hudson.XmlFile.unmarshal(XmlFile.java:164)
at hudson.model.Descriptor.load(Descriptor.java:806)
at jenkins.plugins.publish_over_ssh.descriptor.BapSshPublisherPluginDescriptor.(BapSshPublisherPluginDescriptor.java:68)
at jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor.(BapSshPublisherPlugin.java:81)
at jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor$$FastClassByGuice$$c0ccaf36.newInstance()
at com.google.inject.internal.cglib.reflect.$FastConstructor.newInstance(FastConstructor.java:40)
at com.google.inject.internal.DefaultConstructionProxyFactory$1.newInstance(DefaultConstructionProxyFactory.java:61)
at com.google.inject.internal.ConstructorInjector.provision(ConstructorInjector.java:108)
at com.google.inject.internal.ConstructorInjector.construct(ConstructorInjector.java:87)
at com.google.inject.internal.ConstructorBindingImpl$Factory.get(ConstructorBindingImpl.java:259)
at com.google.inject.internal.ProviderToInternalFactoryAdapter$1.call(ProviderToInternalFactoryAdapter.java:46)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1018)
at com.google.inject.internal.ProviderToInternalFactoryAdapter.get(ProviderToInternalFactoryAdapter.java:40)
at com.google.inject.Scopes$1$1.get(Scopes.java:59)
at hudson.ExtensionFinder$GuiceFinder$4$1.get(ExtensionFinder.java:422)
at com.google.inject.internal.InternalFactoryToProviderAdapter.get(InternalFactoryToProviderAdapter.java:41)
at com.google.inject.internal.InjectorImpl$3$1.call(InjectorImpl.java:965)
at com.google.inject.internal.InjectorImpl.callInContext(InjectorImpl.java:1011)
at com.google.inject.internal.InjectorImpl$3.get(InjectorImpl.java:961)
at hudson.ExtensionFinder$GuiceFinder._find(ExtensionFinder.java:391)
at hudson.ExtensionFinder$GuiceFinder.find(ExtensionFinder.java:382)
at hudson.ExtensionFinder._find(ExtensionFinder.java:151)
at hudson.ClassicPluginStrategy.findComponents(ClassicPluginStrategy.java:318)
at hudson.ExtensionList.load(ExtensionList.java:295)
at hudson.ExtensionList.ensureLoaded(ExtensionList.java:248)
at hudson.ExtensionList.iterator(ExtensionList.java:138)
at jenkins.model.Jenkins.getDescriptorByType(Jenkins.java:1171)
at hudson.plugins.copyartifact.BuildSelectorParameter.initAliases(BuildSelectorParameter.java:100)
at hudson.plugins.copyartifact.CopyArtifactPlugin.postInitialize(CopyArtifactPlugin.java:35)
at hudson.PluginManager$2$1$2.run(PluginManager.java:352)
at org.jvnet.hudson.reactor.TaskGraphBuilder$TaskImpl.run(TaskGraphBuilder.java:146)
at org.jvnet.hudson.reactor.Reactor.runTask(Reactor.java:259)
at jenkins.model.Jenkins$7.runTask(Jenkins.java:883)
at org.jvnet.hudson.reactor.Reactor$2.run(Reactor.java:187)
at org.jvnet.hudson.reactor.Reactor$Node.run(Reactor.java:94)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1146)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:679)
Caused by: com.thoughtworks.xstream.converters.ConversionException: object is not an instance of declaring class : object is not an instance of declaring class
---- Debugging information ----
message : object is not an instance of declaring class
cause-exception : java.lang.IllegalArgumentException
cause-message : object is not an instance of declaring class
class : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
required-type : jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
converter-type : hudson.util.RobustReflectionConverter
path: /jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor/hostConfigurations/jenkins.plugins.publish_over_ssh.BapSshHostConfiguration
line number : 25
class[1] : hudson.util.CopyOnWriteList
converter-type[1] : hudson.util.XStream2$AssociatedConverterImpl
class[2] : jenkins.plugins.publish_over_ssh.BapSshPublisherPlugin$Descriptor
version : null
-------------------------------
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:79)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.converters.collections.AbstractCollectionConverter.readItem(AbstractCollectionConverter.java:71)
at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:193)
at hudson.util.CopyOnWriteList$ConverterImpl.unmarshal(CopyOnWriteList.java:172)
at hudson.util.XStream2$AssociatedConverterImpl.unmarshal(XStream2.java:337)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at hudson.util.RobustReflectionConverter.unmarshalField(RobustReflectionConverter.java:333)
at hudson.util.RobustReflectionConverter.doUnmarshal(RobustReflectionConverter.java:275)
at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:222)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
at com.thoughtworks.xstream.core.AbstractReferenceUnmarshaller.convert(AbstractReferenceUnmarshaller.java:65)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:66)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convertAnother(TreeUnmarshaller.java:50)
at com.thoughtworks.xstream.core.TreeUnmarshaller.start(TreeUnmarshaller.java:134)
at com.thoughtworks.xstream.core.AbstractTreeMarshallingStrategy.unmarshal(AbstractTreeMarshallingStrategy.java:32)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1061)
at hudson.util.XStream2.unmarshal(XStream2.java:109)
at com.thoughtworks.xstream.XStream.unmarshal(XStream.java:1045)
at hudson.XmlFile.unmarshal(XmlFile.java:160)
... 37 more
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at com.thoughtworks.xstream.converters.reflection.SerializationMethodInvoker.callReadResolve(SerializationMethodInvoker.java:66)
at hudson.util.RobustReflectionConverter.unmarshal(RobustReflectionConverter.java:223)
at com.thoughtworks.xstream.core.TreeUnmarshaller.convert(TreeUnmarshaller.java:72)
... 60 more
In a Promotion process,
create a "Parameter String" : MY_PROMOTION_PARAMTER_STRING
In a Send Build artefact over SSH
Add a Exec command script :
echo '--- SSH Script'
echo $MY_PROMOTION_PARAMTER_STRING
And to compare to wanted result
In a Shell Script
echo '--- Local Script'
echo $MY_PROMOTION_PARAMTER_STRING
During promotion the value is not evaluated.
When setting up a free-form project to run an SSH script on a remote machine, it was painfully obscure that there was a default timeout set to 120,000 ms. Either the default should be no timeout, or the timeout should be surfaced somewhere higher than the 2nd-level advanced screen. This is especially true since there is a note about the exec timeout in the first-level advanced screen.
After jenkins server reboot, configuration is lost on main options menu. Build jobs save publish-over-ssh configuaions correctly.
A screenshot shows a configurating window after reboot.
When using a ssh-exec with yum install a timeout occurs.
It seems that is a problem with the progress bar that won't be displayed during the build but after.
At the end of the build you can see that for each output a line is produced.
(3/5): package-a- (29%) 26% [=== ] 421 kB/s | 20 MB 02:14 ETA
(3/5): package-a- (29%) 26% [=== ] 402 kB/s | 20 MB 02:20 ETA
(3/5): package-a_f- (29%) 26% [=== ] 348 kB/s | 20 MB 02:42 ETA
SSH: Disconnecting configuration [rpm target] ...
ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 240.653 ms]
It seems that these outputs are not recognized during a build which leads to a timeout.
Possible workaround: Turnup timeout
Caveat: you don't know whenever the build is running or stuck...
After upgrading to Jenkins 1.528, opening the configuration page of any job gives the javascript error:
Invalid flags supplied to RegExp constructor 'JobName'
Workaround:
Disable the publish over ssh plugin
Request and patch recieved from Michel Prunet.
Add an option to execute the command in a tty to enable sudo commands that have been restriced with 'requiretty' to be authorized.
I'm using publish over ssh to send file on a remote folder
and Exec commands.
As the folder where I put the files may change in the future I defined a
Jenkins environment variable: REMOTE_LOCATION.
I'd like to use this variable in SSH publish over configuration and in the
Exec command of the job.
I configured ssh publish over plugin with Remote Directory set to ${REMOTE_LOCATION}
I get this error :
ERROR: Exception when publishing, exception message [Failed to change to remote directory [${REMOTE_LOCATION}]]
Build step 'Send build artifacts over SSH' changed build result to UNSTABLE
I checked that the variable is set properly by echo ${REMOTE_LOCATION} in the Exec command.
Variables should be expanded in the "Remote Directory" configuration field.
After upgrading Jenkins and the associated plugins build jobs began to fail when using the publish-over-ssh plugin. In the console output I could find no reference to the files that had been transferring successfully before the update. The work-around to this issue was to put the Source File in its own transfer set. This is contrary to the help section as specified in the Exec Command's help:
"The SSH Transfer Set must include either a Source Files pattern, an Exec command, or both. If both are present, the files are transferred before the command is executed."
When trying to transfer "**/*.war" ("Transfer Set Source files" field), the promotion fails and says:
Started by user anonymous Promoting my-job #1 ERROR: Ignore Problem expanding maven opts macros org.jenkinsci.plugins.tokenmacro.TokenMacro [8mha:XXXXXXX[0mSSH: Connecting from host [my-host] SSH: Connecting with configuration [Int?gration A] ... SSH: Disconnecting configuration [Int?gration A] ... ERROR: Exception when publishing, exception message [/home/hudson/.hudson/jobs/my-job/builds/2011-05-13_16-51-24/archive does not exist.] [8mha:XXXXXXX[0mbuild BapSshPromotionPublisherPlugin[delegate=BapSshPublisherPlugin[consolePrefix=SSH: ,delegate=BPInstanceConfig[publishers=[BapSshPublisher[configName=Int?gration A,verbose=false,transfers=[BapSshTransfer[sourceFiles=**/*.war,excludes=,removePrefix=,remoteDirectory=/usr/share/tomcat5.5/wars/${GIT_COMMIT},remoteDirectorySDF=false,flatten=false,cleanRemote=false,/home/hudson/redeploy_a.sh ${JOB_NAME} ${BUILD_NUMBER} ${GIT_COMMIT},120000]],useWorkspaceInPromotion=false,usePromotionTimestamp=false]],continueOnError=false,failOnError=false,masterNodeName=,alwaysPublishFromMaster=false]]] UNSTABLE Finished: UNSTABLE
In the "/home/hudson/.hudson/jobs/my-job/builds/2011-05-13_16-51-24/" directory, there is no directory named "archive".
The war file is in a directory "/home/hudson/.hudson/jobs/my-job/builds/2011-05-13_16-51-24/a$a/archive/a/a/1.0-SNAPSHOT/" (so one directory deeper than publish-over-ssh expects)
I used Jenkins 1.474 and installed the Publish Over SSH(1.7). I can configure the SSH server in the Configure System.
But it can't work at the job configure.
I clicked "Add post-build action" and selected "Send build artifacts over SSH" and than I clicked the button "Add Server" , and when I clicked the button "Add Transfer Set".there is no response. In the noraml we can see the label "Source files" and "Remove prefix" and others,what's wrong ? you can see the attend file"1.7.jpg"
we can see the label "Source files" and "Remove prefix" and others using the Publish Over SSH(1.4). you can see the attend file "1.4.jpg"
In the Publisher Advanced Option, there shall be a checkbox to allow the publisher to run even if the build was unsuccessful.
Hi,
I am using Jenkins(v1.506) to create a build automation for Tivoli Omnibus Netcool v7.1 on a Solaris v10 machine.
When I try to execute the Probe rules syntax check command '/opt/netcool/omnibus/probes/nco_p_syntax -rulesfile $NC_RULES_HOME/snmptrap.rules -server WAOSCV1', in which $NC_RULES_HOME is an environment variable '/opt/netcool/etc/rules/'. This enviroment variable is set using 'envinject' plugin. The command is executed using publish-over-ssh plugins
The enviorment variable $NC_RULES_HOME is converted as '/opt/netcool/etc/rules/' in the given command, but when the files are read as part of the 'nco_p_syntax' command, the $NC_RULES_HOME is not decoded to '/opt/netcool/etc/rules/'. PFB the console output.
Started by user anonymous
[EnvInject] - Loading node environment variables.
Building in workspace C:\Program Files\Jenkins\workspace\sytaxcheck2
[EnvInject] - Executing scripts and injecting environment variables after the SCM step.
[EnvInject] - Injecting as environment variables the properties content
NC_RULES_HOME=/opt/netcool/etc/rules
[EnvInject] - Variables injected successfully.
SSH: Connecting from host HOST
SSH: Connecting with configuration SERVER ...
SSH: EXEC: STDOUT/STDERR from command [/opt/netcool/omnibus/probes/nco_p_syntax -rulesfile /opt/netcool/etc/rules/snmptrap.rules -server WAOSCV1] ...
03/25/13 19:41:28: Warning: Failed to load properties file : No such file or directory
03/25/13 19:41:28: Information: Connecting ...
03/25/13 19:41:28: Information: Checking rules file ...
03/25/13 19:41:28: Debug: Reading /opt/netcool/etc/rules/snmptrap.rules
03/25/13 19:41:28: Debug: Plain text rules file detected.
03/25/13 19:41:28: Error: Rules file '/opt/netcool/etc/rules/snmptrap.rules' line 98: Failed to read lookup table file '$NC_RULES_HOME/include-snmptrap/CorrScore.snmptrap.lookup'
03/25/13 19:41:28: Information: Falling back to previous rules file.
03/25/13 19:41:28: Error: Error(s) in rules file
03/25/13 19:41:28: Information: Disconnecting ...
03/25/13 19:41:28: Warning: Disconnect malfunction - continuing shutdown anyway
SSH: EXEC: completed after 811 ms
SSH: Disconnecting configuration SERVER ...
ERROR: Exception when publishing, exception message [Exec exit status not zero. Status [2]]
Build step 'Send files or execute commands over SSH' changed build result to UNSTABLE
Finished: UNSTABLE
On RHEL6/5, when using this plugin, symlinks are copied as a file. This is resulting in space consumption. Could you please fix this?
Currently I are using Jenkins ver. 1.4.39. I have Jenkins SSH plugin installed.
Working Scenario: Connected to SSH Slave as user X and performing build promotion.
I am using 'Send build artifacts over SSH' action to copy the required files to the SSH Slave to a folder owned by user X. I provided the required shell commands in Exec command. I am able to successfully complete the promotion.
Failing Scenario: Connected to SSH Slave as user Y and changing user to X and performing build promotion.
I am using 'Send build artifacts over SSH' action to copy the required files to the SSH Slave to a folder owned by user Y. I provided the required shell commands in Exec command. I want to sudo as user X for which I gave command 'sudo su - X'. When I promote the build I am receiving below error message.
ERROR: Exception when publishing, exception message [Exec timed out or was interrupted after 10,004 ms].
sudo command is not working for me through Jenkins even though I checked Exec in pty option required for running sudo commands. I am able to run the same command on the linux machine successfully. I set the option to Password not required for user Y to change to user X.
Please help me by providing a fix. I really appreciate your assistance.
If the source file selection returns no files then when flatten is specified an empty target directory is created. If flatten is not specified then no target directory is created when no files are selected.
Some of my builds only produce some artifacts for release builds and I copy these to separate locations with the publish-over-ssh. It gets very cluttered if the empty directories get produced for each non-release build.
I have a patch (pull request coming soon) that adds unit tests to show the behaviour with and without flatten specified. It also tweaks the flatten case to not produce the empty folders.
I'm not sure if anyone depends on empty folders being produced but if necessary I'll gladly update the patch to make it a configurable option to either suppress or force empty base folders.
Scripts, added by "Exec command" started in remote user home path.
You can not specify a script that runs in the directory where the files were uploaded without explicitly specifying the full path in the script.
This issue is added for information only - to enable it to be discovered
There is a short discussion here.
In summary, putting a job into the background does not detach it from the terminal process, therefore the SSH client is waiting for the background job to complete.
Ensure that STDIN/STDOUT/STDERR descriptors are closed (and reopened) in the process that you would like to keep running.
Use the daemon command in BSD or deamonize in GNU environments to simplify creating a stand alone process.
It would be nice if the "Exec Command" field was a TextArea, in the same fashion than release-plugin's "execute shell command".
Justification: in general, we use some complex (or less complex) commands, and so some space is great to avoid making lots of copy-paste with a text editor just to change some cabalistic parameter.
For example: awaiting JENKINS-9253 we use some (incorrect)
Thank you again for this plugin, bap
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.