aboutsummaryrefslogtreecommitdiff
path: root/jdk7u-build-image-amd64.yaml
blob: 3f1b3463cc7a7302f15b8cabaedf62d46978cd14 (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
- job:
    name: jdk7u-build-image-amd64
    project-type: freestyle
    defaults: global
    description: |
        * Builds the jdk7 images.
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 10
            artifact-num-to-keep: 1
    parameters:
        - string:
            name: JVM_VARIANT
            default: client
        - string:
            name: BUILD_TYPE
            default: release
    disabled: false
    node: docker-jessie-amd64
    display-name: 'OpenJDK - Build OpenJDK 7 images'
    wrappers:
        - timestamps
    builders:
        - linaro-publish-token
        - copyartifact:
            project: jdk7u-update-src-tree
            filter: 'out/jdk7u.tar.gz'
            target: incoming
            flatten: true
        - copyartifact:
            project: archive-primordial-jdk7-amd64
            filter: 'out/primordial-jdk7.tar.gz'
            target: incoming
            flatten: true
        - shell: |
            #!/bin/bash

            sudo apt-get -q=2 update
            sudo apt-get -q=2 install -y --no-install-recommends \
              ant \
              cpio \
              gawk \
              libasound2-dev \
              libcups2-dev \
              libfreetype6-dev \
              libxext-dev \
              libxrender-dev \
              libxt-dev \
              libxtst-dev \
              python-requests \
              unzip \
              zip

            set -exu

            rm -rf jdk7u primordial-jdk7
            tar xf incoming/jdk7u.tar.gz
            tar xf incoming/primordial-jdk7.tar.gz
            cd jdk7u
            export LANG=C
            make ALT_BOOTDIR=${WORKSPACE}/primordial-jdk7 BUILD_NUMBER=b${BUILD_NUMBER}

            # Archive the result
            cd ${WORKSPACE}
            rm -rf out
            mkdir out
            artifact_name=jdk7u-${JVM_VARIANT}-${BUILD_TYPE}
            tar -C jdk7u/build/linux-amd64/j2sdk-image --exclude=\*.diz --transform="s#^#${artifact_name}/#" -acf out/${artifact_name}.tar.gz jre bin lib

            # Publish
            test -d ${HOME}/bin || mkdir ${HOME}/bin
            wget -q https://git.linaro.org/ci/publishing-api.git/blob_plain/HEAD:/linaro-cp.py -O ${HOME}/bin/linaro-cp.py
            time python ${HOME}/bin/linaro-cp.py \
              --api_version 3 \
              --link-latest \
              out components/openjdk/jdk7u-x86_64/${BUILD_NUMBER}
    publishers:
        - archive:
            artifacts: 'out/*.tar.gz'