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