Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: for the plan.

Jump to: navigation, search


Signing platform builds

You'll find below the latest copy of the ant targets that we use in our buildAll.xml script to complete the signing portion of the build. Please note

  • During our build, we build a build-time feature that results in file called eclipse-master-${buildId}.zip. This file includes all the plugins and features that are used in the build, excluding test plugins. This file is used later on by pde build's packaging process to assemble the all the downloads available on the platform download page. By taking this approach, we ensure that each jar is only sent to the signing process once. That being said, the entire signing process still takes about 45 minutes to complete given the size of our build.
  • We scp the zips to and from the server, instead of The server has QoS rules associated with it, and therefore the copy takes less time.
  • We add a file to the eclipse-master-${buildId}.zip to overcome the the bugs described in this message For more information on including jar processor options in your build, refer to this document prepared by the core team. This overall jar signing document is also a good reference.

    The process we use can be summarized as follows:

    1. Use scp to copy the eclipse-master-${buildId}.zip to the signing staging area using pserver.
    2. Invoke the signing script.
    3. Poll the server for the signed file in the output directory. Poll from the same server that you will be copying from. I initially polled but copied the file from to take advantage of its QoS riles. This caused problems because of the lag in nfs synchronization across the nodes. So I changed it to poll and copy from
    4. When available, scp the signed eclipse-master-${buildId}.zip back to the server.
    5. Delete the build specific signing files from
    6. Invoke the packager against the eclipse-master-${buildId}.zip to create the the drops available for download, and continue with the remainder of the build.
    <target name="compareAttribs">
         <!--poll file for change in attributes-->
         <exec dir="${buildDirectory}" executable="ssh" outputProperty="polledAttribs">
             <arg line="${sshline}"/>
         <echo message="original:  ${originalAttribs}" />
         <condition property="attribChanged">
    	       <contains string="${polledAttribs}" substring="No such file or directory" casesensitive="no" />
              <echo message="polled:  ${polledAttribs}" />
    	 	<antcall target="writeDiffResult" />
    	 	<sleep seconds="120" />
    	 		<available property="attribs.changed" file="${buildDirectory}/attribDiff.txt" />
    	 	<antcall target="waitForChangedAttribs" />
    <target name="writeDiffResult" if="attribChanged">
         <echo message="original: ${originalAttribs}" file="${buildDirectory}/attribDiff.txt" />
         <echo message="new: ${polledAttribs}" file="${buildDirectory}/attribDiff.txt" append="true" />
    <target name="signMasterFeature" if="sign">		 		 		 		 
    	<property name="archiveName" value="eclipse-master-${buildId}.zip" />
    	<property name="packtmp" value="${buildDirectory}/packtmp" />
    	<property name="stagingDirectoryOutput" value="/our/staging/directory/${buildId}-out"/>
    	<property name="stagingDirectory" value="/our/staging/directory" />
    	<property name="outputFile"  value="${stagingDirectoryOutput}/${archiveName}"/>
    	<mkdir dir="${packtmp}" />		 		  
    	<move file="${buildDirectory}/${buildLabel}/${archiveName}" tofile="${packtmp}/${archiveName}"/>
    	<!-- add file that specifies effort level -->
    	<exec dir="${}/../../extras" executable="zip">
    		<arg line="-r ${packtmp}/${archiveName}" />
    	<!--push drop to staging directory-->
     	<echo message="push drop to staging directory"/>
    	<exec dir="${packtmp}" executable="scp" output="signing.txt">
      		  <arg line="${archiveName}${stagingDirectory}"/>
     	<exec dir="${buildDirectory}" executable="ssh" output="signing.txt" append="true">
    	<arg line=" /bin/chmod ugo+rw ${stagingDirectory}/${archiveName} "/>
    	<!--invoke sign script and wait-->
     	<echo message="invoke sign script and wait"/>
    		<exec dir="." executable="ssh" output="signing.txt" append="true">
     	  		<arg line=" "cd ${stagingDirectory}; /usr/bin/sign ${stagingDirectory}/${archiveName} mail ${stagingDirectoryOutput}""/>
    	<!--Wait for signed build to be available -->
    	<antcall target="waitForChangedAttribs">
                   <param name="sshline" value=" "cd ${stagingDirectoryOutput};ls ${archiveName}"" />
    	<!--copy zip back to build machine -->
    	<echo message="copy zip back to build machine"/>
    	<exec dir="." executable="scp" output="signing.txt" append="true">
    		<arg line="${stagingDirectory}/${buildId}-out/${archiveName} ${buildDirectory}/${buildLabel}"/>
            <!--delete files on>
     	<echo message="delete temp files on"/>
     	<exec dir="." executable="ssh" output="signing.txt" append="true">
    		<arg line=" "/bin/rm -rf ${stagingDirectory}/${buildId}-out ${stagingDirectory}/${archiveName}""/>

    After signing the master feature, we call the jar processor again to create the pack.gz files. This step could be completed on the server. However, this would mean that the eclipse-master-${buildId}.zip would be much larger file to copy back to our build machine and subsequently take longer. Consequently, we decided to run this task on our local build machine.

    <target name="packMasterFeature">
         <property name="archiveName" value="eclipse-master-${buildId}.zip" />
         <property name="packtmp" value="${buildDirectory}/packtmp" />
         <mkdir dir="${packtmp}" />	
         <move file="${buildDirectory}/${buildLabel}/${archiveName}" tofile="${packtmp}/${archiveName}"/>
        <!-- update location of jvm arguments --> 
        <replace file="${}/../../extras/pack200" token="@pack200@" value="${java15-home}/bin/pack200"/>
        <chmod file="${}/../../extras/pack200" perm="755"/>
        <!--condition jar if it is not pushed to for signing-->
        <condition property="repack" value="-repack">
    		<isset property="sign" />
         <property name="repack" value="" />
         <java jar="${eclipse.home}/startup.jar"
              <jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${}/../../extras"/>
    			<arg line="-application org.eclipse.update.core.siteOptimizer"/>
    			<arg line="-jarProcessor -outputDir ${buildLabel} -processAll -pack ${repack} ${packtmp}/${archiveName}"/>
    	<delete dir="${packtmp}" />
  • Copyright © Eclipse Foundation, Inc. All Rights Reserved.