Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Modeling Project Builds/Utilities"

(download-artifacts.xml & download-artifacts.xsl)
(download-artifacts.xml & download-artifacts.xsl)
Line 6: Line 6:
 
:[<build type>]<build timestamp in format "YYYYMMDDhhmm">
 
:[<build type>]<build timestamp in format "YYYYMMDDhhmm">
  
for instance (in case the build type - “S" in this case - was available):
+
for instance (in case the build type - "S" in this example - was available):
  
 
:S201012161737
 
:S201012161737

Revision as of 15:17, 3 January 2011

This document describes utilities I've put together to simplify promotion of project builds run on a Hudson CI server. All of the utilities can be found on the build.eclipse.org server, in the /shared/modeling/tools/promotion/ directory.

download-artifacts.xml & download-artifacts.xsl

An ant script (complemented with an xsl stylesheet) to download artifacts produced by a single Hudson build. The artifacts are downloaded to a subdirectory of the current working directory; the name of the subdirectory is based on the timestamp of the specified Hudson build and (if available) on the build type:

[<build type>]<build timestamp in format "YYYYMMDDhhmm">

for instance (in case the build type - "S" in this example - was available):

S201012161737

or (in case the build type was not available) just:

201012161737

usage:

/shared/common/apache-ant-1.7.1/bin/ant -f /shared/modeling/tools/promotion/download-artifacts.xml -Dbuild.url=<build URL> [ -Dartifact.prefix=<prefix> ]

where:

build' 'URL is a URL of the build that produced the artifacts to be downloaded, for instance:
https://hudson.eclipse.org/hudson/job/emf-cdo-integration/952
prefix is a prefix of artifacts (of their relative paths) which should be included in the download; artifacts with relative paths not starting with the specified prefix won't be included in the download; the prefix will also be stripped off of the relative paths of the artifacts before they are stored in the local filesystem

example

/shared/common/apache-ant-1.7.1/bin/ant -f /shared/modeling/tools/promotion/download-artifacts.xml -Dbuild.url=https://hudson.eclipse.org/hudson/job/emf-cdo-integration/948 -Dartifact.prefix=result/site.p2/

unpack-iu.xml

An ant script to unpack (using the unpack200 tool) selected artifact from a p2 repository and update the repository metadata accordingly. The purpose of this tool is to be able to unpack artifacts known to cause problems when being unpacked with an older version of the unpack200 tool in advance with the newer version of the tool and thus avoid the problems.

usage:

cd <repository path>
ant -f /shared/modeling/tools/promotion/unpack-iu.xml -Dunpack.iu=<IU to unpack>

where:

repository' 'path is a directory in which the p2 repository containing the artifact to be unpacked resides
IU' 'to' 'unpack is the p2 ID of the IU corresponding to the artifact to be unpacked

example

cd S201012140905/

ant -f /shared/modeling/tools/promotion/unpack-iu.xml -Dunpack.iu=org.apache.derby

manage-composite.xml

An ant script to simplify management of p2 composite repositories. It can add and remove child repositories from a composite repository.

usage:

cd <composite repository path>
ant -f /shared/modeling/tools/promotion/manage-composite.xml { add | remove } -Dchild.repository=<child repository URL> [ -Dcomposite.name=<composite repository name> ]

where:

composite' 'repository' 'path is a directory containing the composite repository (or a directory where the composite repository is to be created)
child'.'repository is a URL of the child repository to be added/removed from the composite; note that the URL can be (and most often is) a relative URL
composite.name is a name of the composite repository; this name is only used when a new composite repository is created, it is ignored if the repository already exists

example

cd /home/data/httpd/download.eclipse.org/modeling/emf/cdo/updates/4.0-milestones/

ant -f /shared/modeling/tools/promotion/manage-composite.xml add -Dchild.repository=S201012140905

mirror-repository.xml

An ant script to mirror one repository into another. It adds all artifacts (and associated metadata) found in one (source) repository into the other (target) repository.

usage:

cd <target repository path>
ant -f /shared/modeling/tools/promotion/mirror-repository.xml -Drepository=

Invalid language.

You need to specify a language like this: <source lang="html4strict">...</source>

Supported languages for syntax highlighting:

4cs, 6502acme, 6502kickass, 6502tasm, 68000devpac, abap, actionscript, actionscript3, ada, algol68, apache, applescript, apt_sources, arm, asm, asp, asymptote, autoconf, autohotkey, autoit, avisynth, awk, bascomavr, bash, basic4gl, bf, bibtex, blitzbasic, bnf, boo, c, c_loadrunner, c_mac, caddcl, cadlisp, cfdg, cfm, chaiscript, cil, clojure, cmake, cobol, coffeescript, cpp, cpp-qt, csharp, css, cuesheet, d, dcl, dcpu16, dcs, delphi, diff, div, dos, dot, e, ecmascript, eiffel, email, epc, erlang, euphoria, f1, falcon, fo, fortran, freebasic, freeswitch, fsharp, gambas, gdb, genero, genie, gettext, glsl, gml, gnuplot, go, groovy, gwbasic, haskell, haxe, hicest, hq9plus, html4strict, html5, icon, idl, ini, inno, intercal, io, j, java, java5, javascript, jquery, kixtart, klonec, klonecpp, latex, lb, ldif, lisp, llvm, locobasic, logtalk, lolcode, lotusformulas, lotusscript, lscript, lsl2, lua, m68k, magiksf, make, mapbasic, matlab, mirc, mmix, modula2, modula3, mpasm, mxml, mysql, nagios, netrexx, newlisp, nsis, oberon2, objc, objeck, ocaml, ocaml-brief, octave, oobas, oorexx, oracle11, oracle8, otj, oxygene, oz, parasail, parigp, pascal, pcre, per, perl, perl6, pf, php, php-brief, pic16, pike, pixelbender, pli, plsql, postgresql, povray, powerbuilder, powershell, proftpd, progress, prolog, properties, providex, purebasic, pycon, pys60, python, q, qbasic, rails, rebol, reg, rexx, robots, rpmspec, rsplus, ruby, sas, scala, scheme, scilab, sdlbasic, smalltalk, smarty, spark, sparql, sql, stonescript, systemverilog, tcl, teraterm, text, thinbasic, tsql, typoscript, unicon, upc, urbi, uscript, vala, vb, vbnet, vedit, verilog, vhdl, vim, visualfoxpro, visualprolog, whitespace, whois, winbatch, xbasic, xml, xorg_conf, xpp, yaml, z80, zxbasic


where:
''target repository path''
is a directory in which the target p2 repository resides
''source repository URL''
is a URL of the repository to be mirrored to the target repository

====example====

ant -f /shared/modeling/tools/promotion/mirror-repository.xml -Drepository=/home/data/httpd/download.eclipse.org/modeling/emf/emf/updates/2.7milestones/base/S201012150917

Back to the top