Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363577

Summary: Hudson job with ant build cannot execute sshexec
Product: Community Reporter: Borislav Kapukaranov <b.kapukaranov>
Component: CI-JenkinsAssignee: Eclipse Webmaster <webmaster>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:

Description Borislav Kapukaranov CLA 2011-11-11 07:30:25 EST
Hello Webmaster,

I'm trying to get the virgo.nano.snapshot hudson job, under the Virgo group to upload a build result to build.eclipse.org. Virgo's ant-based build system can do that and it's working fine in my local environment.

However when i try to do that on Hudson I get the following error:
"/opt/users/hudsonbuild/workspace/virgo.nano.snapshot/build-nano/build.xml:174: Problem: failed to create task or type sshexec
Cause: Could not load a dependent class com/jcraft/jsch/Logger
       It is not enough to have Ant's optional JARs
       you need the JAR files that the optional tasks depend upon.
       Ant's optional task dependencies are listed in the manual.
Action: Determine what extra JAR files are needed, and place them in one of:
        -/shared/common/apache-ant-1.8.2/lib
        -/opt/users/hudsonbuild/.ant/lib
        -a directory added on the command line with the -lib argument

Do not panic, this is a common problem.
The commonest cause is a missing JAR.

This is not a bug; it is a configuration problem"

Also you can see it here: https://hudson.eclipse.org/hudson/view/Virgo/job/virgo.nano.snapshot/21/console

I want to do this so I can have a regular build of the latest snapshot update site uploaded to build.eclipse.org so that people can use it. Hudson will copy the update site content there under a BUILD-SNAPSHOT folder so it will always point to the latest master branch build.

Can you help me?
Comment 1 Borislav Kapukaranov CLA 2011-11-11 07:33:10 EST
Here's what I use in ant:
        <sshexec host="build.eclipse.org" 
                username="${eclipse.buildId}" 
                keyfile="${key.file}" 
                passphrase="${passphrase}"
                command="mkdir -pv /opt/public/rt/virgo/update-site/${release.type}/${build.stamp}"/>

        <scp todir="${eclipse.buildId}@build.eclipse.org:/opt/public/rt/virgo/update-site/${release.type}/${build.stamp}/" 
                keyfile="${key.file}"
                passphrase="${passphrase}">
            <fileset dir="${publishing.dir}"/>
        </scp>

sshexec is creating the folder where I'll copy the update-site content.
Comment 2 Eclipse Webmaster CLA 2011-11-11 13:19:32 EST
Unless I'm missing something this isn't something we 'support'.  Our default position is: builds created by hudson need to be 'published' by committers, not hudson.

Now I'm aware that some projects do in fact do this, but you'd need to ask them how.

Build.eclipse.org does have a 'common' area (/opt/public/common) that you could install the needed Ant libs into, but be careful not to disturb the code installed by others.

-M.
Comment 3 Borislav Kapukaranov CLA 2011-11-12 09:30:45 EST
Thanks for the hints!
I've created a new folder at the common location(jsch-0.1.45) so this should be as non-disruptive as possible. It seems the build is perfectly fine with that.
I will see if I can configure the rest of the stuff.