
This includes: * project templates and jobs for charm projects to use * linter for this repo Change-Id: Id7be6711513f42aedd5aba841f9b19652540e8cf
40 lines
805 B
Bash
Executable File
40 lines
805 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script is taken from the openstack-zuul-jobs
|
|
# projects https://github.com/openstack/openstack-zuul-jobs
|
|
|
|
if [[ ! ${ANSIBLE_ROLES_PATH} =~ \.cache.* ]]; then
|
|
exit 0
|
|
fi
|
|
|
|
if [ ! -d .cache/ansible-lint ]; then
|
|
mkdir -p .cache/ansible-lint
|
|
fi
|
|
|
|
pushd .cache/ansible-lint
|
|
|
|
repos=(opendev/base-jobs
|
|
opendev/system-config
|
|
openstack/openstack-zuul-jobs
|
|
zuul/zuul-jobs)
|
|
|
|
for repo in ${repos[@]}; do
|
|
dir=$(dirname $repo)
|
|
echo "Updating Ansible roles repo ${dir}"
|
|
if [ ! -d $repo ]; then
|
|
echo "Cloning fresh"
|
|
mkdir -p $dir
|
|
pushd $dir
|
|
git clone https://opendev.org/$repo
|
|
popd
|
|
else
|
|
echo "Updating repo"
|
|
pushd $repo
|
|
git fetch -a
|
|
git pull
|
|
popd
|
|
fi
|
|
echo "Done"
|
|
done
|
|
|