summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
authorAric Gardner <agardner@linuxfoundation.org>2016-03-23 13:19:45 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-03-23 13:19:45 +0000
commitb7ed043738342516764318c7804b252083fdd407 (patch)
tree0e2cb8cd654b1338fb60392c26d74a92609d4ea3 /jjb
parentbbce3eedef9c23757a621c1b0e1fb651bf278dfb (diff)
parent4ff7399fd66525743b3cfd7e3e46d8efc13f0ed5 (diff)
Merge "Create Releng Job for Generating Artifact JSON API"
Diffstat (limited to 'jjb')
-rw-r--r--jjb/releng-jobs.yaml17
-rw-r--r--jjb/releng-macros.yaml22
2 files changed, 39 insertions, 0 deletions
diff --git a/jjb/releng-jobs.yaml b/jjb/releng-jobs.yaml
index 0b36f0775..655660bb9 100644
--- a/jjb/releng-jobs.yaml
+++ b/jjb/releng-jobs.yaml
@@ -3,6 +3,7 @@
jobs:
- 'builder-verify-jjb'
- 'builder-merge'
+ - 'artifacts-api'
project: 'releng'
@@ -99,3 +100,19 @@
git pull
jenkins-jobs update --delete-old jjb/
+- job-template:
+ name: 'artifacts-api'
+
+ # Generate and upload the JSON file to used for artifacts site
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+
+ triggers:
+ - timed: '@hourly'
+
+ builders:
+ - build-and-upload-artifacts-json-api
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