aboutsummaryrefslogtreecommitdiff
path: root/96boards-reference-grub-efi-arm64.yaml
blob: f6674d95e95579a90699d8a20acde7f4af33d559 (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
- job:
    name: 96boards-reference-grub-efi-arm64
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
                - job-workspace
            linaro:
                - job-read
                - job-extended-read
                - job-build
                - job-cancel
    disabled: false
    node: docker-jessie-arm64
    display-name: '96boards - Reference Component - GRUB EFI'
    wrappers:
        - timestamps
    builders:
        - linaro-publish-token:
            host: builds.96boards.org
        - shell: |
            #!/bin/bash

            set -ex

            trap cleanup_exit INT TERM EXIT

            cleanup_exit()
            {
              cd ${WORKSPACE}
              rm -rf out
            }

            GRUB_EFI_BIN_PKG=grub-efi-arm64-bin
            sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list
            sudo apt-get update
            sudo apt-get install -y --no-install-recommends $GRUB_EFI_BIN_PKG python-pycurl

            mkdir out

            cat << EOF > out/grub.configfile
            search.fs_label rootfs root
            set prefix=(\$root)'/boot/grub'
            configfile \$prefix/grub.cfg
            EOF

            GRUB_MODULES="boot chain configfile efinet ext2 fat gettext help linux loadenv lsefi normal part_gpt part_msdos read search search_fs_file search_fs_uuid search_label terminal terminfo tftp time"
            grub-mkimage \
              --verbose \
              --config=out/grub.configfile \
              --output=out/grubaa64.efi \
              --format=arm64-efi \
              $GRUB_MODULES

            # Build information
            cat > out/README.textile << EOF

            h4. 96Boards - Reference Component - GRUB UEFI

            GRUB UEFI build consumed by the 96Boards Reference Platform Builds

            Build Description:
            * Build URL: "$BUILD_URL":$BUILD_URL
            * Grub modules used:

            EOF
            echo -n "bc. " >> out/README.textile
            echo $GRUB_MODULES >> out/README.textile
            cat >> out/README.textile << EOF

            * Grub config used:

            EOF
            echo -n "bc. " >> out/README.textile
            cat out/grub.configfile >> out/README.textile
            cat >> out/README.textile << EOF

            * $GRUB_EFI_BIN_PKG package:

            EOF
            echo -n "bc. " >> out/README.textile
            apt-cache show $GRUB_EFI_BIN_PKG >> out/README.textile

            # Create MD5SUMS file
            (cd out && md5sum g* > MD5SUMS.txt)

            # Publish
            test -d ${HOME}/bin || mkdir ${HOME}/bin
            wget 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 \
              --server ${PUBLISH_SERVER} \
              --link-latest \
              out snapshots/reference-platform/components/grub/${BUILD_NUMBER}
    publishers:
        - email:
            recipients: 'ricardo.salveti@linaro.org'