summaryrefslogtreecommitdiffstats
path: root/jjb/releng-macros.yaml
diff options
context:
space:
mode:
authorTrevor Bramwell <tbramwell@linuxfoundation.org>2016-03-04 11:04:55 -0800
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2016-03-09 16:16:09 -0800
commit4ff7399fd66525743b3cfd7e3e46d8efc13f0ed5 (patch)
treee0166c7adf229d0d1a880ed6c42afd1d3b9154fd /jjb/releng-macros.yaml
parentb012fc984e8464d85adec06c958d794fa423dbf0 (diff)
Create Releng Job for Generating Artifact JSON API
'opnfv.org/artifacts' uses the index.json file generated by the opnfv-artifacts.py script to list artifacts generated by other OPNFV builds. This adds a Jenkins 'cronjob' for generating and uploading a JSON file to Google Storage containing links to the artifacts and their metadata. Change-Id: I3c40391b40e1e536d4c27e27d5621bf4bc4c00a3 Signed-off-by: Trevor Bramwell <tbramwell@linuxfoundation.org>
Diffstat (limited to 'jjb/releng-macros.yaml')
-rw-r--r--jjb/releng-macros.yaml22
1 files changed, 22 insertions, 0 deletions
diff --git a/jjb/releng-macros.yaml b/jjb/releng-macros.yaml
index b43a76d5f..625e10a4d 100644
--- a/jjb/releng-macros.yaml
+++ b/jjb/releng-macros.yaml
@@ -299,6 +299,28 @@
fi
- builder:
+ name: build-and-upload-artifacts-json-api
+ builders:
+ - shell: |
+ #!/bin/bash
+ set -o errexit
+ set -o pipefail
+
+ echo "Generating Artifacts API ..."
+ virtualenv $WORKSPACE/releng_artifacts
+ source $WORKSPACE/releng_artifacts/bin/activate
+
+ # install python packages
+ easy_install -U setuptools
+ pip install google-api-python-client
+
+ # generate and upload index file
+ python ./releng/utils/opnfv-artifacts.py > index.json
+ gsutil cp index.json gs://artifacts.opnfv.org/index.json
+
+ deactivate
+
+- builder:
name: upload-review-docs
builders:
- build-html-and-pdf-docs-output