Merge "run all the deployment jobs parallelly"
authorRyota Mibu <r-mibu@cq.jp.nec.com>
Wed, 6 Jan 2016 03:59:09 +0000 (03:59 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Wed, 6 Jan 2016 03:59:09 +0000 (03:59 +0000)
jjb/functest/res-build.sh
jjb/onosfw/onosfw.yml
jjb/opnfv/opnfv-docs.yml
jjb/opnfvdocs/opnfvdocs.yml [new file with mode: 0644]
jjb/opnfvdocs/project.cfg [new file with mode: 0644]
jjb/releng-defaults.yaml
jjb/releng-macros.yaml
jjb/vswitchperf/vswitchperf.yml

index 9d42577..1f46996 100644 (file)
@@ -9,7 +9,7 @@ res_build_date=$(date -u +"%Y-%m-%d_%H-%M-%S")
 
 # Result directory in the jumphost
 # to be used only with CI
-dir_result="${HOME}/opnfv/functest/reports"
+dir_result="${HOME}/opnfv/functest/results"
 
 # Clean the results directory
 # remove json file for rally, export only html
index df1fdb7..7dc0241 100644 (file)
         - project-parameter:
             project: '{project}'
         - 'opnfv-build-defaults'
+        - string:
+            name: GS_URL
+            default: '$GS_BASE{gs-pathname}'
+            description: "Directory where the build artifact will be located upon the completion     of the build."
 
     scm:
         - git-scm:
     builders:
         - 'builder-onosfw-helloworld'
 
-
-
 ########################
 # builder macros
 ########################
                 echo "OPNFV_ARTIFACT_VERSION=$OPNFV_ARTIFACT_VERSION"
                 echo "OPNFV_GIT_URL=$(git config --get remote.origin.url)"
                 echo "OPNFV_GIT_SHA1=$(git rev-parse HEAD)"
-                echo "OPNFV_ARTIFACT_URL=$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
+                echo "OPNFV_ARTIFACT_URL=$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
                 echo "OPNFV_ARTIFACT_MD5SUM=$(md5sum $BUILD_DIRECTORY/onosfw.iso | cut -d' ' -f1)"
                 echo "OPNFV_BUILD_URL=$BUILD_URL"
             ) > $BUILD_DIRECTORY/opnfv.properties
             source $BUILD_DIRECTORY/opnfv.properties
 
             # upload artifact and additional files to google storage
-            gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
-            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
-            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_BASE/latest.properties > gsutil.latest.log 2>&1
+            gsutil cp $BUILD_DIRECTORY/onosfw.iso gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso > gsutil.iso.log 2>&1
+            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.properties > gsutil.properties.log 2>&1
+            gsutil cp $BUILD_DIRECTORY/opnfv.properties gs://$GS_URL/latest.properties > gsutil.latest.log 2>&1
 
             echo
             echo "--------------------------------------------------------"
             echo "Done!"
-            echo "Artifact is available as http://$GS_BASE/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
+            echo "Artifact is available as http://$GS_URL/opnfv-$OPNFV_ARTIFACT_VERSION.iso"
 
 
 - builder:
index 3574b39..31f5d00 100644 (file)
         - 'opnfv-docs-verify-{stream}'
         - 'opnfv-docs-merge-{stream}'
 
-    # stream:    branch with - in place of / (eg. stable-arno)
-    # branch:    branch (eg. stable/arno)
     stream:
         - master:
-            branch: 'master'
+            branch: '{stream}'
+            gs-pathname: ''
+        - brahmaputra:
+            branch: 'stable/{stream}'
+            gs-pathname: '/{stream}'
 
 ########################
 # job templates
@@ -28,7 +30,7 @@
         - project-parameter:
             project: $GERRIT_PROJECT
         - gerrit-parameter:
-            branch: 'master'
+            branch: '{branch}'
 
     scm:
         - gerrit-trigger-scm:
@@ -54,7 +56,7 @@
                 project-pattern: 'vswitchperf|yardstick|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|opnfvdocs|cperf|functest'
                 branches:
                   - branch-compare-type: 'ANT'
