Merge pull request #2151 from jlebon/pr/too-parallel

ci: Constrain parallel build jobs
This commit is contained in:
OpenShift Merge Robot 2020-07-17 12:00:24 -04:00 committed by GitHub
commit 848411c9e3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 7 deletions

View File

@ -2,7 +2,8 @@
stage("Build") {
parallel normal: {
cosaPod(buildroot: true, runAsUser: 0) {
def n = 5
cosaPod(buildroot: true, runAsUser: 0, memory: "2Gi", cpu: "${n}") {
checkout scm
stage("Core build") {
shwrap("""
@ -10,7 +11,7 @@ parallel normal: {
git fetch origin --tags
git submodule update --init
env SKIP_INSTALLDEPS=1 ./ci/build.sh
env MAKE_JOBS=${n} SKIP_INSTALLDEPS=1 ./ci/build.sh
""")
}
stage("Unit tests") {
@ -84,18 +85,19 @@ parallel fcos: {
}
},
buildopts: {
cosaPod(buildroot: true, runAsUser: 0) {
def n = 5
cosaPod(buildroot: true, runAsUser: 0, memory: "2Gi", cpu: "${n}") {
checkout scm
shwrap("""
git submodule update --init
git worktree add build-rust && cd build-rust
env CONFIGOPTS="--enable-rust" SKIP_INSTALLDEPS=1 ./ci/build.sh
env MAKE_JOBS=${n} CONFIGOPTS="--enable-rust" SKIP_INSTALLDEPS=1 ./ci/build.sh
make check TESTS=tests/test-rollsum
cd .. && rm -rf build-rust
git worktree add build-libsoup && cd build-libsoup
env CONFIGOPTS="--without-curl --without-openssl --with-soup" SKIP_INSTALLDEPS=1 ./ci/build.sh
env MAKE_JOBS=${n} CONFIGOPTS="--without-curl --without-openssl --with-soup" SKIP_INSTALLDEPS=1 ./ci/build.sh
make check
cd .. && rm -rf build-libsoup
""")

View File

@ -10,7 +10,7 @@ pkg_upgrade() {
}
make() {
/usr/bin/make -j $(getconf _NPROCESSORS_ONLN) "$@"
/usr/bin/make -j ${MAKE_JOBS:-$(getconf _NPROCESSORS_ONLN)} "$@"
}
build() {

View File

@ -1,4 +1,6 @@
#!/bin/bash
# FIXME just for webserver
# kola: { "tags": "needs-internet" }
#
# Copyright (C) 2018 Red Hat, Inc.
#

View File

@ -1,5 +1,6 @@
#!/bin/bash
# FIXME just for webserver
# kola: { "tags": "needs-internet" }
# Using the host ostree, test HTTP pulls
set -xeuo pipefail