Add job to generate an image list for docs
[releng/builder.git] / jjb / opendaylight-infra-update-image-list.sh
1 #!/bin/bash
2 virtualenv $WORKSPACE/.venv
3 source $WORKSPACE/.venv/bin/activate
4 pip install --upgrade --quiet pip
5 pip install --upgrade --quiet python-openstackclient python-heatclient
6 pip freeze
7
8 cat > $WORKSPACE/docs/cloud-images.rst << EOF
9 Following are the list of published images available to be used with Jenkins jobs.
10
11 EOF
12 # Blank line before EOF is on purpose to ensure there is spacing.
13
14 IFS=$'\n'
15 IMAGES=(`openstack --os-cloud odlpriv image list --public -f value -c Name`)
16 for i in ${IMAGES[@]}; do
17     echo "* $i" >> $WORKSPACE/docs/cloud-images.rst
18 done
19
20 git add docs/cloud-images.rst