-                    branch-pattern: '**/master'
+                    branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
                     pattern: 'docs/**'
         - project-parameter:
             project: $GERRIT_PROJECT
         - gerrit-parameter:
-            branch: 'master'
+            branch: '{branch}'
+        - string:
+            name: GS_URL
+            default: '$GS_BASE{gs-pathname}'
+            description: "Directory where the build artifact will be located upon the completion     of the build."
 
     scm:
         - gerrit-trigger-scm:
@@ -88,7 +94,7 @@
                 project-pattern: 'vswitchperf|yardstick|apex|availability|bottlenecks|compass4nfv|conductor|copper|doctor|dovetail|dpacc|escalator|fastpathmetrics|fuel|inspector|ipv6|joid|kvmfornfv|lsoapi|moon|movie|multisite|onosfw|ovsnfv|parser|prediction|promise|qtip|releng|rs|sdnvpn|sfc|vnf_forwarding_graph|enfv|pinpoint|pharos|opnfvdocs|cperf|functest'
                 branches:
                   - branch-compare-type: 'ANT'
-                    branch-pattern: '**/master'
+                    branch-pattern: '**/{branch}'
                 file-paths:
                   - compare-type: ANT
                     pattern: 'docs/**'
diff --git a/jjb/opnfvdocs/opnfvdocs.yml b/jjb/opnfvdocs/opnfvdocs.yml
new file mode 100644 (file)
index 0000000..6b8650e
--- /dev/null
@@ -0,0 +1,181 @@
+########################
+# Job configuration for opnfvdocs
+########################
+- project:
+
+    name: opnfvdocs
+
+    project: '{name}'
+
+    jobs:
+        - 'opnfvdocs-verify-{stream}'
+        - 'opnfvdocs-merge-{stream}'
+        - 'opnfvdocs-daily-{stream}'
+
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+        - brahmaputra:
+            branch: 'stable/{stream}'
+            gs-pathname: '/{stream}'
+
+########################
+# job templates
+########################
+
+- job-template:
+    name: 'opnfvdocs-verify-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: $GERRIT_PROJECT
+        - gerrit-parameter:
+            branch: '{branch}'
+        - string:
+            name: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    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: 'REG_EXP'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**'
+
+    builders:
+        - clone-opnfv-repos
+        - build-html-and-pdf-docs-output
+        - upload-under-review-docs-to-opnfv-artifacts
+        - report-docs-build-result-to-gerrit
+
+- job-template:
+    name: 'opnfvdocs-merge-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: $GERRIT_PROJECT
+        - gerrit-parameter:
+            branch: '{branch}'
+        - string:
+            name: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
+        - string:
+            name: GS_URL
+            default: '$GS_BASE{gs-pathname}'
+            description: "Directory where the build artifact will be located upon the completion of the build."
+
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
+
+    triggers:
+        - gerrit:
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'REG_EXP'
+                project-pattern: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
+                file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**'
+
+    builders:
+        - clone-opnfv-repos
+        - build-html-and-pdf-docs-output
+#        - upload-generated-docs-to-opnfv-artifacts
+        - report-docs-build-result-to-gerrit
+        - remove-old-docs-from-opnfv-artifacts
+
+- job-template:
+    name: 'opnfvdocs-daily-{stream}'
+
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - string:
+            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: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
+        - string:
+            name: GERRIT_BRANCH
+            default: '{branch}'
+            description: 'Specify the branch in this way in order to be able to use clone-opnfv-repos builder.'
+
+    scm:
+        - git-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: ''
+            branch: '{branch}'
+
+    triggers:
+        - timed: '0 H/6 * * *'
+
+    builders:
+        - clone-opnfv-repos
+        - build-html-and-pdf-docs-output
+#        - upload-generated-docs-to-opnfv-artifacts
+
+- builder:
+    name: clone-opnfv-repos
+    builders:
+        - shell: |
+            #!/bin/bash
+            set -o errexit
+            set -o nounset
+            set -o pipefail
+
+            # clone releng repo to get repo list
+            cd $WORKSPACE
+            echo "Cloning releng repo"
+            git clone $GIT_CLONE_BASE/releng --branch master --depth 1 --quiet
+
+            # clone rest of the repos and checkout the branch
+            echo "Cloning repos of participating OPNFV Projects and checking out $GERRIT_BRANCH"
+            echo
+            echo "--------------------------------------------------------"
+            for repo in $(grep -v '^#' $WORKSPACE/releng/jjb/opnfvdocs/project.cfg | sort); do
+                cd $WORKSPACE
+                echo "    $repo"
+                git clone $GIT_CLONE_BASE/$repo --branch $GERRIT_BRANCH --depth 1 --quiet
+            done
+            echo "--------------------------------------------------------"
+            echo
+            echo "Done"
+
+            # remove releng clone in order not to cause issues for rest of the builders
+            /bin/rm -rf $WORKSPACE/releng
diff --git a/jjb/opnfvdocs/project.cfg b/jjb/opnfvdocs/project.cfg
new file mode 100644 (file)
index 0000000..5331346
--- /dev/null
@@ -0,0 +1,37 @@
+apex
+armband
+availability
+bottlenecks
+compass4nfv
+copper
+doctor
+dpacc
+escalator
+fastpathmetrics
+fuel
+functest
+genesisreq
+ipv6
+joid
+kvmfornfv
+lsoapi
+moon
+movie
+multisite
+octopus
+onosfw
+ovno
+ovsnfv
+parser
+pharos
+policytest
+prediction
+promise
+qtip
+rs
+sdnvpn
+sfc
+storperf
+vnf_forwarding_graph
+vswitchperf
+yardstick
index a15a3c6..2b927d2 100644 (file)
@@ -5,9 +5,9 @@
 
     logrotate:
         daysToKeep: 30
