80 |
80 |
81 |
81 |
82 <h2>Target sf-check-env</h2> |
82 <h2>Target sf-check-env</h2> |
83 |
83 |
84 <p><b>Location</b></p> |
84 <p><b>Location</b></p> |
85 <p> <tt class="docutils literal"><a href="/D:/maintools/sf-config/common/build.xml#L99">D:\maintools\sf-config\common\build.xml:99:</a></tt> |
85 <p> <tt class="docutils literal"><a href="/d:/maintools/sf-config/common/build.xml#L95">d:\maintools\sf-config\common\build.xml:95:</a></tt> |
86 </p> |
86 </p> |
87 |
87 |
88 <p><b>Conditional execution</b></p> |
88 <p><b>Conditional execution</b></p> |
89 <p>No conditions on target execution.</p> |
89 <p>No conditions on target execution.</p> |
90 <hr/> |
90 <hr/> |
145 |
148 |
146 |
149 |
147 <h3>Source code</h3> |
150 <h3>Source code</h3> |
148 <pre> |
151 <pre> |
149 <target name="sf-check-env"> |
152 <target name="sf-check-env"> |
150 |
|
151 <!-- Conditional location of BuildEnv.xml. Project always preferred to default --> |
153 <!-- Conditional location of BuildEnv.xml. Project always preferred to default --> |
152 <if><available file="${sf.project.location}/BuildEnv.xml"/> |
154 <if><available file="${sf.project.location}/BuildEnv.xml"/> |
153 <then> |
155 <then> |
154 <property name="sf.buildenv.location" value="${sf.project.location}"/> |
156 <property name="sf.buildenv.location" value="${sf.project.location}"/> |
155 </then> |
157 </then> |
157 <property name="sf.buildenv.location" value="${sf.common.config.dir}/tools"/> |
159 <property name="sf.buildenv.location" value="${sf.common.config.dir}/tools"/> |
158 </else> |
160 </else> |
159 </if> |
161 </if> |
160 |
162 |
161 <echo message="Build Env against ${sf.buildenv.location}/BuildEnv.xml"/> |
163 <echo message="Build Env against ${sf.buildenv.location}/BuildEnv.xml"/> |
162 <exec executable="perl" dir="${sf.common.config.dir}/tools" failonerror="true"> |
164 <exec executable="perl" dir="${sf.common.config.dir}/tools" resultproperty="sf.checkenv.exit"> |
163 <arg value="CheckBuildEnv.pl"/> |
165 <arg value="CheckBuildEnv.pl"/> |
164 <arg value="--xml=${sf.buildenv.location}/BuildEnv.xml"/> |
166 <arg value="--xml=${sf.buildenv.location}/BuildEnv.xml"/> |
165 <arg value="--dbg=${build.log.dir}/BuildEnvironmentCheck.log"/> |
167 <arg value="--dbg=${build.log.dir}/BuildEnvironmentCheck.log"/> |
166 <arg value="--sbs='${sf.spec.sbs.config}'"/> |
168 <arg value="--sbs='${sf.spec.sbs.config}'"/> |
167 <arg value="--tools='${sf.spec.sbs.tools.config}'"/> |
169 <arg value="--tools='${sf.spec.sbs.tools.config}'"/> |
168 <arg value="Common"/> |
170 <arg value="Common"/> |
169 </exec> |
171 </exec> |
|
172 <exec executable="perl" failonerror="false" output="${build.log.dir}/summary/BuildEnvironmentCheck_BRAG.xml" logError="true"> |
|
173 <arg value="${sf.common.config.dir}/tools/brag/logToBRAG.pl"/> |
|
174 <arg value="--phase=Prebuild"/> |
|
175 <arg value="--step=Build Environment Check"/> |
|
176 <arg value="--rules=${sf.common.config.dir}/tools/brag/rules.BuildEnvironmentCheck.tsv"/> |
|
177 <arg value="${build.log.dir}/BuildEnvironmentCheck.log"/> |
|
178 </exec> |
|
179 <fail> |
|
180 <condition> |
|
181 <not> |
|
182 <or> |
|
183 <equals arg1="sf.checkenv.exit" arg2="0"/> |
|
184 <isset property="sf.suppress.buildenv.check"/> |
|
185 </or> |
|
186 </not> |
|
187 </condition> |
|
188 Build Environment Check failed. To stop this failure aborting the build set property sf.suppress.buildenv.check to any value. |
|
189 </fail> |
170 </target> |
190 </target> |
171 </pre> |
191 </pre> |
172 |
192 |
173 |
193 |
174 <hr/> |
194 <hr/> |