merge GIT_BRANCH and GERRIT_BRANCH into BRANCH
[releng.git] / jjb / opnfvdocs / opnfvdocs.yml
index 327747f..1295033 100644 (file)
+########################
+# Job configuration for opnfvdocs
+########################
 - project:
-    name: opnfvdocs
-    jobs:
-        - 'opnfvdocs-test'
-        - 'opnfvdocs-daily-master'
-        - 'opnfvdocs-merge'
-        - 'opnfvdocs-verify'
-        - 'opnfvdocs-build-docs'
-
-    # stream:    branch with - in place of / (eg. stable-helium)
-    # branch:    branch (eg. stable/helium)
-    stream:
-        - master:
-            branch: 'master'
 
-    project: 'opnfvdocs'
-    somevar: 'foo'
-
-- job-template:
-    name: opnfvdocs-test
+    name: opnfvdocs
 
-    project-type: freestyle
+    project: '{name}'
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
+    jobs:
+        - 'opnfvdocs-verify-{stream}'
+        - 'opnfvdocs-merge-{stream}'
+        - 'opnfvdocs-daily-{stream}'
 
-    builders:
-        - shell: |
-            echo "Hello world from opnfvdocs"
+    stream:
+        - master:
+            branch: '{stream}'
+            gs-pathname: ''
+            disabled: false
+        - danube:
+            branch: 'stable/{stream}'
+            gs-pathname: '/{stream}'
+            disabled: true
+
+########################
+# job templates
+########################
 
 - job-template:
-    name: 'opnfvdocs-daily-master'
-
-    # Job template for daily builders
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-
-    project-type: freestyle
-    varsetabove: '{somevar}'
+    name: 'opnfvdocs-verify-{stream}'
 
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-artifact-num-to-keep}'
+    disabled: '{obj:disabled}'
 
     parameters:
         - project-parameter:
-            project: '{project}'
-
-    scm:
-        - git-scm:
-            credentials-id: '{ssh-credentials}'
-            refspec: ''
+            project: $GERRIT_PROJECT
             branch: '{branch}'
+        - string:
+            name: GIT_CLONE_BASE
+            default: ssh://gerrit.opnfv.org:29418
+            description: "Used for overriding the GIT URL coming from parameters macro."
 
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
-
-    triggers:
-        - timed: 'H H * * *'
-
-    prebuilders:
-        - test-macro
-
-    builders:
-        - shell: |
-            pwd
-            find .
-            echo "Hello world from opnfvdocs {somevar} daily"
-
-    postbuilders:
-        - test-macro
-
-- job-template:
-    name: 'opnfvdocs-verify'
-
-    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}'
+        - git-scm-gerrit
 
     triggers:
         - gerrit:
+            server-name: 'gerrit.opnfv.org'
             trigger-on:
                 - patchset-created-event:
                     exclude-drafts: 'false'
                 - comment-added-contains-event:
                     comment-contains-value: 'reverify'
             projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'opnfvdocs'
+              - project-compare-type: 'REG_EXP'
+                project-pattern: '{project}'
                 branches:
                   - branch-compare-type: 'ANT'
-                    branch-pattern: '**/master'
+                    branch-pattern: '**/{branch}'
 
     builders:
-        - shell: |
-            pwd
-            find .
-            echo "verify logic goes here"
+        - check-bash-syntax
 
 - job-template:
-    name: 'opnfvdocs-merge'
-
-    # builder-merge job to run JJB update
-    #
-    # This job's purpose is to update all the JJB
+    name: 'opnfvdocs-merge-{stream}'
 
-    project-type: freestyle
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
+    disabled: '{obj:disabled}'
 
     parameters:
         - project-parameter:
-            project: '{project}'
-        - gerrit-parameter:
-            branch: 'master'
+            project: $GERRIT_PROJECT
+            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: ''
-            choosing-strategy: 'default'
-
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+        - git-scm
 
     triggers:
         - gerrit:
+            server-name: 'gerrit.opnfv.org'
             trigger-on:
                 - change-merged-event
                 - comment-added-contains-event:
                     comment-contains-value: 'remerge'
             projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'opnfvdocs'
+              - project-compare-type: 'REG_EXP'
+                project-pattern: '{project}'
                 branches:
-                    - branch-compare-type: 'ANT'
-                      branch-pattern: '**/master'
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{branch}'
 
     builders:
-        - shell: |
-            pwd
-            find .
-            echo "merge logic goes here"
-
-
+        - check-bash-syntax
 
 - job-template:
-    name: 'opnfvdocs-build-docs'
-
-    project-type: freestyle
+    name: 'opnfvdocs-daily-{stream}'
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
+    disabled: true
 
     parameters:
         - project-parameter:
             project: '{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."
+        - 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: ''
-            choosing-strategy: 'default'
-
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+        - git-scm
 
     triggers:
-        - gerrit:
-            trigger-on:
-                - change-merged-event
-                - comment-added-contains-event:
-                    comment-contains-value: 'remerge'
-            projects:
-              - project-compare-type: 'ANT'
-                project-pattern: 'opnfvdocs'
-                branches:
-                    - branch-compare-type: 'ANT'
-                      branch-pattern: '**/master'
+        - timed: '0 H/6 * * *'
 
     builders:
-        - shell: |
-            !include-raw build-docu.sh
-
+        - build-html-and-pdf-docs-output
+#        - upload-generated-docs-to-opnfv-artifacts