summaryrefslogtreecommitdiffstats
path: root/ci/build_rpm/build_rpms.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/build_rpm/build_rpms.sh')
-rwxr-xr-xci/build_rpm/build_rpms.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/ci/build_rpm/build_rpms.sh b/ci/build_rpm/build_rpms.sh
new file mode 100755
index 000000000..40cae6ccf
--- /dev/null
+++ b/ci/build_rpm/build_rpms.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+set -eux
+BUILD_FOR=${BUILD_FOR:-centos}
+
+function build_rpm_pkg {
+ case $1 in
+ centos)
+ sudo docker build -t kvm_rpm .
+ sudo docker run -v $WORKSPACE:/opt/kvmfornfv -t kvm_rpm \
+ /opt/kvmfornfv/ci/build_rpm/build_rpms_docker.sh
+ ;;
+ *) echo "Not supported system"; exit 1;;
+ esac
+}
+
+for system in $BUILD_FOR
+do
+ build_rpm_pkg $system
+done