18 |
18 |
19 Description: |
19 Description: |
20 |
20 |
21 ============================================================================ |
21 ============================================================================ |
22 --> |
22 --> |
|
23 <!--* @package publishing --> |
23 <project name="publish" xmlns:hlm="http://www.nokia.com/helium"> |
24 <project name="publish" xmlns:hlm="http://www.nokia.com/helium"> |
24 <description> |
25 <description> |
25 Zipping, delta zipping and copying targets |
26 Zipping, delta zipping and copying targets |
26 </description> |
27 </description> |
27 |
28 |
28 <import file="subcon.ant.xml" /> |
29 <!--* @property delta.zip.file.size |
|
30 Define the file size of the zipped up released file, this is then used by delta zipping code to determine if a delta zip is required or a full zip should be created. The delta zip will only be published if it is less than 1/2 the size of this property |
|
31 @type string |
|
32 @editable required |
|
33 @scope public |
|
34 --> |
|
35 |
|
36 <!--* @property file-comparison.left_side |
|
37 The fileset id used on the left side of comparison. |
|
38 @type string |
|
39 @editable required |
|
40 @scope public |
|
41 --> |
|
42 |
|
43 <!--* @property file-comparison.right_side |
|
44 The fileset id used on the right side of comparison. |
|
45 @type string |
|
46 @editable required |
|
47 @scope public |
|
48 --> |
|
49 |
29 <import file="internal-api/internal-api.ant.xml" /> |
50 <import file="internal-api/internal-api.ant.xml" /> |
30 <import file="nwiki.ant.xml" /> |
51 <import file="nwiki.ant.xml" /> |
31 <import file="synergy.ant.xml" /> |
52 <import file="synergy.ant.xml" /> |
32 <import file="test/test2_publishing_to_diamonds.ant.xml" /> |
53 <import file="test/test2_publishing_to_diamonds.ant.xml" /> |
33 |
54 |
|
55 <!-- Set the maximum number of threads running for archiving (for a parallel job). |
|
56 @type integer |
|
57 --> |
34 <property name="archive.max.number.of.threads" value="8" /> |
58 <property name="archive.max.number.of.threads" value="8" /> |
35 |
59 |
36 <fileset id="publish.files" dir="${build.output.dir}"> |
60 <fileset id="publish.files" dir="${build.output.dir}"> |
37 <include name="logs/**/*" /> |
61 <include name="logs/**/*" /> |
38 <exclude name="logs/**/*_ant_build.log" /> |
62 <exclude name="logs/**/*_ant_build.log" /> |
69 <fileset id="publish.files4" dir="${build.output.dir}"> |
93 <fileset id="publish.files4" dir="${build.output.dir}"> |
70 <include name="release_flash_images/**/*" /> |
94 <include name="release_flash_images/**/*" /> |
71 </fileset> |
95 </fileset> |
72 |
96 |
73 <!-- list of filesets --> |
97 <!-- list of filesets --> |
|
98 <!-- The fileset id which will be upload |
|
99 @type string |
|
100 --> |
74 <property name="publish.fileset.ids" value="publish.files1,publish.files2,publish.files3,publish.files4" /> |
101 <property name="publish.fileset.ids" value="publish.files1,publish.files2,publish.files3,publish.files4" /> |
75 |
102 |
76 <fileset id="helium.files" dir="${helium.dir}"> |
103 <fileset id="helium.files" dir="${helium.dir}"> |
77 <include name="*.bat" /> |
104 <include name="*.bat" /> |
78 <include name="**/*.ant.xml" /> |
105 <include name="**/*.ant.xml" /> |
335 <!-- Don't print 'compressing' on console --> |
366 <!-- Don't print 'compressing' on console --> |
336 <hlm:logtoconsole action="stop" /> |
367 <hlm:logtoconsole action="stop" /> |
337 <!-- Stops writing on ...ant_build.log file--> |
368 <!-- Stops writing on ...ant_build.log file--> |
338 <hlm:startSpecificLogMacro name="${zip.@{type}.log.file}" phase="@{phase}"/> |
369 <hlm:startSpecificLogMacro name="${zip.@{type}.log.file}" phase="@{phase}"/> |
339 |
370 |
|
371 <!-- Path to the parsed file of zip specification file |
|
372 @type string |
|
373 @scope private |
|
374 --> |
340 <property name="zip.config.file.parsed" location="${temp.build.dir}/zip.cfg.xml.parsed" /> |
375 <property name="zip.config.file.parsed" location="${temp.build.dir}/zip.cfg.xml.parsed" /> |
341 <copy file="@{file}" tofile="${zip.config.file.parsed}" overwrite="true"> |
376 <copy file="@{file}" tofile="${zip.config.file.parsed}" overwrite="true"> |
342 <filterchain> |
377 <filterchain> |
343 <expandproperties /> |
378 <expandproperties /> |
344 </filterchain> |
379 </filterchain> |
500 <!-- Zips the trace rom content --> |
538 <!-- Zips the trace rom content --> |
501 <target name="zip-trace-roms" unless="skip-zips"> |
539 <target name="zip-trace-roms" unless="skip-zips"> |
502 <hlm:zipContentMacro type="trace_roms" file="${zip.config.file}" /> |
540 <hlm:zipContentMacro type="trace_roms" file="${zip.config.file}" /> |
503 </target> |
541 </target> |
504 |
542 |
505 |
|
506 <!-- Zips the trace rom content --> |
|
507 <target name="zip-uda-roms" unless="skip-zips"> |
|
508 <hlm:zipContentMacro type="uda_roms" file="${zip.config.file}" /> |
|
509 </target> |
|
510 |
|
511 |
|
512 <!-- Zips .loc files into individual packages. --> |
|
513 <target name="zip-loc-files"> |
|
514 <mkdir dir="${temp.loc.dir}" /> |
|
515 <exec executable="perl" dir="${build.drive}/" failonerror="${failonerror}"> |
|
516 <arg file="${helium.dir}/tools/publish/get_loc_files.pl" /> |
|
517 <arg value="${build.drive}" /> |
|
518 </exec> |
|
519 <zip destfile="${loc.output.dir}/${loc.output.filename}" basedir="${temp.loc.dir}" /> |
|
520 </target> |
|
521 |
|
522 |
|
523 <!-- Publishes the content defined by the filesets at the top of this project. |
543 <!-- Publishes the content defined by the filesets at the top of this project. |
524 |
544 |
525 The files are split into 4 filesets to parallelize the publish operation: |
545 The files are split into 4 filesets to parallelize the publish operation: |
526 |
546 |
527 * publish.files1 |
547 * publish.files1 |
619 print "SMTP server " + smtpserver + " unavailable!! Unable to send log to " , toaddrs |
639 print "SMTP server " + smtpserver + " unavailable!! Unable to send log to " , toaddrs |
620 |
640 |
621 </hlm:python> |
641 </hlm:python> |
622 </target> |
642 </target> |
623 |
643 |
624 |
|
625 <!-- Reports on the status of the build, through other targets. --> |
644 <!-- Reports on the status of the build, through other targets. --> |
626 <target name="report" depends="binary-sizes-log" unless="env.HLM_SUBCON"> |
645 <target name="report" depends="binary-sizes-log"/> |
627 <antcall target="rndsdk-create-api-descr-xml" /> |
|
628 </target> |
|
629 |
|
630 |
646 |
631 <!-- Delta zips --> |
647 <!-- Delta zips --> |
632 |
648 |
|
649 <!-- Output location |
|
650 @type string |
|
651 @scope private |
|
652 --> |
633 <property name="delta.zip.location" value="${build.output.dir}/build_area/delta_zip" /> |
653 <property name="delta.zip.location" value="${build.output.dir}/build_area/delta_zip" /> |
|
654 <!-- Temp location |
|
655 @type string |
|
656 @scope private |
|
657 --> |
634 <property name="delta.zip.temp.location" value="${temp.build.dir}/delta_zip" /> |
658 <property name="delta.zip.temp.location" value="${temp.build.dir}/delta_zip" /> |
|
659 <!-- The zip file |
|
660 @type string |
|
661 @scope private |
|
662 --> |
635 <property name="delta.zip.file" value="${delta.zip.location}/${build.id}_delta_zip.zip" /> |
663 <property name="delta.zip.file" value="${delta.zip.location}/${build.id}_delta_zip.zip" /> |
|
664 <!-- Define the file size of the zipped up released file, this is then used by delta zipping code to determine if a delta zip is required or a full zip should be created. The delta zip will only be published if it is less than 1/2 the size of this property |
|
665 @type string |
|
666 --> |
636 <property name="delta.zip.file.size" value="11000000" /> |
667 <property name="delta.zip.file.size" value="11000000" /> |
637 <!--default value of approx 11GB--> |
668 <!--default value of approx 11GB--> |
638 |
669 |
|
670 <!-- Special Instructions file for SymDEC |
|
671 @type string |
|
672 @scope private |
|
673 --> |
639 <property name="delta.zip.delete.file" value="${delta.zip.location}/specialInstructions.xml" /> |
674 <property name="delta.zip.delete.file" value="${delta.zip.location}/specialInstructions.xml" /> |
|
675 <!-- Temp file |
|
676 @type string |
|
677 @scope private |
|
678 --> |
640 <property name="delta.ant.file" value="${delta.zip.temp.location}/delta_zip.ant.xml" /> |
679 <property name="delta.ant.file" value="${delta.zip.temp.location}/delta_zip.ant.xml" /> |
|
680 <!-- Output location of md5 file |
|
681 @type string |
|
682 @scope private |
|
683 --> |
641 <property name="md5.signature.file" value="${delta.zip.location}/${build.id}.md5" /> |
684 <property name="md5.signature.file" value="${delta.zip.location}/${build.id}.md5" /> |
|
685 <!-- Number of partial md5 files to use during creation |
|
686 @type string |
|
687 @scope private |
|
688 --> |
642 <property name="md5.split" value="100" /> |
689 <property name="md5.split" value="100" /> |
643 <!-- old.md5.file needs to be specified by the user --> |
690 <!-- old.md5.file needs to be specified by the user --> |
644 |
691 |
645 |
692 |
646 <!-- Private: Patch evalid tool --> |
693 <!-- Patch evalid tool. @scope private--> |
647 <target name="patch-evalid"> |
694 <target name="patch-evalid"> |
648 <patch patchfile="${helium.dir}/tools/publish/evalidmd5.patch" originalfile="${build.drive}/epoc32/tools/evalidmd5.pm" /> |
695 <patch patchfile="${helium.dir}/tools/publish/evalidmd5.patch" originalfile="${build.drive}/epoc32/tools/evalidmd5.pm" /> |
649 </target> |
696 </target> |
650 |
697 |
651 |
698 |
652 <!-- Private: Revert evalid patch --> |
699 <!-- Revert evalid patch. @scope private--> |
653 <target name="unpatch-evalid"> |
700 <target name="unpatch-evalid"> |
654 <patch reverse="true" patchfile="${helium.dir}/tools/publish/evalidmd5.patch" originalfile="${build.drive}/epoc32/tools/evalidmd5.pm" /> |
701 <patch reverse="true" patchfile="${helium.dir}/tools/publish/evalidmd5.patch" originalfile="${build.drive}/epoc32/tools/evalidmd5.pm" /> |
655 </target> |
702 </target> |
656 |
703 |
657 |
704 |
658 <!-- Private: Copy extra tool for evalid --> |
705 <!-- Copy extra tool for evalid. @scope private--> |
659 <target name="pre-build-md5" depends="patch-evalid"> |
706 <target name="pre-build-md5" depends="patch-evalid"> |
660 <copy todir="${build.drive}\epoc32\tools" file="${helium.dir}/tools/publish/evalid_multiple.pl" /> |
707 <copy todir="${build.drive}\epoc32\tools" file="${helium.dir}/tools/publish/evalid_multiple.pl" /> |
661 </target> |
708 </target> |
662 |
709 |
663 |
710 |
664 <!-- Private: Revert patches --> |
711 <!-- Revert patches. @scope private--> |
665 <target name="post-build-md5" depends="unpatch-evalid" /> |
712 <target name="post-build-md5" depends="unpatch-evalid" /> |
666 |
713 |
667 |
714 |
668 <!-- Private: Generate a list of checksums for all files in the build area using EBS system --> |
715 <!-- Generate a list of checksums for all files in the build area using EBS system. @scope private--> |
669 <target name="build-md5-ebs" depends="pre-build-md5"> |
716 <target name="build-md5-ebs" depends="pre-build-md5"> |
670 <mkdir dir="${delta.zip.location}" /> |
717 <mkdir dir="${delta.zip.location}" /> |
671 <hlm:python failonerror="true"> |
718 <hlm:python failonerror="true"> |
672 import os |
719 import os |
673 import delta_zip |
720 import delta_zip |
693 </target> |
740 </target> |
694 |
741 |
695 |
742 |
696 <!-- Generate a list of checksums for all files in the build area --> |
743 <!-- Generate a list of checksums for all files in the build area --> |
697 <target name="build-md5"> |
744 <target name="build-md5"> |
|
745 <!-- Comma seperated excluded directories from the zip |
|
746 @type string |
|
747 @scope public |
|
748 --> |
698 <property name="delta.exclude.commasep" value="epoc32_save.zip,output/**/*,delta_zips/**/*,temp/**/*,epoc32/**/*.sym,epoc32/BUILD/**/*" /> |
749 <property name="delta.exclude.commasep" value="epoc32_save.zip,output/**/*,delta_zips/**/*,temp/**/*,epoc32/**/*.sym,epoc32/BUILD/**/*" /> |
699 <echo>build MD5 started</echo> |
750 <echo>build MD5 started</echo> |
700 <if> |
751 <if> |
701 <isset property="build.system.ec-helium" /> |
752 <isset property="build.system.ec-helium" /> |
702 <then> |
753 <then> |
833 |
888 |
834 <!-- Update the build status by processing the ant build output log --> |
889 <!-- Update the build status by processing the ant build output log --> |
835 <target name="build-status"> |
890 <target name="build-status"> |
836 <hlm:metadatarecord database="${metadata.dbfile}"> |
891 <hlm:metadatarecord database="${metadata.dbfile}"> |
837 <hlm:antmetadatainput> |
892 <hlm:antmetadatainput> |
838 <fileset casesensitive="false" file="${build.log.dir}/${build.id}_ant_build.log" /> |
893 <fileset casesensitive="false" file="${build.log}" /> |
839 <metadatafilterset refid="filterset.ant.output" /> |
894 <metadatafilterset refid="filterset.ant.output" /> |
840 </hlm:antmetadatainput> |
895 </hlm:antmetadatainput> |
841 </hlm:metadatarecord> |
896 </hlm:metadatarecord> |
842 |
897 |
843 <hlm:signalMacro logfile="${build.id}_ant_build.log" |
898 <hlm:signalMacro logfile="${build.log}" |
844 signal.input="exceptionSignalInput" /> |
899 signal.input="exceptionSignalInput" /> |
845 </target> |
900 </target> |
846 |
901 |
847 <!-- Exception handler to process the ant output log --> |
902 <!-- Exception handler to process the ant output log --> |
848 <target name="hlm-exception-handler"> |
903 <target name="hlm-exception-handler"> |
849 <if> |
904 <if> |
850 <available file="${build.log.dir}/${build.id}_ant_build.log"/> |
905 <available file="${build.log}"/> |
851 <then> |
906 <then> |
852 <runtarget target="do-exception-handler" /> |
907 <runtarget target="do-exception-handler" /> |
853 </then> |
908 </then> |
854 </if> |
909 </if> |
855 </target> |
910 </target> |