aboutsummaryrefslogtreecommitdiff
path: root/jdk10-update-src-tree.yaml
blob: c7f44f065b5517b76f243517577c4c3cb2da5a8f (plain)
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
- scm:
    name: jdk10
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs
            clean: true
            subdir: jdk10
- scm:
    name: corba
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/corba
            clean: true
            subdir: jdk10/corba
- scm:
    name: hotspot
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/hotspot
            clean: true
            subdir: jdk10/hotspot
- scm:
    name: jaxp
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/jaxp
            clean: true
            subdir: jdk10/jaxp
- scm:
    name: jaxws
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/jaxws
            clean: true
            subdir: jdk10/jaxws
- scm:
    name: jdk
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/jdk
            clean: true
            subdir: jdk10/jdk
- scm:
    name: langtools
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/langtools
            clean: true
            subdir: jdk10/langtools
- scm:
    name: nashorn
    scm:
        - hg:
            url: http://hg.openjdk.java.net/jdk10/hs/nashorn
            clean: true
            subdir: jdk10/nashorn
- job:
    name: jdk10-update-src-tree
    project-type: freestyle
    defaults: global
    description: |
        This job polls upstream Mercurial servers for changes and,<br>
        if there are any, triggers "jdk10-build-and-test".<br>
        Note: this job archives the src which is later required by the jtreg<br>
        report and publish job. The build-date.sh artefact contains shell<br>
        variables for the day and day-of-year the source was archived.
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            openjdk-members:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 30
            num-to-keep: 10
            artifact-num-to-keep: 5
    disabled: false
    node: aarch64-06
    display-name: 'OpenJDK 10 - Update jdk10 source tree'
    scm:
        - jdk10
        - corba
        - hotspot
        - jaxp
        - jaxws
        - jdk
        - langtools
        - nashorn
# SRDM Trigger manually for now.
#    triggers:
#        - pollscm: 'H 12 */2 * *'
    wrappers:
        - timestamps
    builders:
        - shell: |
            #!/bin/bash

            set -eu

            rm -rf out
            mkdir out

            pushd jdk10
            #find . -name BOM -exec rm {} \;
            #commit_id=$(hg identify | awk '{print $1}')
            #echo "jdk10-${commit_id}" | tee -a BOM

            #for i in corba jaxp jaxws langtools jdk hotspot nashorn; do
            #  pushd $i
            #  commit_id=$(hg identify | awk '{print $1}')
            #  dir=$(basename $PWD)
            #  echo "${dir}-${commit_id}" | tee -a ../BOM
            #  popd
            #done

            ## Pull out subdirectory HG versions
            SUBREPOS=". corba jaxp jaxws langtools jdk hotspot nashorn"

            echo BOM for $(hg paths default) > BOM
            echo -e Subdir\\tHash\\t\\tTag\\tTag hash >> BOM
            for x in $SUBREPOS; do
                echo -e $x\\t$(cd $x; hg head --template '{node|short}\t' tip; hg tags --template="{tag}\t{node|short}\n" | grep -ve '^tip' | head -n1) >>BOM
            done

            cp BOM $WORKSPACE/out

            popd

            : ${YEAR:=$(date +%Y)}
            : ${DAY_OF_YEAR:=$(date +%j)}

            : ${YEAR_YESTERDAY:=$YEAR}
            : ${DAY_OF_YEAR_YESTERDAY:=$((10#$DAY_OF_YEAR - 1))}

            echo "YEAR=${YEAR}" >dates.prop
            echo "DAY_OF_YEAR=${DAY_OF_YEAR}" >>dates.prop

            echo "export YEAR=${YEAR}" > out/build-date.sh
            echo "export DAY_OF_YEAR=${DAY_OF_YEAR}" >> out/build-date.sh

            tar --exclude=.hg -acf out/jdk10.tar.gz jdk10
    publishers:
        - archive:
            artifacts: 'out/jdk10.tar.gz, out/build-date.sh, out/BOM'
        - fingerprint:
            files: 'out/*'
            record-artifacts: true
        - trigger-parameterized-builds:
            - project: jdk10-build-and-test
              condition: SUCCESS
              property-file: dates.prop