-        numToKeep: 40
+        numToKeep: 100
         artifactDaysToKeep: 30
-        artifactNumToKeep: 40
+        artifactNumToKeep: 100
 
     ssh-credentials: 'd42411ac011ad6f3dd2e1fa34eaa5d87f910eb2e'
     wrappers:
index 8d6f551..9d6a542 100644 (file)
                 sed -e "s|^$local_path|    http://$gs_path|" >> gerrit_comment.txt
 
 - builder:
-    name: upload-merged-docs-to-opnfv-artifacts
+    name: upload-generated-docs-to-opnfv-artifacts
     builders:
         - shell: |
             #!/bin/bash -e
             [[ -d output ]]
 
             echo
-            echo "#####################"
-            echo "UPLOADING MERGED DOCS"
-            echo "#####################"
+            echo "########################"
+            echo "UPLOADING GENERATED DOCS"
+            echo "########################"
             echo
 
-            if [[ "$GERRIT_BRANCH" == "master" ]] ; then
-                gs_base="artifacts.opnfv.org/$GERRIT_PROJECT"
-            else
-                gs_base="artifacts.opnfv.org/$GERRIT_PROJECT/$GERRIT_BRANCH"
-            fi
-            gs_path="$gs_base/docs"
+            gs_path="$GS_URL/docs"
             local_path="upload/docs"
 
             mkdir -p upload
             mv output "$local_path"
-            gsutil -m cp -r "$local_path" "gs://$gs_base"
+            gsutil -m cp -r "$local_path" "gs://$GS_URL"
 
             if gsutil ls "gs://$gs_path" | grep -e 'html$' > /dev/null 2>&1 ; then
                 gsutil -m setmeta \
     name: upload-merged-docs
     builders:
         - build-html-and-pdf-docs-output
-        - upload-merged-docs-to-opnfv-artifacts
+        - upload-generated-docs-to-opnfv-artifacts
         - report-docs-build-result-to-gerrit
         - remove-old-docs-from-opnfv-artifacts
index 3344e18..16b7d9e 100644 (file)
             make
             # run basic sanity test
             make sanity
-            scl enable python33 bash
-            source ~/vsperfenv/bin/activate
             cd ../ci
-            ./build-vsperf.sh daily
+            scl enable python33 "source ~/vsperfenv/bin/activate ; ./build-vsperf.sh daily"
 
 - job-template:
     name: 'vswitchperf-verify-{stream}'