Skip to main content
summaryrefslogtreecommitdiffstats
blob: 306efb9fb2cf40c4d6ce907e953d3ac0746a60b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
<project
  name="Build specific targets and properties"
  default="noDefault"
  basedir=".">

  <target
    name="init"
    unless="helperInitialized">
    <fail
      unless="postingDirectory"
      message="Eclipse drop directory must be provided (yes, even for Equinox drop site creation)." />

    <fail
      unless="equinoxPostingDirectory"
      message="Root (or parent) of Equinox drop direcotry to be created must be provided." />

    <fail
      unless="eqpublishingContent"
      message="Root of Equinox template and static files must be provided." />

    <fail
      unless="EBuilderDir"
      message="Root of Eclipse Builder (or Tycho Eclipse Builder) must be provided." />

    <property environment="env" />

    <!-- we typically expect TMP_DIR to be set in environnment. But, if not, /tmp might work. -->
    <condition
      property="TMP"
      value="${env.TMP_DIR}"
      else="/tmp">
      <isset property="env.TMP_DIR" />
    </condition>
        <!-- make dir, in case we are first to use it, unlikely as that is -->
    <mkdir dir="$TMP" />
    <echo message="DEBUG: echo properties at start of equinox publish" />
    <echoproperties />
    <property
      name="helperInitialized"
      value="true" />

  </target>
  <target
    name="publish"
    depends="init">
    <echo message="[DEBUG] Equinox helper.xml publish starting" />
        <!-- there are three "buildproperties.* files, each with same variables defined/used
             during the build, such as BUILD_ID, etc. One for PHP, one for Ant, and one for BASH scripts.
             The one for PHP is most likely to be useful on download site.
        -->
    <copy todir="${equinoxPostingDirectory}/${buildId}">
      <fileset
        dir="${postingDirectory}"
        includes="buildproperties.*" />
    </copy>

        <!--
          These two steps were "blindly" copied from previosly eclipsebuilder, buildAll.xml file.
          They were the only two things done for equininox before "publish" was called, so we call
          them as the first step of "publish".
        -->

        <!-- <ant antfile="${EBuilderDir}/equinox/buildConfigs/equinox/build.xml" /> -->
    <ant antfile="${EBuilderDir}/equinox/buildConfigs/equinox-launchers/build.xml" />

    <!-- copy orbit files to equinox download directory (I'm not sure this is necessary any longer?) -->
    <copy
      todir="${equinoxPostingDirectory}/${buildDir}"
      overwrite="true">
      <fileset
        dir="${buildRepo}/plugins"
        includes="org.apache.felix.gogo.*,javax.servlet_*,javax.servlet.jsp_*,org.apache.commons.logging_*,javax.el_*"
        excludes="*.source_*, *.jar.pack.gz" />
    </copy>

    <antcall target="updateTestManifests" />

    <property
      name="generatorClass"
      value="org.eclipse.releng.generators.TestResultsGenerator" />

    <available
      classname="${generatorClass}"
      property="class"
      value="${generatorClass}" />

    <!-- generate md5s and sha1s for bundles -->
    <mkdir dir="${equinoxPostingDirectory}/${buildDir}/checksum" />
    <exec
      executable="/bin/bash"
      dir="${equinoxPostingDirectory}/${buildDir}">
      <arg line="${EBuilderDir}/eclipse/extras/produceChecksum.sh" />
    </exec>


    <!--post clickThroughs. Removed 03/26/2013. There are no clickthroughs for current equinox.
        if ever added back, will have to be re-worked.
        <copy todir="${equinoxPostingDirectory}/${buildDir}">
            <fileset
                dir="${buildDirectory}/maps/org.eclipse.releng"
                includes="clickThroughs/" />
        </copy>
        -->

    <!--copy compile logs to this posting directory. Not sure needed. Is this where API reports come from? -->
    <copy
      todir="${equinoxPostingDirectory}/${buildDir}"
      overwrite="true">
      <fileset
        dir="${postingDirectory}"
        includes="compilelogs/**/plugins/org.eclipse.osgi*/**,compilelogs/**/plugins/org.eclipse.equinox*/**"
        excludes="compilelogs/**/plugins/org.eclipse.osgi.test*/**" />
    </copy>


        <!--post directory.txt.  Removed 03/26/2013. I don't think ever displayed on Equinox page.
        and current directory.txt has limited usefulness.
        <copy
            file="${buildDirectory}/directory.txt"
            todir="${equinoxPostingDirectory}/${buildDir}" />
        -->
    <copy todir="${equinoxPostingDirectory}/${buildDir}">
      <fileset dir="${eqpublishingContent}/staticDropFiles" />
    </copy>

    <!-- regenerate the index page with links to test results.
         Removed 3/26/20113. There are no test results, at this point on initial promote,
         and for at least past year and a half we have never "reran" this to pick up
         test results. I do not see any test results links on DL page .... though,
         probably could be in icons.
         Turns out we still need to run the "indexer" to update DL page, even though
         there are no test results. That's how it fills in the symbols in drop token list.
    -->
    <property
      name="class"
      value="org.eclipse.releng.generators.TestResultsGenerator" />
    <taskdef
      name="indexResults"
      classname="${class}" />

        <!-- equinox uses same test results -->

        <!-- provisioning removed per bug 368488
          dropTokenList="%equinox%,%framework%,%extrabundles%,%other%,%provisioning%,%launchers%,%osgistarterkits%"
          -->
    <indexResults
      isBuildTested="false"
      buildType="${buildType}"
      dropTokenList="%equinox%,%framework%,%extrabundles%,%other%,%launchers%,%osgistarterkits%"
      dropHtmlFileName="index.php"
      xmlDirectoryName="${postingDirectory}/testresults/xml"
      dropDirectoryName="${equinoxPostingDirectory}/${buildDir}"
      dropTemplateFileName="${eqpublishingContent}/templateFiles/index.template.php"
      testResultsHtmlFileName="testResultsTable.html"
      hrefTestResultsTargetPath="testresults"
      hrefCompileLogsTargetPath="compilelogs/plugins/"
      compileLogsDirectoryName="${equinoxPostingDirectory}/${buildDir}/compilelogs/plugins"
      testManifestFileName="${eqpublishingContent}/testManifest.xml" />

    <echo message="[DEBUG] Equinox helper.xml publish ending normally" />
  </target>


  <target
    name="updateTestManifests"
    depends="init">
    <echo message="Starting updateTestManifest" />
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.app" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.console" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.supplement" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.device" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.event" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.launcher" />
    </antcall>

    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.region" />
    </antcall>

    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.metatype" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.useradmin" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.osgi" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.osgi.util" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.osgi.services" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.registry" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.preferences" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.common" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.cm" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.ds" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.http" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.http.jetty" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.io" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.ip" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.jsp.jasper" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.jsp.jasper.registry" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.http.registry" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.http.servlet" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.http.servletbridge" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.servletbridge" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.transforms.hook" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.transforms.xslt" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.util" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.wireadmin" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="javax.servlet" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="javax.servlet.jsp" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="javax.el" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.apache.commons.logging" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.apache.felix.gogo.command" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.apache.felix.gogo.runtime" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.apache.felix.gogo.shell" />
    </antcall>

    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.simpleconfigurator" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.concurrent" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.coordinator" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.equinox.region" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.continuation" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.security" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.util" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.http" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.http" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.server" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.io" />
    </antcall>
    <antcall target="updateTestManifest">
      <param
        name="bundle.id"
        value="org.eclipse.jetty.servlet" />
    </antcall>
  </target>

  <!-- ===================================================================== -->
  <!-- Helper targets -->
  <!-- ===================================================================== -->
  <target
    name="updateTestManifest"
    depends="init">
    <apply
      executable="ls"
      output="${TMP}/${bundle.id}.txt"
      dir="${equinoxPostingDirectory}/${buildDir}">
      <fileset dir="${equinoxPostingDirectory}/${buildDir}">
        <patternset>
          <include name="${bundle.id}*.jar" />
        </patternset>
      </fileset>
    </apply>

    <replaceregexp
      file="${TMP}/${bundle.id}.txt"
      match="/.+/"
      replace="" />
    <replaceregexp
      file="${TMP}/${bundle.id}.txt"
      match="\.jar"
      replace="" />
    <replaceregexp
      file="${TMP}/${bundle.id}.txt"
      match="\n"
      replace="" />
    <loadfile
      property="bundle.jar"
      srcFile="${TMP}/${bundle.id}.txt"
      failonerror="off" />
    <delete
      file="${TMP}/${bundle.id}.txt"
      failonerror="false" />
    <replace
      file="${eqpublishingContent}/testManifest.xml"
      token="@${bundle.id}@"
      value="${bundle.jar}" />
  </target>


  <!-- ===================================================================== -->
  <!-- Default target                                                        -->
  <!-- ===================================================================== -->
  <target name="noDefault">
    <echo message="You must specify a target when invoking this file" />
  </target>

</project>

Back to the top