This repository has been archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 45
Build HA RPM
Ajay Paratmandali edited this page Apr 1, 2021
·
4 revisions
- Create
build_ha_rpm.sh
in root user
#!/usr/bin/env bash
#"""
#Example:
# If repo in User dir
#/usr/bin/env bash build_ha_rpm.sh /home/GID/path/cortx-ha GID
# If repo in root
#/usr/bin/env bash build_ha_rpm.sh /root/cortx-ha
#"""
REPO_PATH=$1
USER=$2
[ -z "$USER" ] && USER="root"
echo "PATH: ${REPO_PATH}, USER: ${USER}"
yum install -y gcc rpm-build python36 python36-pip python36-devel python36-setuptools
yum group install "Development Tools"
req_file=${REPO_PATH}/jenkins/pyinstaller/v2/requirements.txt
python3 -m pip install -r $req_file
[ ${USER} != "root" ] && {
su - -c "/${REPO_PATH}/jenkins/build.sh -v 2" ${USER}
} || {
su -c "/${REPO_PATH}/jenkins/build.sh -v 2"
}
echo "${REPO_PATH}/dist/rpmbuild/RPMS/x86_64/cortx-ha-2.0.0-*.x86_64.rpm"
yum remove -y cortx-ha
yum install -y ${REPO_PATH}/dist/rpmbuild/RPMS/x86_64/cortx-ha-2.0.0-*.x86_64.rpm
- Create RPM
chmod +x build_ha_rpm.sh
# If your repo is in root
/usr/bin/env bash "build_ha_rpm.sh" /root/<REPO_PATH>/cortx-ha
### If Repo is in user dir. Run from root but pass user id
/usr/bin/env bash "build_ha_rpm.sh" /home/<REPO_PATH>/cortx-ha <USER>