aboutsummaryrefslogtreecommitdiff
path: root/tcwg-make-release.yaml
blob: 63eacbb33e89644d57074a2dd0f6fab4589889fd (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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
# http://docs.openstack.org/infra/jenkins-job-builder/definition.html
- job:
    name: tcwg-make-release
    project-type: matrix
    defaults: global
    logrotate:
        daysToKeep: 30
        numToKeep: 10
    properties:
        - authorization:
            anonymous:
                - job-read
                - job-extended-read
            linaro:
                - job-build
                - job-cancel
    parameters:
        - string:
            name: gcc_src
            default: 'gcc-linaro-5.3-2016.02.tar.xz'
            description: 'The source of GCC. Specify as it would be passed to abe.sh, either a source tarballs, git branch and revision, or a URL of a tarball e.g., "gcc-linaro-5.3-2016.02.tar.xz"'
        - bool:
            name: canadian
            default: false
            description: 'Whether to build win32 executables.'
        - string:
            name: binutils_src
            default: ''
            description: 'A optional revision of binutils to use for this release, e.g., "binutils-gdb.git~linaro_binutils-2_25-branch"'
        - string:
            name: glibc_src
            default: ''
            description: 'An optional revision of Glibc to use for this release, e.g., "glibc.git~linaro/2.21/master"'
        - string:
            name: date
            default: ''
            description: 'An optional release string to use, e.g., "2016.05", "2016.05-rc3", "2016.05-1", "2016.05-1-rc2". The default is to extract the release string from the gcc_src field'
        - string:
            name: manifest_src
            default: ''
            description: 'Import a manifest file to reproduce a release'
        - string:
            name: toolchain_config
            default: 'default'
            description: 'Toolchain version config, e.g., "default", "gcc5", or "gcc6"'
        - string:
            name: gitref
            default: '/linaro/shared/snapshots'
            description: 'A GIT reference directory for faster cloning.'
        - string:
            name: abe_branch
            default: refs/heads/master
            description: 'ABE revision to test'
        - bool:
            name: debug
            default: false
            description: 'Whether to enable bash debugging output.'
        - string:
            name: fileserver
            default: ex40-01.tcwglab.linaro.org
            description: 'Remote file server for logs and binaries'
        # - bool:
        #     name: rpm
        #     default: false
        #     description: 'Whether to build an RPM package.'
        # - bool:
        #     name: deb
        #     default: false
        #     description: 'Whether to build a DEB package.'
    disabled: false
    node: tcwg-x86_64-ex40
    retry-count: 3
    concurrent: true
    display-name: 'TCWG Make Release'
    scm:
        - git:
            url: https://git-us.linaro.org/toolchain/abe.git
            refspec: +refs/changes/*:refs/remotes/changes/*
            branches:
                - ${abe_branch}
            skip-tag: true
            shallow-clone: true
            wipe-workspace: true
            basedir: abe
    axes:
        - axis:
            type: slave
            name: label
            values:
               - docker-trusty-amd64-tcwg
               - docker-trusty-i386-tcwg
        - axis:
            type: user-defined
            name: target
            values:
                - aarch64-elf
                - aarch64-linux-gnu
                - aarch64_be-elf
                - aarch64_be-linux-gnu
                - armv8l-linux-gnueabihf
                - arm-eabi
                - arm-linux-gnueabi
                - arm-linux-gnueabihf
                - armeb-eabi
                - armeb-linux-gnueabi
                - armeb-linux-gnueabihf
    execution-strategy:
        sequential: false
    wrappers:
        - timestamps
        - matrix-tie-parent:
            node: master
        - timeout:
            timeout: 300
        - timestamps
        - ssh-agent-credentials:
            users:
              - 'e0958a95-204f-4c14-a66c-5e2be6c5d50a' # tcwg-buildslave
        - build-name:
            name: '#${BUILD_NUMBER}-${target}'
    builders:
      - shell: |
            #!/bin/bash

            if test x"${debug}" = x"true"; then
              shell="/bin/bash -x"
              set -x
            else
              shell="/bin/bash"
            fi
            ${shell} ${WORKSPACE}/abe/scripts/MakeRelease.job --target ${target} --fileserver ${fileserver} --toolchainconfig ${toolchain_config}
            if test $? -gt 0; then
              exit 1
            fi

            tcwg_release=${date}
            # If there is no date set, extract release information from the gcc_src
            if test "${date:+set}" != "set"; then
                tcwg_release="`basename $gcc_src | cut -d '-' -f4-`"
                tcwg_release=${tcwg_release%".tar.xz"}
            fi

            tarball="`find ${WORKSPACE} -name gcc-linaro\*${tcwg_release}\*${target}\*.tar.xz`"
            if test x"${tarball}" = x""; then
              echo "ERROR: no binary tarball found!"
              exit 1
            fi

            # Extract the gcc_version information from gcc_src to determine
            # which directory to copy the tarballs into.
            gcc_version="`basename $gcc_src | awk -F '-' '{ print $3 }'`"
            tcwg_version="`echo $gcc_version | awk -F '.' '{ print $1 }'`"
            gcc_minor="`echo $gcc_version | awk -F '.' '{ print $2 }'`"
            if test ${tcwg_version} -lt 5; then
                tcwg_version="${tcwg_version}.${gcc_minor}"
            fi

            tarball="`basename ${tarball}`"
            tarball_url="http://${fileserver}/binaries/${tcwg_version}-${tcwg_release}/${target}/${tarball}"
            cat << EOF > tcwg.params
            tarball=${tarball_url}
            EOF
      - inject:
           properties-file: tcwg.params
      - conditional-step:
           condition-kind: current-status
           steps:
              - trigger-builds:
                  - project: 'tcwg-test-release'
                    predefined-parameters: tarball_url=${tarball}
                    boolean-parmeters: debug=${debug}
                    current-parameters: true
                    block: false
    publishers:
        - archive:
            artifacts: 'MakeRelease*.log.xz'
            latest-only: false