blob: a812d5bcb06e50b7d83bfb478f90a0fe33f44a4d [file] [log] [blame]
Stuart Monteith20f0edb2019-01-21 10:42:06 +00001- scm:
2 name: jdk12
3 scm:
4 - hg:
Stuart Monteith2ff1f822019-06-26 09:08:55 +01005 url: https://hg.openjdk.java.net/jdk/jdk12u
Stuart Monteith20f0edb2019-01-21 10:42:06 +00006 clean: true
7 subdir: jdk12
8- job:
9 name: jdk12-update-src-tree
10 project-type: freestyle
11 defaults: global
12 description: |
13 This job polls upstream Mercurial servers for changes and,<br>
14 if there are any, triggers "jdk12-build-and-test".<br>
15 Note: this job archives the src which is later required by the jtreg<br>
16 report and publish job. The build-date.sh artefact contains shell<br>
17 variables for the day and day-of-year the source was archived.
18 properties:
19 - authorization:
20 anonymous:
21 - job-read
22 - job-extended-read
23 openjdk-members:
24 - job-build
25 - job-cancel
26 - build-discarder:
27 days-to-keep: 30
28 num-to-keep: 10
29 artifact-num-to-keep: 5
Stuart Monteith0a93f1c2019-01-21 11:20:19 +000030 - build-blocker:
31 use-build-blocker: true
32 blocking-jobs:
Stuart Monteith21121502019-06-17 13:22:48 +010033 - "jdk13-.*"
Stuart Monteith5aad9232019-01-21 11:26:36 +000034 - "jdk11-.*"
35 - "jdk8-.*"
36 - "jdkX-.*"
Stuart Monteith0a93f1c2019-01-21 11:20:19 +000037 block-level: 'GLOBAL'
Stuart Monteith53ae7982020-01-13 14:39:09 +000038 disabled: true
Stuart Monteith20f0edb2019-01-21 10:42:06 +000039 node: j12-qrep-01
40 display-name: 'OpenJDK 12 - Update jdk12 source tree'
41 scm:
42 - jdk12
43 triggers:
Stuart Monteith20f0edb2019-01-21 10:42:06 +000044 - pollscm:
45 cron: '0 7 * * 2,4,6'
46 wrappers:
47 - timestamps
48 builders:
49 - shell: |
50 #!/bin/bash
51
52 set -eu
53
54 rm -rf out
55 mkdir out
56
57 pushd jdk12
58 #find . -name BOM -exec rm {} \;
59 #commit_id=$(hg identify | awk '{print $1}')
60 #echo "jdk12-${commit_id}" | tee -a BOM
61
62 #for i in corba jaxp jaxws langtools jdk hotspot nashorn; do
63 # pushd $i
64 # commit_id=$(hg identify | awk '{print $1}')
65 # dir=$(basename $PWD)
66 # echo "${dir}-${commit_id}" | tee -a ../BOM
67 # popd
68 #done
69
70 ## Pull out subdirectory HG versions
71 echo BOM for $(hg paths default) > BOM
72 echo -e Subdir\\tHash\\t\\tTag\\tTag hash >> BOM
73 echo -e .\\t$(hg head --template '{node|short}\t' tip; hg tags --template="{tag}\t{node|short}\n" | grep -ve '^tip' | head -n1) >>BOM
74
75 cp BOM $WORKSPACE/out
76
77 popd
78
79 : ${YEAR:=$(date +%Y)}
80 : ${DAY_OF_YEAR:=$(date +%j)}
81
82 : ${YEAR_YESTERDAY:=$YEAR}
83 : ${DAY_OF_YEAR_YESTERDAY:=$((10#$DAY_OF_YEAR - 1))}
84
85 echo "YEAR=${YEAR}" >dates.prop
86 echo "DAY_OF_YEAR=${DAY_OF_YEAR}" >>dates.prop
87
88 echo "export YEAR=${YEAR}" > out/build-date.sh
89 echo "export DAY_OF_YEAR=${DAY_OF_YEAR}" >> out/build-date.sh
90
91 tar --exclude=.hg -acf out/jdk12.tar.gz jdk12
92 publishers:
93 - archive:
94 artifacts: 'out/jdk12.tar.gz, out/build-date.sh, out/BOM'
95 - fingerprint:
96 files: 'out/*'
97 record-artifacts: true
98 - trigger-parameterized-builds:
99 - project: jdk12-build-and-test
100 condition: SUCCESS
101 property-file: dates.prop