aboutsummaryrefslogtreecommitdiff
path: root/tcwg-dev-build-christophe.yaml
blob: f26b377b644bbb751b79bc49368d8cd91401c4f3 (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
- job:
    name: tcwg-dev-build-christophe
    project-type: freestyle
    defaults: global
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
        - build-discarder:
            days-to-keep: 10
            num-to-keep: 10
    parameters:
        - string:
            name: release_name
            default: default
            description: 'Release name; default is "date +%Y%m%d-%H_%M_%S"'
        - choice:
            name: target
            choices:
                - cross-aarch64-linux-gnu
                - cross-aarch64-elf
                - cross-aarch64-linux-gnu_ilp32
                - cross-aarch64_be-elf
                - cross-aarch64_be-linux-gnu
                - cross-arm-eabi
                - cross-arm-linux-gnueabi
                - cross-arm-linux-gnueabihf
                - cross-armeb-eabi
                - cross-armeb-linux-gnueabi
                - cross-armeb-linux-gnueabihf
                - cross-armv8l-linux-gnueabihf
                - native
            description: 'Target'
        - choice:
            name: version
            choices:
                - default
                - gcc4_9
                - gcc5
                - gcc6
                - gcc7
                - latest-rel
                - master
            default: default
            description: 'Toolchain version; should be support ABE config'
        - choice:
            name: host
            choices:
                - x86_64
                - aarch64
        - bool:
            name: verbose
            default: false
            description: 'Whether to be verbose'
        - string:
            name: scripts_branch
            default: master
            description: 'Scripts revision to use'
        - string:
            name: build_container_tag
            default: xenial-tcwg-tested
            description: 'Distro to use on the builder with non-default container type: trusty, xenial.'
    disabled: false
    node: tcwg-x86_64-build
    concurrent: true
    display-name: 'TCWG ZZZ Dev Build Christophe'
    scm:
        - git:
            url: https://git-us.linaro.org/toolchain/jenkins-scripts.git
            refspec: +refs/heads/*:refs/remotes/origin/* +refs/changes/*:refs/changes/*
            branches:
                - $scripts_branch
            skip-tag: true
            shallow-clone: true
            wipe-workspace: false
            clean:
                before: true
    wrappers:
        - timeout:
            timeout: 300
        - timestamps
        - ssh-agent-credentials:
            # tcwg-buildslave user id
            users:
                - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a'
        - build-name:
            name: '#${BUILD_NUMBER}-${release_name}'
    builders:
        - shell: |
            #!/bin/bash
            set -ex
            label=""
            case ${host} in
                x86_64) ;;
                aarch64) label="--label tcwg-apm_64-build" ;;
            esac

            ./start-container-docker.sh $label --task build --prefix build_ --distro $build_container_tag > build-container.sh
            . ./build-container.sh
            BUILD_SHELL="build_container_exec bash"

            # The "cross-" prefix is just a hint for the user, remove
            # it for the actual build. Its purpose is not to confuse
            # the target value with "native".
            target=${target#cross-}

            ${BUILD_SHELL} -c "rm -rf jenkins-scripts"
            ${BUILD_SHELL} -c "git clone https://git.linaro.org/toolchain/jenkins-scripts.git"
            ${BUILD_SHELL} -c "./jenkins-scripts/tcwg-dev-build.sh \
              --release_name \"$release_name\" \
              --target $target \
              --version $version \
              --verbose $verbose"
    publishers:
        - archive:
            artifacts: 'artifacts/**'
            latest-only: false