diff --git a/.circleci/config.yml b/.circleci/config.yml index aa175c8e2..983b53263 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -50,7 +50,7 @@ jobs: - checkout - run: dnf builddep -y musikcube.spec - run: mkdir -p /root/rpmbuild/SOURCES && spectool -g -R musikcube.spec - - run: rpmbuild -ba -vv musikcube.spec + - run: ./script/run-rpm-build.sh - run: ./script/copy-artifacts-to-host.sh /root/rpmbuild/RPMS/x86_64/*.rpm - run: mkdir -p /root/rpms && mv /root/rpmbuild/RPMS/x86_64/*.rpm /root/rpms/ - store_artifacts: @@ -63,7 +63,7 @@ jobs: - checkout - run: dnf builddep -y musikcube.spec - run: mkdir -p /root/rpmbuild/SOURCES && spectool -g -R musikcube.spec - - run: rpmbuild -ba -vv musikcube.spec + - run: ./script/run-rpm-build.sh - run: ./script/copy-artifacts-to-host.sh /root/rpmbuild/RPMS/x86_64/*.rpm - run: mkdir -p /root/rpms && mv /root/rpmbuild/RPMS/x86_64/*.rpm /root/rpms/ - store_artifacts: @@ -76,7 +76,7 @@ jobs: - checkout - run: dnf builddep -y musikcube.spec - run: mkdir -p /root/rpmbuild/SOURCES && spectool -g -R musikcube.spec - - run: rpmbuild -ba -vv musikcube.spec + - run: ./script/run-rpm-build.sh - run: ./script/copy-artifacts-to-host.sh /root/rpmbuild/RPMS/x86_64/*.rpm - run: mkdir -p /root/rpms && mv /root/rpmbuild/RPMS/x86_64/*.rpm /root/rpms/ - store_artifacts: diff --git a/script/run-circle-ci.sh b/script/run-circle-ci.sh index 389835c9b..38e1080f8 100755 --- a/script/run-circle-ci.sh +++ b/script/run-circle-ci.sh @@ -53,6 +53,7 @@ for JOB in ${ALL_JOBS[@]}; do -e MUSIKCUBE_BUILD_HOST_IP=${IP} \ -e MUSIKCUBE_BUILD_HOST_PORT=${PORT} \ -e MUSIKCUBE_BUILD_HOST_PW=${PW} \ + -e MUSIKCUBE_BUILD_JOB_COUNT=${JOB_COUNT} \ --job ${JOB} done diff --git a/script/run-rpm-build.sh b/script/run-rpm-build.sh new file mode 100755 index 000000000..c8f4d79de --- /dev/null +++ b/script/run-rpm-build.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +JOB_COUNT=${MUSIKCUBE_BUILD_JOB_COUNT} +if [[ -z "${JOB_COUNT}" ]]; then + JOB_COUNT=2 +fi + +echo "configuring rpm with ${JOB_COUNT} jobs" +sed -i "s/-j2/-j${JOB_COUNT}/g" musikcube.spec +rpmbuild -ba -vv musikcube.spec +