xref: /openbmc/openbmc-build-scripts/jenkins/build-seed (revision 247ae50a70daca2c92a2bb5ce98824dbfb3a977e)
1d51439ffSAndrew Geissler#!/bin/bash -xe
2d51439ffSAndrew Geissler#
3d51439ffSAndrew Geissler# Purpose:
4d51439ffSAndrew Geissler#  This script is responsible for building all CI machines to get a
5d51439ffSAndrew Geissler#  new CI systems sstate and download caches setup.
6d51439ffSAndrew Geissler#
7d51439ffSAndrew Geissler# This script assumes openbmc-build-scripts has been cloned into
8d51439ffSAndrew Geissler# the WORKSPACE directory.
9d51439ffSAndrew Geissler#
10d51439ffSAndrew Geissler# Required Inputs:
11d51439ffSAndrew Geissler#  WORKSPACE:      Directory to run the builds out of
12d51439ffSAndrew Geissler
13d51439ffSAndrew Geisslerexport LANG=en_US.UTF8
14d51439ffSAndrew Geissler
15e000d5ddSPatrick Williamscd "${WORKSPACE}"
16d51439ffSAndrew Geisslergit clone https://github.com/openbmc/openbmc.git
17d51439ffSAndrew Geissler
18d51439ffSAndrew Geissler# Ensure everything is built on same filesystem
19e000d5ddSPatrick Williamsexport build_dir="${WORKSPACE}/build"
20d51439ffSAndrew Geissler
21*247ae50aSPatrick WilliamsSEED_MACHINES=(
22*247ae50aSPatrick Williams    gsj
23*247ae50aSPatrick Williams    palmetto
24*247ae50aSPatrick Williams    rainier
25*247ae50aSPatrick Williams    romulus
26*247ae50aSPatrick Williams    tiogapass
27*247ae50aSPatrick Williams    witherspoon
28*247ae50aSPatrick Williams    yosemitev2
29*247ae50aSPatrick Williams    zaius
30*247ae50aSPatrick Williams)
31*247ae50aSPatrick Williams
32e000d5ddSPatrick Williamsfor m in "${SEED_MACHINES[@]}"; do
33e000d5ddSPatrick Williams    echo "Seeding $m"
34e000d5ddSPatrick Williams    export target=$m
356c420e74SPatrick Williams    "${WORKSPACE}/openbmc-build-scripts/build-setup.sh" || \
366c420e74SPatrick Williams        echo "Build failed for $m; continuing."
37e000d5ddSPatrick Williams    rm -rf "${WORKSPACE}/openbmc/build"
38e000d5ddSPatrick Williamsdone
39