Skip to content

Instantly share code, notes, and snippets.

@msplival
Forked from dosaboy/fetch-openstack-charms
Last active April 23, 2019 14:57
Show Gist options
  • Save msplival/d7280793c422a53b894f7b8b23ad4d21 to your computer and use it in GitHub Desktop.
Save msplival/d7280793c422a53b894f7b8b23ad4d21 to your computer and use it in GitHub Desktop.
#!/bin/bash -eux
# change this one if your gerrit remote user name is not the same as your
# shell user name
gerritusername=$USER
#gerritusername=mariosplivalo
repos=(
# supported charms as of 19.04 (https://docs.openstack.org/charm-guide/latest/1904.html#supported-charms)
charm-ceilometer-agent
charm-cinder
charm-cinder-backup
charm-cinder-ceph
charm-designate
charm-glance
charm-heat
charm-keystone
charm-keystone-ldap
charm-neutron-api
charm-neutron-dynamic-routing
charm-neutron-gateway
charm-neutron-openvswitch
charm-nova-cell-controller
charm-nova-cloud-controller
charm-nova-compute
charm-octavia
charm-octavia-dashboard
charm-openstack-dashboard
charm-swift-proxy
charm-swift-storage
charm-percona-cluster
charm-rabbitmq-server
charm-lxd
charm-ceph-osd
charm-ceph-mon
charm-ceph-proxy
charm-ceph-radosgw
charm-hacluster
charm-designate-bind
charm-gnocchi
charm-vault
#preview charms
charm-barbican-softhsm
charm-ceph-fs
charm-cinder-backup
charm-keystone-saml-mellon
charm-manila
charm-manila-generic
charm-masakari
charm-masakari-monitors
charm-pacemaker-remote
charm-tempest
#deprecated charms (as of 19.04)
charm-openvswitch-odl
charm-odl-controller
charm-ceph
)
echo "Fetching charms from github.com/openstack"
mkdir -p openstack-charms
for r in ${repos[@]}; do
charm=`echo $r| sed -r 's/charm-()/\1/'`
target=openstack-charms/$charm
if [ -d "$target" ]; then
echo -e "\033[32m$target\033[0m \033[37malready exists\033[0m - \033[37mskipping clone\033[0m"
else
url=git@github.com:openstack/${r}.git
echo -e "\033[33m==\033[0m \033[37m$url\033[0m \033[33m==\033[0m"
git clone $url $target
fi
# NOTE: this bit is required to submit patches for review and requires you to (a) have an account setup on
# review.openstack.org and (b) installed the git-review package.
# (see https://github.com/openstack-charmers/openstack-community/blob/master/README.dev-charms.md for more info)
(cd $target; git config gitreview.username $gerritusername; git review -s;)
done
echo "Done."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment