aboutsummaryrefslogtreecommitdiff
path: root/jdk-cache-files2.yaml
blob: e679d38b809b5a7caec523b413ade244fb835230 (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
- job:
    name: jdk-cache-files2
    project-type: matrix
    defaults: global
    description: |
        Download and unpack boot jdks.
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            openjdk-members:
                - job-build
                - job-cancel
        - build-discarder:
            num-to-keep: 10
            artifact-num-to-keep: 1
    disabled: false
    node: master
    concurrent: false
    display-name: 'OpenJDK - Cache files - the revenge'
    wrappers:
        - timestamps
    axes:
        - axis:
            type: slave
            name: node
            values:
                - aarch64-06
                - j12-qrep-01
    execution-strategy:
        sequential: false
    builders:
        - copyartifact:
            project: openjdk8-hadoop-LCA14
            filter: 'out/openjdk8-hadoop-LCA14.tar.gz'
            flatten: true
        - copyartifact:
            project: archive-specjbb2015-product-tarball
            filter: 'out/SPECjbb2015.tgz'
            flatten: true
        - copyartifact:
            project: jdk-build-specjbb2015-jdk11
            filter: 'out/SPECjbb2015-jdk11.tar.gz'
            flatten: true
        - shell: |
            #!/bin/bash
            set -eu
            PERSIST=$HOME/srv/jdk-cache
            NEW_PERSIST=$PERSIST-new
            OLD_PERSIST=$PERSIST-old

            # Creating all maintains idempotency.
            mkdir -p $NEW_PERSIST $OLD_PERSIST $PERSIST

            JDK8u=jdk8u-server-release-1804
            JDK10=jdk10-server-release-1804
            JDK11=jdk11-server-release-1811

            rm -rf jdk*
            wget -N \
                 http://openjdk.linaro.org/releases/${JDK8u}.tar.xz \
                 http://openjdk.linaro.org/releases/${JDK10}.tar.xz \
                 http://openjdk.linaro.org/releases/${JDK11}.tar.xz

            tar Jxf ${JDK8u}.tar.xz
            tar Jxf ${JDK10}.tar.xz
            tar Jxf ${JDK11}.tar.xz

            mv ${JDK8u} $NEW_PERSIST/jdk8u
            mv ${JDK10} $NEW_PERSIST/jdk10
            mv ${JDK11} $NEW_PERSIST/jdk11

            mv openjdk8-hadoop-LCA14.tar.gz $NEW_PERSIST
            mv SPECjbb2015.tgz $NEW_PERSIST
            mv SPECjbb2015-jdk11.tar.gz $NEW_PERSIST

            # Remove the old persist, make the current one the old, and the
            # new one the current one.
            rm -rf $OLD_PERSIST
            mv $PERSIST $OLD_PERSIST
            mv $NEW_PERSIST $PERSIST
    publishers:
        - email:
            recipients: 'stuart.monteith@linaro.org'