summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/functest/functest.yml4
-rw-r--r--jjb/genesis/genesis-foreman.yml10
-rw-r--r--jjb/genesis/genesis-fuel.yml8
-rwxr-xr-xjjb/releng/docu-build-new.sh47
-rw-r--r--jjb/releng/releng.yml60
-rw-r--r--jjb/yardstick/yardstick.yml45
6 files changed, 142 insertions, 32 deletions
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml
index abd5bdf22..3a7b09e09 100644
--- a/jjb/functest/functest.yml
+++ b/jjb/functest/functest.yml
@@ -289,7 +289,7 @@
# vPing
echo "Functest: run vPing"
- python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/
+ python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/ -r
- job-template:
name: functest-{pod}
@@ -594,7 +594,7 @@
# vPing
echo "Functest: run vPing"
- python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/
+ python $WORKSPACE/testcases/vPing/CI/libraries/vPing.py --debug $WORKSPACE/ -r
# ODL
echo "Functest: run ODL suite"
diff --git a/jjb/genesis/genesis-foreman.yml b/jjb/genesis/genesis-foreman.yml
index 26f0a4035..da4468bd4 100644
--- a/jjb/genesis/genesis-foreman.yml
+++ b/jjb/genesis/genesis-foreman.yml
@@ -10,14 +10,14 @@
installer: 'foreman'
jobs:
- - 'genesis-foreman-verify-{stream}'
+ - 'genesis-foreman-verify-build-{stream}'
- 'genesis-foreman-merge-{stream}'
- 'genesis-foreman-daily-{stream}'
- 'genesis-foreman-build-{stream}'
- 'genesis-foreman-deploy-{stream}'
- 'genesis-foreman-lab-reconfig-{stream}'
- 'genesis-foreman-deploy-runner-{stream}'
- - 'genesis-foreman-deploy-virtual-{stream}'
+ - 'genesis-foreman-verify-deploy-virtual-{stream}'
# stream: branch with - in place of / (eg. stable-arno)
# branch: branch (eg. stable/arno)
@@ -33,7 +33,7 @@
########################
- job-template:
- name: 'genesis-foreman-verify-{stream}'
+ name: 'genesis-foreman-verify-build-{stream}'
project-type: freestyle
@@ -371,7 +371,7 @@
- 'foreman-lab-reconfig'
- job-template:
- name: 'genesis-foreman-deploy-virtual-{stream}'
+ name: 'genesis-foreman-verify-deploy-virtual-{stream}'
project-type: freestyle
@@ -428,7 +428,7 @@
pattern: 'common/**'
- compare-type: ANT
pattern: '{installer}/**'
- dependency-jobs: 'genesis-foreman-verify-{stream}'
+ dependency-jobs: 'genesis-foreman-verify-build-{stream}'
builders:
diff --git a/jjb/genesis/genesis-fuel.yml b/jjb/genesis/genesis-fuel.yml
index a30c279d3..4e1a1208d 100644
--- a/jjb/genesis/genesis-fuel.yml
+++ b/jjb/genesis/genesis-fuel.yml
@@ -10,14 +10,14 @@
installer: 'fuel'
jobs:
- - 'genesis-fuel-verify-{stream}'
+ - 'genesis-fuel-verify-build-{stream}'
- 'genesis-fuel-merge-{stream}'
- 'genesis-fuel-daily-{stream}'
- 'genesis-fuel-build-{stream}'
- 'genesis-fuel-deploy-{stream}'
- 'genesis-fuel-deploy-runner-{stream}'
- 'genesis-fuel-lab-reconfig-{stream}'
- - 'genesis-fuel-deploy-virtual-{stream}'
+ - 'genesis-fuel-verify-deploy-virtual-{stream}'
# stream: branch with - in place of / (eg. stable-arno)
# branch: branch (eg. stable/arno)
@@ -34,7 +34,7 @@
########################
- job-template:
- name: 'genesis-fuel-verify-{stream}'
+ name: 'genesis-fuel-verify-build-{stream}'
project-type: freestyle
@@ -376,7 +376,7 @@
- 'fuel-lab-reconfig'
- job-template:
- name: 'genesis-fuel-deploy-virtual-{stream}'
+ name: 'genesis-fuel-verify-deploy-virtual-{stream}'
project-type: freestyle
diff --git a/jjb/releng/docu-build-new.sh b/jjb/releng/docu-build-new.sh
index 8c0cc49bb..00d046479 100755
--- a/jjb/releng/docu-build-new.sh
+++ b/jjb/releng/docu-build-new.sh
@@ -3,6 +3,7 @@ set -e
set -o pipefail
export PATH=$PATH:/usr/local/bin/
+git_sha1="$(git rev-parse HEAD)"
clean() {{
if [[ -d docs/output ]]; then
@@ -13,6 +14,15 @@ fi
trap clean EXIT TERM INT SIGTERM SIGHUP
+#set git_sha1
+files=()
+while read -r -d ''; do
+ files+=("$REPLY")
+done < <(find docs/ -type f -iname '*.rst' -print0)
+for file in "${{files[@]}}"; do
+ sed -i "s/_sha1_/$git_sha1/g" $file
+done
+
directories=()
while read -d $'\n'; do
directories+=("$REPLY")
@@ -30,14 +40,22 @@ for dir in "${{directories[@]}}"; do
fi
sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/"
+
done
# NOTE: make sure source parameters for GS paths are not empty.
[[ $GERRIT_CHANGE_NUMBER =~ .+ ]]
[[ $GERRIT_PROJECT =~ .+ ]]
[[ $GERRIT_BRANCH =~ .+ ]]
+
gs_path_review="artifacts.opnfv.org/review/$GERRIT_CHANGE_NUMBER"
+if [[ $GERRIT_BRANCH = "master" ]] ; then
+ gs_path_branch="artifacts.opnfv.org/$GERRIT_PROJECT"
+else
+ gs_path_branch="artifacts.opnfv.org/$GERRIT_PROJECT/${{GERRIT_BRANCH##*/}}"
+fi
+
for dir in "${{directories[@]}}"; do
echo
echo "#############################"
@@ -45,24 +63,39 @@ for dir in "${{directories[@]}}"; do
echo "#############################"
echo
- if [[ $GERRIT_BRANCH = "master" ]] ; then
- gs_path_branch="artifacts.opnfv.org/$GERRIT_PROJECT"
- else
- gs_path_branch="artifacts.opnfv.org/$GERRIT_PROJECT/${{GERRIT_BRANCH##*/}}"
- fi
if [[ $JOB_NAME =~ "verify" ]] ; then
+
+ #upload artifacts for verify job
gsutil cp -r docs/output/"${{dir##*/}}/" "gs://$gs_path_review/"
+
# post link to gerrit as comment
gerrit_comment="$(echo '"Document is available at 'http://$gs_path_review/"${{dir##*/}}"/index.html' for review"')"
echo "$gerrit_comment"
ssh -p 29418 gerrit.opnfv.org gerrit review -p $GERRIT_PROJECT -m \
"$gerrit_comment" $GERRIT_PATCHSET_REVISION
+ #set cache to 0
+ for x in $(gsutil ls gs://$gs_path_review/"${{dir##*/}}" | grep html);
+ do
+ gsutil setmeta -h "Content-Type:text/html" \
+ -h "Cache-Control:private, max-age=0, no-transform" \
+ "$x"
+ done
+
else
- gsutil cp -r docs/output/"${{dir##*/}}/" "gs://$gs_path_branch/"
- echo "Latest document is available at http://$gs_path_branch/index.html"
+ #upload artifacts for merge job
+ gsutil cp -r docs/output/"${{dir##*/}}" "gs://$gs_path_branch/docs/"
+ echo "Latest document is available at http://$gs_path_branch/docs/"${{dir##*/}}"/index.html"
+
+ #set cache to 0
+ for x in $(gsutil ls gs://$gs_path_branch/"${{dir}}" | grep html);
+ do
+ gsutil setmeta -h "Content-Type:text/html" \
+ -h "Cache-Control:private, max-age=0, no-transform" \
+ "$x"
+ done
#Clean up review when merging
if gsutil ls "gs://$gs_path_review" > /dev/null 2>&1 ; then
diff --git a/jjb/releng/releng.yml b/jjb/releng/releng.yml
index c24fcb065..87a73c490 100644
--- a/jjb/releng/releng.yml
+++ b/jjb/releng/releng.yml
@@ -9,6 +9,7 @@
jobs:
- 'releng-verify'
+ - 'releng-merge'
# stream: branch with - in place of / (eg. stable-arno)
# branch: branch (eg. stable/arno)
@@ -79,3 +80,62 @@
builders:
- shell:
!include-raw docu-build-new.sh
+
+
+- job-template:
+ name: 'releng-merge'
+
+ # builder-merge job to run JJB update
+ #
+ # This job's purpose is to update all the JJB
+
+ node: master
+
+ project-type: freestyle
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 40
+ artifactDaysToKeep: -1
+ artifactNumToKeep: 5
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ choosing-strategy: 'default'
+
+ wrappers:
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - change-merged-event
+ - comment-added-contains-event:
+ comment-contains-value: 'remerge'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'releng'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ file-paths:
+ - compare-type: ANT
+ pattern: 'utils/**'
+ - compare-type: ANT
+ pattern: 'docs/**'
+ forbidden-file-paths:
+ - compare-type: ANT
+ pattern: 'jjb/**'
+
+ builders:
+ - shell:
+ !include-raw docu-build-new.sh
diff --git a/jjb/yardstick/yardstick.yml b/jjb/yardstick/yardstick.yml
index 0365ff294..ac1442de9 100644
--- a/jjb/yardstick/yardstick.yml
+++ b/jjb/yardstick/yardstick.yml
@@ -194,7 +194,7 @@
builders:
- 'yardstick-fetch-os-creds'
- - 'yardstick-ping'
+ - 'yardstick-daily'
publishers:
- email:
@@ -204,7 +204,7 @@
# builder macros
########################
- builder:
- name: yardstick-ping
+ name: yardstick-daily
builders:
- shell: |
#!/bin/bash
@@ -220,29 +220,46 @@
fi
source $HOME/opnfv-openrc.sh
- # check if cirros-0.3.3 image is already available
- # if not, create the image
- echo "Yardstick: configure the image"
- IMAGE_NAME=cirros-0.3.3
- if ! nova image-show $IMAGE_NAME > /dev/null 2>&1; then
- echo "Image $IMAGE_NAME doesn't exist. Creating image $IMAGE_NAME"
- glance image-create --name cirros-0.3.3 --is-public true --disk-format qcow2 --container-format bare --file $HOME/yardstick/cirros-0.3.3-x86_64-disk.img
- fi
+ # Emergency fix for glance '--is-public' error.
+ # TODO: This should maybe go into openrc instead!?
+ export OS_IMAGE_API_VERSION=1
# set virtualenv
echo "Yardstick: setup virtualenv"
cd $WORKSPACE
virtualenv $WORKSPACE/yardstick_venv
source $WORKSPACE/yardstick_venv/bin/activate
+ easy_install -U setuptools
python setup.py develop > /dev/null 2>&1
- # set virtualenv
- echo "Yardstick: execute ping scenario"
- yardstick task start samples/ping.yaml -v -d
+ echo "Yardstick: configure the images"
+ # check if cirros-0.3.3 image is already available
+ # if not, create the image
+ IMAGE_NAMES[0]=cirros-0.3.3
+ if ! nova image-show ${IMAGE_NAMES[0]} > /dev/null 2>&1; then
+ echo "Image ${IMAGE_NAMES[0]} doesn't exist. Creating image ${IMAGE_NAMES[0]}"
+ glance image-create --name cirros-0.3.3 --is-public true --disk-format qcow2 --container-format bare --file $HOME/yardstick/cirros-0.3.3-x86_64-disk.img
+ fi
+
+ # check if yardstick-trusty image is already available
+ # if not, create the image to $WORKSPACE
+ IMAGE_NAMES[1]=yardstick-trusty-server
+ if ! nova image-show ${IMAGE_NAMES[1]} > /dev/null 2>&1; then
+ echo "Image ${IMAGE_NAMES[1]} doesn't exist. Creating image ${IMAGE_NAMES[1]}"
+ sudo yardstick-img-modify $WORKSPACE/tools/ubuntu-server-cloudimg-modify.sh
+ glance image-create --name yardstick-trusty-server --is-public true --disk-format qcow2 --container-format bare --file $WORKSPACE/yardstick-trusty-server.img
+ fi
+
+ # execute tasks
+ echo "Yardstick: execute scenarios"
+ ./ci/run_tasks.sh
# cleanup
echo "Yardstick: cleanup"
- glance image-delete $IMAGE_NAME
+ for IMAGE_NAME in ${IMAGE_NAMES[@]}
+ do
+ glance image-delete $IMAGE_NAME
+ done
# done
echo "Yardstick: done!"