xref: /openbmc/openbmc-build-scripts/jenkins/build-seed (revision cc6e4e0b84abb9ca31ce8799c2b29e60e304dddb)
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
13export LANG=en_US.UTF8
14
15cd "${WORKSPACE}"
16if [ -d openbmc ]; then
17    git -C openbmc fetch
18    git -C openbmc rebase
19else
20    git clone https://github.com/openbmc/openbmc.git
21fi
22
23# Ensure everything is built on same filesystem
24export build_dir="${WORKSPACE}/build"
25
26SEED_MACHINES=(
27    anacapa
28    bletchley
29    bletchley15
30    catalina
31    clemente
32    e3c246d4i
33    evb-npcm845
34    gb200nvl-obmc
35    gbs
36    harma
37    minerva
38    p10bmc
39    romulus
40    santabarbara
41    ventura
42    ventura2
43    witherspoon
44    yosemite4
45    yosemite5
46)
47
48for m in "${SEED_MACHINES[@]}"; do
49    echo "Seeding $m"
50    export target=$m
51    "${WORKSPACE}/openbmc-build-scripts/build-setup.sh" || \
52        echo "Build failed for $m; continuing."
53    rm -rf "${WORKSPACE}/openbmc/build"
54    rm -rf "${build_dir}"
55done
56