summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/etc/conf.py34
-rw-r--r--docs/jenkins-job-builder/index.rst23
-rw-r--r--docs/jenkins-job-builder/opnfv-jjb-usage.rst184
-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
10 files changed, 438 insertions, 16 deletions
diff --git a/docs/etc/conf.py b/docs/etc/conf.py
new file mode 100644
index 000000000..486983f19
--- /dev/null
+++ b/docs/etc/conf.py
@@ -0,0 +1,34 @@
+import datetime
+import sys
+import os
+
+try:
+ __import__('imp').find_module('sphinx.ext.numfig')
+ extensions = ['sphinx.ext.numfig']
+except ImportError:
+ # 'pip install sphinx_numfig'
+ extensions = ['sphinx_numfig']
+
+# numfig:
+number_figures = True
+figure_caption_prefix = "Fig."
+
+source_suffix = '.rst'
+master_doc = 'index'
+pygments_style = 'sphinx'
+html_use_index = False
+
+pdf_documents = [('index', u'Copper', u'Copper Project', u'OPNFV')]
+pdf_fit_mode = "shrink"
+pdf_stylesheets = ['sphinx','kerning','a4']
+#latex_domain_indices = False
+#latex_use_modindex = False
+
+latex_elements = {
+ 'printindex': '',
+}
+
+project = u'Copper: Virtual Infrastructure Deployment Policies'
+copyright = u'%s, OPNFV' % datetime.date.today().year
+version = u'1.0.0'
+release = u'1.0.0' \ No newline at end of file
diff --git a/docs/jenkins-job-builder/index.rst b/docs/jenkins-job-builder/index.rst
new file mode 100644
index 000000000..c3dbbb811
--- /dev/null
+++ b/docs/jenkins-job-builder/index.rst
@@ -0,0 +1,23 @@
+.. OPNFV Release Engineering documentation, created by
+ sphinx-quickstart on Tue Jun 9 19:12:31 2015.
+ You can adapt this file completely to your liking, but it should at least
+ contain the root `toctree` directive.
+
+Release Engineering Project
+==================
+
+Contents:
+
+.. toctree::
+ :numbered:
+ :maxdepth: 8
+
+ opnfv-jjb-usage.rst
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
diff --git a/docs/jenkins-job-builder/opnfv-jjb-usage.rst b/docs/jenkins-job-builder/opnfv-jjb-usage.rst
new file mode 100644
index 000000000..5fb1f9135
--- /dev/null
+++ b/docs/jenkins-job-builder/opnfv-jjb-usage.rst
@@ -0,0 +1,184 @@
+Creating/Configuring/Verifying Jenkins Jobs
+============================================
+
+Clone the repo::
+
+ git clone ssh://YOU@gerrit.opnfv.org:29418/releng
+
+make changes::
+
+ git commit -sv
+ git review
+ remote: Resolving deltas: 100% (3/3)
+ remote: Processing changes: new: 1, refs: 1, done
+ remote:
+ remote: New Changes:
+ remote: https://gerrit.opnfv.org/gerrit/51
+ remote:
+ To ssh://agardner@gerrit.opnfv.org:29418/releng.git
+ * [new branch] HEAD -> refs/publish/master
+
+Follow the link to gerrit https://gerrit.opnfv.org/gerrit/51 in a few moments the verify job will have completed and you will see Verified +1 jenkins-ci in the gerrit ui.
+
+If the changes pass the verify job https://build.opnfv.org/ci/view/builder/job/builder-verify-jjb/ The patch can be submitited by a committer.
+
+Job Types
+
+* Verify Job
+
+ * Trigger: **recheck** or **reverify**
+
+* Merge Job
+
+ * Trigger: **remerge**
+
+The verify and merge jobs are retriggerable in Gerrit by simply leaving a comment with one of the keywords listed above. This is useful in case you need to re-run one of those jobs in case if build issues or something changed with the environment.
+
+You can add below persons as reviewers to your patch in order to get it reviewed and submitted.
+
+* fatih.degirmenci@ericsson.com
+* agardner@linuxfoundation.org
+* trozet@redhat.com
+* morgan.richomme@orange.com
+* vlaza@cloudbasesolutions.com
+* matthew.lijun@huawei.com
+* pbandzi@cisco.com
+* jose.lausuch@ericsson.com
+* koffirodrigue@gmail.com
+* r-mibu@cq.jp.nec.com
+
+Or just email a request for submission to opnfv-helpdesk@rt.linuxfoundation.org
+
+The Current merge and verify jobs for jenkins job builder as pulled from the repo::
+
+**releng-jobs.yaml**:
+
+.. code-block:: bash
+
+ - project:
+ name: builder-jobs
+ jobs:
+ - 'builder-verify-jjb'
+ - 'builder-merge'
+
+ project: 'releng'
+
+ - job-template:
+ name: builder-verify-jjb
+
+ node: master
+
+ project-type: freestyle
+
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 10
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+
+ parameters:
+ - project-parameter:
+ project: '{project}'
+ - gerrit-parameter:
+ branch: 'master'
+ scm:
+ - gerrit-trigger-scm:
+ credentials-id: '{ssh-credentials}'
+ refspec: '$GERRIT_REFSPEC'
+ choosing-strategy: 'gerrit'
+
+ wrappers:
+ - ssh-agent-credentials:
+ user: '{ssh-credentials}'
+
+ triggers:
+ - gerrit:
+ trigger-on:
+ - patchset-created-event:
+ exclude-drafts: 'false'
+ exclude-trivial-rebase: 'false'
+ exclude-no-code-change: 'false'
+ - draft-published-event
+ - comment-added-contains-event:
+ comment-contains-value: 'recheck'
+ - comment-added-contains-event:
+ comment-contains-value: 'reverify'
+ projects:
+ - project-compare-type: 'ANT'
+ project-pattern: 'releng'
+ branches:
+ - branch-compare-type: 'ANT'
+ branch-pattern: '**/master'
+ file-paths:
+ - compare-type: ANT
+ pattern: jjb/**
+ - compare-type: ANT
+ pattern: jjb-templates/**
+
+
+ builders:
+ - shell:
+ !include-raw verify-releng
+
+ - job-template:
+ name: 'builder-merge'
+
+ node: master
+
+ # builder-merge job to run JJB update
+ #
+ # This job's purpose is to update all the JJB
+
+ 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: jjb/**
+
+ builders:
+ - shell: |
+ source /opt/virtualenv/jenkins-job-builder/bin/activate
+ cd /opt/jenkins-ci/releng
+ git pull
+ jenkins-jobs update --delete-old jjb/
+
+
+
+
+Revision: _sha1_
+
+Build date: _date_
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