project: qtip
jobs:
- 'qtip-verify-{stream}'
- - 'qtip-review-notebook-{stream}'
- - 'qtip-merge-{stream}'
stream:
- master:
branch: '{stream}'
gs-pathname: ''
disabled: false
- - danube:
+ - euphrates:
branch: 'stable/{stream}'
gs-pathname: '/{stream}'
disabled: false
- publish-coverage
- email-jenkins-admins-on-failure
-# upload juypter notebook to artifacts for review
+# Upload juypter notebook to artifacts for review
+# TODO(yujunz): deal with *.ipynb deletion
- job-template:
- name: 'qtip-review-notebook-{stream}'
+ name: 'qtip-verify-notebook-{stream}'
disabled: '{obj:disabled}'
disable-strict-forbidden-file-verification: 'true'
file-paths:
- compare-type: ANT
- pattern: 'examples/**'
+ pattern: '**/*.ipynb'
builders:
- upload-under-review-notebooks-to-opnfv-artifacts
- report-build-result-to-gerrit
- job-template:
- name: 'qtip-merge-{stream}'
+ name: 'qtip-merged-notebook-{stream}'
disabled: '{obj:disabled}'
name: GS_URL
default: '$GS_BASE{gs-pathname}'
description: "Directory where the build artifact will be located upon the completion of the build."
- - string:
- name: GERRIT_REFSPEC
- default: 'refs/heads/{branch}'
- description: "JJB configured GERRIT_REFSPEC parameter"
scm:
- git-scm
branch-pattern: '**/{branch}'
file-paths:
- compare-type: ANT
- pattern: examples/**
+ pattern: '**/*ipynb'
builders:
- remove-old-docs-from-opnfv-artifacts
export PATH=$PATH:/usr/local/bin/
[[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
- [[ -d examples ]] || exit 0
echo
echo "###########################"
gs_path="$gs_base/$GERRIT_CHANGE_NUMBER"
local_path="upload/$GERRIT_CHANGE_NUMBER"
- mkdir -p upload
- cp -r examples "$local_path"
+ mkdir -p $local_path
+
+ git diff HEAD~1 --name-status | grep -E "[AM]\t.+\.ipynb$" | awk '{print $2}' \
+ | xargs -I '{}' cp '{}' $local_path
gsutil -m cp -r "$local_path" "gs://$gs_base/"
echo "Document link(s):" >> gerrit_comment.txt