@cryptotaxi247 / infra / commits / 5a8acd88

Split the helpers from the jobs

svn path=/configurations/trunk/tud/; revision=11402

Martin Bravenboer committed Mar 31, 2008 at 23:03 UTC 5a8acd887c93de7ab453781a3b57ead65ae87b7b
2 files changed +125 -79
supervisor/strategoxt/jobs-helpers.nix new
+101
@@ -0,0 +1,101 @@
1 +attrs :
2 +
3 +rec {
4 +
5 + # The easy buildfarm configuration is a system based on a
6 + # declarative package description, and dependencies that are
7 + # downloaded directly from release pages produced by the
8 + # buildfarm.
9 +
10 + easy = (import ./easy-job.nix) attrs;
11 +
12 + # Reflect is a set of functions for reflecting over package
13 + # specifications.
14 +
15 + reflect = easy.reflect;
16 +
17 + # infoInput turns a URL of a release into a buildfarm input,
18 + # attaching release-info.xml to the URL.
19 +
20 + infoInput = easy.infoInput;
21 +
22 + # urlInput turns a URL of a release into a buildfarm input,
23 +
24 + urlInput = easy.urlInput;
25 +
26 + inherit (attrs) svnInput pathInput;
27 +
28 + # Main function to make easy jobs.
29 +
30 + makeEasyJob = easy.makeEasyJob;
31 +
32 + # A more generic job. Requires more configuration though! You need
33 + # to specify yourself: dirName, notifyAddresses, jobAttr in
34 + # releases.nix, and inputs.
35 +
36 + makeStrategoXTJob = easy.makeStrategoXTJob;
37 +
38 + # Generic job function.
39 +
40 + makeJob = attrs.makeJob;
41 +
42 + # The file packages.nix describes packages, their dependencies,
43 + # specific platform requirements, etc.
44 +
45 + specs =
46 + (import ../../../../release/jobs/strategoxt2/packages.nix);
47 +
48 + # Current Stratego/XT baseline packages.
49 +
50 + baseline =
51 + import ./baseline.nix;
52 +
53 + # The makeEasyJob function accepts an argument
54 + # 'makeInfoURL'. makeInfoURL is a function that given a package
55 + # specification returns a URL to a release-info.xml file. This
56 + # file provides the buildfarm with information about available
57 + # source tarballs and RPMs for this package.
58 +
59 + # The default makeInfoURL always uses the latest -unstable release
60 + # of a package. You only need to specify your own makeInfoURL if
61 + # you want a different behaviour. Some useful makeInfoURL variants
62 + # are defined here.
63 +
64 + makeInfoURL = {
65 +
66 + # A common example of makeInfoURL is 'usingBaseline'. This
67 + # makeInfoURL variant uses baseline releases for aterm,
68 + # sdf2-bundle, and strategoxt. The URLs of the baseline are
69 + # specified in 'baseline.nix'.
70 + usingBaseline = spec :
71 + let packageName = reflect.packageName spec;
72 + in if packageName == "aterm" then
73 + infoInput baseline.aterm
74 + else if packageName == "sdf2-bundle" then
75 + infoInput baseline.sdf
76 + else if packageName == "strategoxt" then
77 + infoInput baseline.strategoxt
78 + else if packageName == "stratego-libraries" then
79 + infoInput baseline.strategoLibraries
80 + else
81 + infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/${packageName}/${packageName}-unstable/";
82 +
83 + # Stratego/XT uses a branch of the ATerm library. For the
84 + # Meta-Environment packages to built against this branch, and
85 + # against other releases that have been built using this branch,
86 + # we use this makeInfoURL function, which attaches
87 + # '-with-aterm64' to package names.
88 +
89 + # This function is not required for Stratego/XT packages, since
90 + # these are all built using with this branch of the ATerm
91 + # library.
92 + withATerm64 = spec :
93 + let packageName = reflect.packageName spec;
94 + in if packageName == "aterm" then
95 + infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/aterm64/${packageName}-unstable/"
96 + else if reflect.isRequired spec specs.aterm then
97 + infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/${packageName}-with-aterm64/${packageName}-unstable/"
98 + else
99 + infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/${packageName}/${packageName}-unstable/";
100 + };
101 +}
\ No newline at end of file
supervisor/strategoxt/jobs.nix
+24 -79
@@ -1,85 +1,9 @@
1 attrs :
2
3 -let # The easy buildfarm configuration is a system based on a
4 - # declarative package description, and dependencies that are
5 - # downloaded directly from release pages produced by the
6 - # buildfarm.
7 - easy = (import ./easy-job.nix) attrs;
8 -
9 - # Reflect is a set of functions for reflecting over package
10 - # specifications.
11 - reflect = easy.reflect;
12 -
13 - # infoInput turns a URL of a release into a buildfarm input,
14 - # attaching release-info.xml to the URL.
15 - infoInput = easy.infoInput;
16 -
17 - # Main function to make jobs.
18 - makeEasyJob = easy.makeEasyJob;
19 -
20 - # A more generic job. Requires more configuration though! You need
21 - # to specify yourself: dirName, notifyAddresses, jobAttr in
22 - # releases.nix, and inputs.
23 - makeStrategoXTJob = easy.makeStrategoXTJob;
24 -
25 - # The file packages.nix describes packages, their dependencies,
26 - # specific platform requirements, etc.
27 - specs =
28 - (import ../../../../release/jobs/strategoxt2/packages.nix);
29 -
30 - # Current Stratego/XT baseline packages.
31 - baseline =
32 - import ./baseline.nix;
33 -
34 - # The makeEasyJob function accepts an argument
35 - # 'makeInfoURL'. makeInfoURL is a function that given a package
36 - # specification returns a URL to a release-info.xml file. This
37 - # file provides the buildfarm with information about available
38 - # source tarballs and RPMs for this package.
39 -
40 - # The default makeInfoURL always uses the latest -unstable release
41 - # of a package. You only need to specify your own makeInfoURL if
42 - # you want a different behaviour. Some useful makeInfoURL variants
43 - # are defined here.
44 - makeInfoURL = {
45 -
46 - # A common example of makeInfoURL is 'usingBaseline'. This
47 - # makeInfoURL variant uses baseline releases for aterm,
48 - # sdf2-bundle, and strategoxt. The URLs of the baseline are
49 - # specified in 'baseline.nix'.
50 - usingBaseline = spec :
51 - let packageName = reflect.packageName spec;
52 - in if packageName == "aterm" then
53 - infoInput baseline.aterm
54 - else if packageName == "sdf2-bundle" then
55 - infoInput baseline.sdf
56 - else if packageName == "strategoxt" then
57 - infoInput baseline.strategoxt
58 - else if packageName == "stratego-libraries" then
59 - infoInput baseline.strategoLibraries
60 - else
61 - infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/${packageName}/${packageName}-unstable/";
62 -
63 - # Stratego/XT uses a branch of the ATerm library. For the
64 - # Meta-Environment packages to built against this branch, and
65 - # against other releases that have been built using this branch,
66 - # we use this makeInfoURL function, which attaches
67 - # '-with-aterm64' to package names.
68 -
69 - # This function is not required for Stratego/XT packages, since
70 - # these are all built using with this branch of the ATerm
71 - # library.
72 - withATerm64 = spec :
73 - let packageName = reflect.packageName spec;
74 - in if packageName == "aterm" then
75 - infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/aterm64/${packageName}-unstable/"
76 - else if reflect.isRequired spec specs.aterm then
77 - infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/${packageName}-with-aterm64/${packageName}-unstable/"
78 - else
79 - infoInput "http://buildfarm.st.ewi.tudelft.nl/releases/strategoxt2/${packageName}/${packageName}-unstable/";
80 - };
3 +# check jobs-helpers.nix for documentation.
4 +with (import ./jobs-helpers.nix) attrs;
5
82 - in {
6 +{
7
8 javaFrontSyntaxTrunk = makeEasyJob {
9 spec = specs.javaFrontSyntax;
@@ -106,6 +30,27 @@ let # The easy buildfarm configuration is a system based on a
30 makeInfoURL = makeInfoURL.usingBaseline;
31 };
32
33 + strategoxtTrunk = makeJob {
34 + args = [
35 + "../jobs/strategoxt/strategoxt.nix"
36 + "release"
37 + "/data/webserver/dist/strategoxt2/strategoxt"
38 + "http://releases.strategoxt.org/strategoxt"
39 + "/data/webserver/dist/nix-cache"
40 + "http://buildfarm.st.ewi.tudelft.nl/releases/nix-cache"
41 + ];
42 +
43 + inputs = {
44 + strategoxtCheckout = svnInput https://svn.cs.uu.nl:12443/repos/StrategoXT/strategoxt/trunk;
45 + systems = pathInput ./systems.nix;
46 + atermInfo = infoInput baseline.aterm;
47 + sdf2BundleInfo = infoInput baseline.sdf;
48 + strategoxtBaseline = urlInput ftp://ftp.strategoxt.org/pub/stratego/StrategoXT/baseline/latest/strategoxt.tar.gz;
49 + };
50 +
51 + notifyAddresses = ["karltk@strategoxt.org" "martin.bravenboer@gmail.com" "e.visser@tudelft.nl"];
52 + };
53 +
54 /**
55 * Meta-Environment
56 */