--- /dev/null
+#!/bin/bash
+virtualenv $WORKSPACE/.venv
+source $WORKSPACE/.venv/bin/activate
+pip install --upgrade --quiet pip
+pip install --upgrade --quiet python-openstackclient python-heatclient
+pip freeze
+
+cat > $WORKSPACE/docs/cloud-images.rst << EOF
+Following are the list of published images available to be used with Jenkins jobs.
+
+EOF
+# Blank line before EOF is on purpose to ensure there is spacing.
+
+IFS=$'\n'
+IMAGES=(`openstack --os-cloud odlpriv image list --public -f value -c Name`)
+for i in ${IMAGES[@]}; do
+ echo "* $i" >> $WORKSPACE/docs/cloud-images.rst
+done
+
+git add docs/cloud-images.rst
- 'builder-check-poms'
- 'builder-verify-packer'
- 'builder-merge-packer-{platforms}-{templates}'
+ # OpenStack Related
- 'builder-delete-stale-stacks'
+ # Automation for docs and jobs
- 'builder-update-csit-tests'
+ - 'builder-update-image-list'
platforms:
- centos
- opendaylight-infra-shiplogs:
maven-version: 'mvn33'
+- job-template:
+ name: 'builder-update-image-list'
+ project-type: freestyle
+ node: centos7-java-builder-2c-4g
+
+ properties:
+ - opendaylight-infra-properties:
+ build-days-to-keep: 7
+
+ parameters:
+ - opendaylight-infra-parameters:
+ project: '{project}'
+ branch: '{branch}'
+ refspec: 'refs/heads/{branch}'
+ artifacts: '{archive-artifacts}'
+
+ scm:
+ - git-scm:
+ branch: '{branch}'
+
+ wrappers:
+ - opendaylight-infra-wrappers:
+ build-timeout: '{build-timeout}'
+ # Listed after to override openstack-infra-wrappers clouds.yaml definition
+ - config-file-provider:
+ files:
+ - file-id: opendaylight-private-clouds-yaml
+ target: '$HOME/.config/openstack/clouds.yaml'
+
+ triggers:
+ # Update image list every Monday to Friday at 11:00 UTC
+ - timed: '0 11 * * 1-5'
+
+ builders:
+ - shell: !include-raw-escape: opendaylight-infra-update-image-list.sh
+ - opendaylight-infra-push-gerrit-patch:
+ project: '{project}'
+ gerrit-topic: 'releng-update-cloud-image-list'
+ gerrit-commit-message: 'Update cloud image list docs'
+
+ publishers:
+ - email-notification:
+ email-recipients: '{email-recipients}'
+ email-prefix: '[releng]'
+ - opendaylight-infra-shiplogs:
+ maven-version: 'mvn33'
+
- job-template:
name: 'builder-verify-packer'
project-type: freestyle