xref: /openbmc/openbmc-build-scripts/jenkins/build-seed (revision 6c420e74dcb645f5979dcf079f9ae5cfccc89001)
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
21e000d5ddSPatrick WilliamsSEED_MACHINES=( rainier gsj palmetto romulus witherspoon tiogapass zaius )
22e000d5ddSPatrick Williamsfor m in "${SEED_MACHINES[@]}"; do
23e000d5ddSPatrick Williams    echo "Seeding $m"
24e000d5ddSPatrick Williams    export target=$m
25*6c420e74SPatrick Williams    "${WORKSPACE}/openbmc-build-scripts/build-setup.sh" || \
26*6c420e74SPatrick Williams        echo "Build failed for $m; continuing."
27e000d5ddSPatrick Williams    rm -rf "${WORKSPACE}/openbmc/build"
28e000d5ddSPatrick Williamsdone
29