summaryrefslogtreecommitdiffstats
path: root/jjb
diff options
context:
space:
mode:
Diffstat (limited to 'jjb')
-rw-r--r--jjb/copper/.availability.yml.swpbin12288 -> 0 bytes
-rw-r--r--jjb/copper/docu-build.sh4
-rw-r--r--jjb/functest/functest.yml124
-rw-r--r--jjb/genesis/genesis-foreman.yml2
-rw-r--r--jjb/genesis/genesis-fuel.yml2
-rwxr-xr-xjjb/releng/docu-build-new.sh72
-rw-r--r--jjb/releng/releng.yml9
7 files changed, 197 insertions, 16 deletions
diff --git a/jjb/copper/.availability.yml.swp b/jjb/copper/.availability.yml.swp
deleted file mode 100644
index 7ca652091..000000000
--- a/jjb/copper/.availability.yml.swp
+++ /dev/null
Binary files differ
diff --git a/jjb/copper/docu-build.sh b/jjb/copper/docu-build.sh
index 8508ba8d4..68a7bf541 100644
--- a/jjb/copper/docu-build.sh
+++ b/jjb/copper/docu-build.sh
@@ -33,6 +33,10 @@ if [[ $JOB_NAME =~ "verify" ]] ; then
gsutil cp -r build/* "gs://$gs_path_review/"
echo
echo "Document is available at http://$gs_path_review/index.html"
+ # post link to gerrit as comment
+ gerrit_comment=$(echo '"Document is available at 'http://$gs_path_review/index.html' for review"')
+ ssh -p 29418 gerrit.opnfv.org gerrit review -p $GERRIT_PROJECT -m \
+ $gerrit_comment $GERRIT_PATCHSET_REVISION
else
gsutil cp -r build/* "gs://$gs_path_branch/design_docs/"
#gsutil cp -r build/design_docs "gs://$gs_path_branch/"
diff --git a/jjb/functest/functest.yml b/jjb/functest/functest.yml
index f0193e16b..7ea794a12 100644
--- a/jjb/functest/functest.yml
+++ b/jjb/functest/functest.yml
@@ -3,23 +3,29 @@
###################################
- project:
name: functest
- pod:
- - opnfv-jump-1:
- node: 'opnfv-jump-1'
+
+ installer:
+ - fuel:
+ node: 'opnfv-jump-2'
installer_type: 'fuel'
installer_ip: '10.20.0.2'
- - opnfv-jump-2:
+ - foreman:
node: 'opnfv-jump-2'
installer_type: 'foreman'
installer_ip: '172.30.10.73'
+ pod:
- orange-build:
node: 'orange-build'
installer_type: 'foreman'
installer_ip: '172.30.10.73'
+
jobs:
- - 'functest-{pod}'
- 'set-functest-env-{pod}'
+ - 'functest-{pod}'
- 'clean-functest-env-{pod}'
+ - 'set-functest-env-{installer}-{stream}'
+ - 'functest-{installer}-{stream}'
+ - 'clean-functest-env-{installer}-{stream}'
- 'functest-openstack-bench-test-{pod}'
- 'functest-openstack-tempest-smoke-test-{pod}'
- 'functest-odl-test-{pod}'
@@ -64,12 +70,6 @@
echo "Functest: prepare Functest environment"
mkdir -p $HOME/functest/
- # source openstack vars
- if [[ ! -f $HOME/opnfv-openrc.sh ]]; then
- echo "Unable to access file $HOME/opnfv-openrc.sh"
- exit 1
- fi
- source $HOME/opnfv-openrc.sh
# WORKSPACE is the root of the functest repo
# go into WORKSPACE where the functest repo is cloned
@@ -111,6 +111,66 @@
python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean
- job-template:
+ name: set-functest-env-{installer}-{stream}
+
+ project-type: freestyle
+
+ node: '{node}'
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ builders:
+ - shell: |
+ #!/bin/bash
+ set +e
+
+ echo "Functest: prepare Functest environment"
+ mkdir -p $HOME/functest/
+
+ # WORKSPACE is the root of the functest repo
+ # go into WORKSPACE where the functest repo is cloned
+ cd $WORKSPACE
+
+ # prepare
+ echo "Functest: prepare Functest environment"
+ python $WORKSPACE/testcases/config_functest.py --debug $WORKSPACE/ start
+
+- job-template:
+ name: clean-functest-env-{installer}-{stream}
+
+ project-type: freestyle
+
+ node: '{node}'
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ builders:
+ - shell: |
+ #!/bin/bash
+ set +e
+
+ # collect results
+ echo "Functest: copy results and clean Functest environment"
+ mkdir -p $HOME/functest/results
+
+ # save ODL results
+ cp -Rf $WORSPACE/testcases/Controllers/ODL/CI/logs $HOME/functest/results/ODL
+
+ # save tempest.conf for further troubleshooting
+ cp $HOME/.rally/tempest/for-deployment-*/tempest.conf $HOME/functest/results
+
+ # cleanup
+ python $WORKSPACE/testcases/config_functest.py --debug --force $WORKSPACE/ clean
+
+- job-template:
name: functest-openstack-bench-test-{pod}
project-type: freestyle
@@ -254,6 +314,47 @@
- 'functest-cleanup'
- job-template:
+ name: functest-{installer}-{stream}
+
+ project-type: freestyle
+
+ node: '{node}'
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - string:
+ name: INSTALLER_TYPE
+ default: '{installer_type}'
+ description: "Installer name that is used for deployment."
+ - string:
+ name: INSTALLER_IP
+ default: '{installer_ip}'
+ description: "Installer IP."
+ - string:
+ name: GIT_BASE
+ default: ssh://gerrit.opnfv.org:29418/$PROJECT
+ description: "Override GIT_BASE"
+
+ scm:
+ - git-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: ''
+ branch: master
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ builders:
+ - 'functest-fetch-os-creds'
+ - 'functest-all'
+ - 'functest-store-results'
+ - 'functest-cleanup'
+
+- job-template:
name: 'functest-daily-{stream}'
node: master
@@ -463,7 +564,6 @@
echo "Functest: prepare Functest environment"
mkdir -p $HOME/functest/
- source $HOME/functest/opnfv-openrc.sh
# WORKSPACE is the root of the functest repo
# go into WORKSPACE where the functest repo is cloned
diff --git a/jjb/genesis/genesis-foreman.yml b/jjb/genesis/genesis-foreman.yml
index 1980a3913..bbeae8851 100644
--- a/jjb/genesis/genesis-foreman.yml
+++ b/jjb/genesis/genesis-foreman.yml
@@ -203,7 +203,7 @@
git-revision: true
block: true
- trigger-builds:
- - project: 'functest-opnfv-jump-2'
+ - project: 'functest-foreman-{stream}'
block: true
- trigger-builds:
- project: 'yardstick-opnfv-jump-2'
diff --git a/jjb/genesis/genesis-fuel.yml b/jjb/genesis/genesis-fuel.yml
index 69aa8950b..2240571f0 100644
--- a/jjb/genesis/genesis-fuel.yml
+++ b/jjb/genesis/genesis-fuel.yml
@@ -206,7 +206,7 @@
git-revision: true
block: true
- trigger-builds:
- - project: 'functest-opnfv-jump-2'
+ - project: 'functest-fuel-{stream}'
block: true
- trigger-builds:
- project: 'yardstick-opnfv-jump-2'
diff --git a/jjb/releng/docu-build-new.sh b/jjb/releng/docu-build-new.sh
new file mode 100755
index 000000000..233aba54f
--- /dev/null
+++ b/jjb/releng/docu-build-new.sh
@@ -0,0 +1,72 @@
+#!/bin/bash
+set -e
+set -o pipefail
+
+export PATH=$PATH:/usr/local/bin/
+
+clean() {{
+if [[ -d docs/output ]]; then
+rm -rf docs/output
+echo "cleaning up output directory"
+fi
+}}
+
+trap clean EXIT TERM INT SIGTERM SIGHUP
+
+directories=()
+while read -d $'\n'; do
+ directories+=("$REPLY")
+done < <(find docs/ -name 'index.rst' -printf '%h\n' | sort -u )
+
+for dir in "${{directories[@]}}"; do
+echo
+echo "#############################"
+echo "Building DOCS in ${{dir##*/}}"
+echo "#############################"
+echo
+
+if [[ ! -d docs/output/"${{dir##*/}}/" ]]; then
+ mkdir -p docs/output/"${{dir##*/}}/"
+fi
+
+sphinx-build -b html -E -c docs/etc/ ""$dir"/" docs/output/"${{dir##*/}}/"
+
+echo
+echo "Upload"
+echo "------"
+echo
+
+# 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
+
+if [[ $JOB_NAME =~ "verify" ]] ; then
+ gsutil cp -r docs/output/"${{dir##*/}}/" "gs://$gs_path_review/"
+ echo
+ # 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
+else
+ gsutil cp -r docs/output/"${{dir##*/}}/" "gs://$gs_path_branch/design_docs/"
+
+ echo "Latest document is available at http://$gs_path_branch/design_docs/index.html"
+
+ if gsutil ls "gs://$gs_path_review" > /dev/null 2>&1 ; then
+ echo
+ echo "Deleting Out-of-dated Documents..."
+ gsutil rm -r "gs://$gs_path_review"
+ fi
+fi
+
+
+done
diff --git a/jjb/releng/releng.yml b/jjb/releng/releng.yml
index bb64f6a1a..c24fcb065 100644
--- a/jjb/releng/releng.yml
+++ b/jjb/releng/releng.yml
@@ -70,7 +70,12 @@
file-paths:
- compare-type: ANT
pattern: 'utils/**'
+ - compare-type: ANT
+ pattern: 'docs/**'
+ forbidden-file-paths:
+ - compare-type: ANT
+ pattern: 'jjb/**'
builders:
- - shell: |
- echo "Hello world from releng"
+ - shell:
+ !include-raw docu-build-new.sh