Build script updates so RPMs honor JOB_COUNT

This commit is contained in:
Casey Langen 2021-02-24 14:33:17 -08:00 committed by casey langen
parent e7319ae726
commit 710eecbee9
3 changed files with 15 additions and 3 deletions

View File

@ -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:

View File

@ -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

11
script/run-rpm-build.sh Executable file
View File

@ -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