Last active
February 7, 2019 09:28
-
-
Save jfrancoa/6bd59f19730797dab21ed7e0f5b654bb to your computer and use it in GitHub Desktop.
build-rpm-delorean
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#USE: ./build_rpm.sh tripleo-heat-templates refs/changes/54/628154/7 | |
# Parameters: | |
# - $1=repository name (without the openstack/ part) | |
# - $2=refs for the gerrit patch | |
REPO=$1 | |
REFS=$2 | |
set -eu | |
set -o pipefail | |
mkdir -p ~/tripleo | |
cd ~/tripleo | |
sudo yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm | |
sudo yum install -y mock redhat-rpm-config rpmdevtools httpd libffi-devel \ | |
openssl-devel yum-utils | |
[ -d ~/tripleo/${REPO} ] || git clone https://github.com/openstack/${REPO}.git ~/tripleo/${REPO} | |
cd ${REPO} | |
git fetch https://git.openstack.org/openstack/${REPO} ${REFS} && git checkout FETCH_HEAD | |
cd ~/tripleo | |
[ -d ~/tripleo/tripleo-ci ] || git clone https://github.com/openstack-infra/tripleo-ci.git ~/tripleo/tripleo-ci | |
./tripleo-ci/scripts/tripleo.sh --delorean-setup | |
if ! [ -x "$(command -v rdopkg)" ]; then | |
sudo yum install -y rdopkg | |
fi | |
sudo yum remove -y epel-release | |
[ -e /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 ] || sudo curl https://www.centos.org/keys/RPM-GPG-KEY-CentOS-7 -o /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 | |
./tripleo-ci/scripts/tripleo.sh --delorean-build openstack/${REPO} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment