98 </if> |
98 </if> |
99 <stopwatch name="sf-postbuild" action="elapsed"/> |
99 <stopwatch name="sf-postbuild" action="elapsed"/> |
100 </target> |
100 </target> |
101 |
101 |
102 <target name="sf-tag-hg-code"> |
102 <target name="sf-tag-hg-code"> |
103 <property name="sf.tagafterbuild.tag" value="${sf.spec.job.name}_${sf.spec.job.codeline}.${sf.spec.job.number}"/> |
103 <!-- To do the tagging, we need to know what tag to use, and who the author is (from hg's perspective) --> |
|
104 <fail message="This target needs to have all the details specified, or to be run interactively so it can query the user"> |
|
105 <condition> |
|
106 <and> |
|
107 <isset property="sf.hudson.executor.number"/> |
|
108 <not> |
|
109 <or> |
|
110 <isset property="sf.tagafterbuild.tag"/> |
|
111 <isset property="sf.hg.ui.username"/> |
|
112 </or> |
|
113 </not> |
|
114 </and> |
|
115 </condition> |
|
116 </fail> |
|
117 |
|
118 <!-- Ask the user, interactively, what tag to use --> |
|
119 <input addproperty="sf.tagafterbuild.tag" message="Enter the tag to apply to the code (eg "PDK_1.0.1"):"/> |
|
120 <fail message="No tag supplied"> |
|
121 <condition> |
|
122 <length string="${sf.tagafterbuild.tag}" trim="true" length="0"/> |
|
123 </condition> |
|
124 </fail> |
|
125 |
|
126 <!-- Now get the username sorted out --> |
|
127 <exec executable="hg" outputproperty="sf.hg.showconfig.ui.username"> |
|
128 <arg value="showconfig"/> |
|
129 <arg value="ui.username"/> |
|
130 </exec> |
|
131 <input addproperty="sf.hg.ui.username" message="Enter hg author credentials (eg "Fred Bloggs <fredb@example.org>") default is" defaultvalue="${sf.hg.showconfig.ui.username}"/> |
|
132 <fail message="No author supplied"> |
|
133 <condition> |
|
134 <length string="${sf.hg.ui.username}" trim="true" length="0"/> |
|
135 </condition> |
|
136 </fail> |
|
137 |
104 <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl" |
138 <fmpp sourceFile="${sf.common.config.dir}/templates/tag-hg-code.ant.xml.ftl" |
105 outputFile="${temp.build.dir}/tag-hg-code.ant.xml"> |
139 outputFile="${temp.build.dir}/tag-hg-code.ant.xml"> |
106 <data expandProperties="yes"> |
140 <data expandProperties="yes"> |
107 ant: antProperties() |
141 ant: antProperties() |
108 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','}) |
142 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','}) |
109 </data> |
143 </data> |
110 </fmpp> |
144 </fmpp> |
111 <ant antfile="${temp.build.dir}/tag-hg-code.ant.xml"/> |
145 <ant antfile="${temp.build.dir}/tag-hg-code.ant.xml"/> |
|
146 </target> |
|
147 |
|
148 <target name="sf-push-hg-tags"> |
|
149 <!-- To do the pushing, we need to have a set of credentials for the developer.symbian.org site --> |
|
150 <fail message="This target needs to have loging credentials specified specified, or to be run interactively so it can query the user"> |
|
151 <condition> |
|
152 <and> |
|
153 <isset property="sf.hudson.executor.number"/> |
|
154 <not> |
|
155 <or> |
|
156 <isset property="sf.symbian.account.username"/> |
|
157 <isset property="sf.symbian.account.password"/> |
|
158 </or> |
|
159 </not> |
|
160 </and> |
|
161 </condition> |
|
162 </fail> |
|
163 |
|
164 <input addproperty="sf.symbian.account.username" message="Enter symbian.org username (eg "fredb")"/> |
|
165 <fail message="No author supplied"> |
|
166 <condition> |
|
167 <length string="${sf.hg.ui.username}" trim="true" length="0"/> |
|
168 </condition> |
|
169 </fail> |
|
170 |
|
171 <input addproperty="sf.symbian.account.password" message="Enter symbian.org password (eg "unguessable")"> |
|
172 <!-- Ant 1.8 supports secure here, which would be an improvement... --> |
|
173 <handler type="default"/> |
|
174 </input> |
|
175 <fail message="No password supplied"> |
|
176 <condition> |
|
177 <length string="${sf.hg.ui.password}" trim="true" length="0"/> |
|
178 </condition> |
|
179 </fail> |
|
180 |
|
181 <if> |
|
182 <not> |
|
183 <available file="${build.drive}/tagging" type="dir"/> |
|
184 </not> |
|
185 <then> |
|
186 <!-- No dir with tagged repos in - create them! --> |
|
187 <runtarget target="sf-tag-hg-code"/> |
|
188 </then> |
|
189 </if> |
|
190 |
|
191 <fmpp sourceFile="${sf.common.config.dir}/templates/push-hg-tags.ant.xml.ftl" |
|
192 outputFile="${temp.build.dir}/push-hg-tags.ant.xml"> |
|
193 <data expandProperties="yes"> |
|
194 ant: antProperties() |
|
195 data: csv(${sf.spec.sourcesync.sourcespecdir}/${sf.spec.sourcesync.sourcespecfile}, {separator:','}) |
|
196 </data> |
|
197 </fmpp> |
|
198 <ant antfile="${temp.build.dir}/push-hg-tags.ant.xml"/> |
112 </target> |
199 </target> |
113 |
200 |
114 <target name="sf-run-evalid" > |
201 <target name="sf-run-evalid" > |
115 <delete dir="${build.drive}/output/md5"/> |
202 <delete dir="${build.drive}/output/md5"/> |
116 <mkdir dir="${build.drive}/output/md5"/> |
203 <mkdir dir="${build.drive}/output/md5"/> |
628 <exec executable="perl" dir="${build.drive}"> |
715 <exec executable="perl" dir="${build.drive}"> |
629 <arg value="${sf.common.config.dir}/tools/uh2diamonds.pl"/> |
716 <arg value="${sf.common.config.dir}/tools/uh2diamonds.pl"/> |
630 </exec> |
717 </exec> |
631 <echo message="Send ${build.log.dir}/diamonds_uh.xml to Diamonds"/> |
718 <echo message="Send ${build.log.dir}/diamonds_uh.xml to Diamonds"/> |
632 <exec executable="python"> |
719 <exec executable="python"> |
633 <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/> |
720 <arg value="${sf.common.config.dir}/tools/brag/send_xml_to_diamonds.py"/> |
634 <arg value="-u"/> |
721 <arg value="-u"/> |
635 <arg value="http://${diamonds.host}${diamonds.build.id}"/> |
722 <arg value="http://${diamonds.host}${diamonds.build.id}"/> |
636 <arg value="-f"/> |
723 <arg value="-f"/> |
637 <arg value="${build.log.dir}/diamonds_uh.xml"/> |
724 <arg value="${build.log.dir}/diamonds_uh.xml"/> |
638 </exec> |
725 </exec> |
639 </then> |
726 </then> |
640 </if> |
727 </if> |
641 </target> |
728 </target> |
642 |
729 |
643 <target name="sf-links-to-diamonds"> |
730 <target name="sf-links-to-diamonds"> |
779 <exclude name="output/logs/BOM/**"/> |
866 <exclude name="output/logs/BOM/**"/> |
780 <exclude name="output/logs/deliverables/**"/> |
867 <exclude name="output/logs/deliverables/**"/> |
781 <exclude name="output/logs/releaseables/**"/> |
868 <exclude name="output/logs/releaseables/**"/> |
782 </zip> |
869 </zip> |
783 <!-- workaround for the time when when 'sf-run-analysis-raptor' has not been run --> |
870 <!-- workaround for the time when when 'sf-run-analysis-raptor' has not been run --> |
784 <mkdir dir="${build.drive}/output/logs/releaseables"/> |
871 <mkdir dir="${build.drive}/output/logs/releaseables"/> |
785 <zip destfile="${build.output.dir}/zips/release/build_BOM.zip"> |
872 <if> |
786 <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/> |
873 <available file="${build.drive}/output/logs/package_definitions" type="dir"/> |
787 <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/> |
874 <then> |
788 <zipfileset dir="${build.drive}/output/logs" prefix="build_info/logs/BOM"> |
875 <zip destfile="${build.output.dir}/zips/release/build_BOM.zip"> |
789 <include name="envinfo.txt"/> |
876 <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/> |
790 </zipfileset> |
877 <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/> |
791 <zipfileset dir="${build.drive}/output/logs/package_definitions" prefix="build_info/package_definitions"/> |
878 <zipfileset dir="${build.drive}/output/logs" prefix="build_info/logs/BOM"> |
792 </zip> |
879 <include name="envinfo.txt"/> |
|
880 </zipfileset> |
|
881 <zipfileset dir="${build.drive}/output/logs/package_definitions" prefix="build_info/package_definitions"/> |
|
882 </zip> |
|
883 </then> |
|
884 <else> |
|
885 <zip destfile="${build.output.dir}/zips/release/build_BOM.zip"> |
|
886 <zipfileset dir="${build.drive}/output/logs/BOM" prefix="build_info/logs/BOM"/> |
|
887 <zipfileset dir="${build.drive}/output/logs/releaseables" prefix="build_info/logs/releaseables"/> |
|
888 <zipfileset dir="${build.drive}/output/logs" prefix="build_info/logs/BOM"> |
|
889 <include name="envinfo.txt"/> |
|
890 </zipfileset> |
|
891 </zip> |
|
892 </else> |
|
893 </if> |
793 <antcall target="sf-zip-content"> |
894 <antcall target="sf-zip-content"> |
794 <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/> |
895 <param name="zip.config.file" value="${temp.build.dir}/zip.cfg.xml.ftl"/> |
795 <param name="zip.target.name" value="info-just-metadata" /> |
896 <param name="zip.target.name" value="info-just-metadata" /> |
796 </antcall> |
897 </antcall> |
797 </then> |
898 </then> |