aboutsummaryrefslogtreecommitdiff
path: root/96boards-helium-u-boot.yaml
blob: 53bc89721c4b825b91dab113865e47740d2ba580 (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
- job:
    name: 96boards-helium-u-boot
    project-type: freestyle
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 30
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
    disabled: false
    node: docker-utopic-amd64
    display-name: '96boards - Marvell PXA1928 Helium U-Boot'
    scm:
        - git:
            url: https://git.linaro.org/people/rob.herring/u-boot.git
            refspec: +refs/heads/v2015.07-pxa1928:refs/remotes/origin/v2015.07-pxa1928
            name: origin
            branches:
                - refs/heads/v2015.07-pxa1928
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
    wrappers:
        - timestamps
        - build-name:
            name: '#${BUILD_NUMBER}-${GIT_REVISION,length=8}'
    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
              git clean -fdx
            }

            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 libssl-dev python-pycurl

            # Use pre-installed linaro toolchain
            export PATH="${HOME}/srv/toolchain/arm64-tc-15.02/bin:$PATH"
            export CROSS_COMPILE="aarch64-linux-gnu-"

            make pxa1928_helium_defconfig
            make -j$(getconf _NPROCESSORS_ONLN)

            # Generate padded binary to clear the existing environment variables
            dd if=/dev/zero of=u-boot.padded.bin bs=1024 count=1024
            dd if=u-boot.bin of=u-boot.padded.bin conv=notrunc
            mv u-boot.padded.bin u-boot.bin

            # Publish
            mkdir out

            cat > out/README.txt << EOF
            Build information:
            * build: ${BUILD_URL}
            * git URL: ${GIT_URL}
            * git branch: ${GIT_BRANCH}
            * git commit: ${GIT_COMMIT}
            EOF

            cp -a u-boot.bin out/
            cp -a .config out/u-boot.config

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

            # 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 \
              --server ${PUBLISH_SERVER} \
              --link-latest \
              out snapshots/helium/linaro/u-boot/${BUILD_NUMBER}
    publishers:
        - email:
            recipients: 'fathi.boudra@linaro.org'