Allow building heat-agents image from master

Previously, the heat-agents image didn't build unless we exported the
OPENSTACK_RELEASE environment variable at build time. This commit
remove that limitation and build the image using RDO master when the
environment variable is not set.

Change-Id: I3a693b978c2ffd00a438fc9e1ff8a9353df8f50b
This commit is contained in:
Martin André 2016-10-11 08:43:53 +02:00 committed by Steve Baker
parent 58112d1d90
commit 2154192f24

View File

@ -2,14 +2,27 @@
# Doing this in a separate script lets us do it step by step with a single docker layer.
if [ -z "$OPENSTACK_RELEASE" ]; then
echo "Please, set OPENSTACK_RELEASE to the desired openstack version."
echo "You can run the build command as: "
echo "OPENSTACK_RELEASE=newton docker build -t tripleoupstream/heat-docker-agents:\$OPENSTACK_RELEASE --build-arg OPENSTACK_RELEASE=\$OPENSTACK_RELEASE ."
exit 1
if [ -n "$OPENSTACK_RELEASE" ]; then
# Install specified OpenStack release
yum -y install http://rdoproject.org/repos/openstack-$OPENSTACK_RELEASE/rdo-release-$OPENSTACK_RELEASE.rpm
else
# Install from master
curl -L -o /etc/yum.repos.d/delorean.repo \
http://buildlogs.centos.org/centos/7/cloud/x86_64/rdo-trunk-master-tripleo/delorean.repo
curl -L -o /etc/yum.repos.d/delorean-current.repo \
http://trunk.rdoproject.org/centos7/current/delorean.repo
sed -i 's/\[delorean\]/\[delorean-current\]/' /etc/yum.repos.d/delorean-current.repo
cat << EOF >> /etc/yum.repos.d/delorean-current.repo
includepkgs=diskimage-builder,instack,instack-undercloud,os-apply-config,os-cloud-config,os-collect-config,os-net-config,os-refresh-config,python-tripleoclient,tripleo-common,openstack-tripleo-heat-templates,openstack-tripleo-image-elements,openstack-tripleo,openstack-tripleo-puppet-elements,openstack-puppet-modules
EOF
curl -L -o /etc/yum.repos.d/delorean-deps.repo \
http://trunk.rdoproject.org/centos7/delorean-deps.repo
yum -y install yum-plugin-priorities
fi
yum -y install http://rdoproject.org/repos/openstack-$OPENSTACK_RELEASE/rdo-release-$OPENSTACK_RELEASE.rpm
yum update -y
# Install required packages