Andrew Geissler | d51439f | 2021-02-22 16:14:27 -0600 | [diff] [blame] | 1 | #!/bin/bash -xe |
| 2 | # |
| 3 | # Purpose: |
| 4 | # This script is responsible for building all CI machines to get a |
| 5 | # new CI systems sstate and download caches setup. |
| 6 | # |
| 7 | # This script assumes openbmc-build-scripts has been cloned into |
| 8 | # the WORKSPACE directory. |
| 9 | # |
| 10 | # Required Inputs: |
| 11 | # WORKSPACE: Directory to run the builds out of |
| 12 | |
| 13 | export LANG=en_US.UTF8 |
| 14 | |
Patrick Williams | e000d5d | 2021-03-15 14:50:49 -0500 | [diff] [blame] | 15 | cd "${WORKSPACE}" |
Patrick Williams | 0775972 | 2021-04-13 08:23:01 -0500 | [diff] [blame] | 16 | if [ -d openbmc ]; then |
| 17 | git -C openbmc fetch |
| 18 | git -C openbmc rebase |
| 19 | else |
| 20 | git clone https://github.com/openbmc/openbmc.git |
| 21 | fi |
Andrew Geissler | d51439f | 2021-02-22 16:14:27 -0600 | [diff] [blame] | 22 | |
| 23 | # Ensure everything is built on same filesystem |
Patrick Williams | e000d5d | 2021-03-15 14:50:49 -0500 | [diff] [blame] | 24 | export build_dir="${WORKSPACE}/build" |
Andrew Geissler | d51439f | 2021-02-22 16:14:27 -0600 | [diff] [blame] | 25 | |
Patrick Williams | 247ae50 | 2021-04-13 08:16:13 -0500 | [diff] [blame] | 26 | SEED_MACHINES=( |
| 27 | gsj |
Adriana Kobylak | 17c69ed | 2021-04-12 15:59:26 +0000 | [diff] [blame^] | 28 | p10bmc |
Patrick Williams | 247ae50 | 2021-04-13 08:16:13 -0500 | [diff] [blame] | 29 | palmetto |
Patrick Williams | 247ae50 | 2021-04-13 08:16:13 -0500 | [diff] [blame] | 30 | romulus |
| 31 | tiogapass |
| 32 | witherspoon |
| 33 | yosemitev2 |
| 34 | zaius |
| 35 | ) |
| 36 | |
Patrick Williams | e000d5d | 2021-03-15 14:50:49 -0500 | [diff] [blame] | 37 | for m in "${SEED_MACHINES[@]}"; do |
| 38 | echo "Seeding $m" |
| 39 | export target=$m |
Patrick Williams | 6c420e7 | 2021-04-13 08:13:18 -0500 | [diff] [blame] | 40 | "${WORKSPACE}/openbmc-build-scripts/build-setup.sh" || \ |
| 41 | echo "Build failed for $m; continuing." |
Patrick Williams | e000d5d | 2021-03-15 14:50:49 -0500 | [diff] [blame] | 42 | rm -rf "${WORKSPACE}/openbmc/build" |
Patrick Williams | 124607f | 2021-04-13 11:40:11 -0500 | [diff] [blame] | 43 | rm -rf "${build_dir}" |
Patrick Williams | e000d5d | 2021-03-15 14:50:49 -0500 | [diff] [blame] | 44 | done |