ci: Re-add CARGO_BUILD_JOBS

We lost this at some point during the CI re-shuffle. We need to
constrain cargo builds too to respect our CPU allocation.

This doesn't totally keep all jobs under 5 since e.g. we could have 5
make jobs and 5 cargo codegen builds going at once, but I think as long
as it's not something ridiculous like 40, it should be fine. Otherwise
we'll tighten it more.
This commit is contained in:
Jonathan Lebon 2021-02-09 14:51:00 -05:00 committed by OpenShift Merge Robot
parent 667fdc9ff4
commit fb8e2da9d6

View File

@ -5,7 +5,8 @@ parallel rpms: {
def n = 5
cosaPod(buildroot: true, runAsUser: 0, memory: "2Gi", cpu: "${n}") {
checkout scm
shwrap("""RPM_BUILD_NCPUS=${n} ./ci/coreosci-rpmbuild.sh
// 2:1 job to CPU at most should keep us from getting kicked out
shwrap("""RPM_BUILD_NCPUS=${n} CARGO_BUILD_JOBS=${n} ./ci/coreosci-rpmbuild.sh
mv packaging/*/*.rpm .
""")
// make it easy for anyone to download the RPMs