Cleanup jjb files
[releng.git] / jjb / octopus / octopus.yml
index 125ba5a..d61fa10 100644 (file)
@@ -1,66 +1,68 @@
+################################
+# job configuration for Octopus
+################################
 - project:
     name: octopus
+
+    project: '{name}'
+
     jobs:
-        - 'octopus-test'
-        - 'octopus-daily-master'
+        - 'octopus-verify-{stream}'
 
-    # stream:    branch with - in place of / (eg. stable-helium)
-    # branch:    branch (eg. stable/helium)
+# only master branch is enabled at the moment to keep no of jobs sane
     stream:
         - master:
             branch: 'master'
+            gs-pathname: ''
+#        - stable-brahmaputra:
+#            branch: 'stable/brahmaputra'
+#            gs-pathname: '/brahmaputra'
 
-    project: 'octopus'
-    somevar: 'foo'
-
-- job-template:
-    name: octopus-test
-
-    project-type: freestyle
-
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: -1
+- job_defaults: &octopus_job_defaults
+    name: octopus_job_defaults
 
-    builders:
-        - shell: |
-            echo "Hello world from octopus"
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{stream}'
 
 - job-template:
-    name: 'octopus-daily-master'
-
-    # Job template for daily builders
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
+    name: 'octopus-verify-{stream}'
 
-    project-type: freestyle
-    varsetabove: '{somevar}'
+    <<: *octopus_job_defaults
 
-    logrotate:
-        daysToKeep: '{build-days-to-keep}'
-        numToKeep: '{build-num-to-keep}'
-        artifactDaysToKeep: '{build-artifact-days-to-keep}'
-        artifactNumToKeep: '{build-artifact-num-to-keep}'
+    parameters:
+        - 'opnfv-build-defaults'
 
-    wrappers:
-        - ssh-agent-credentials:
-            user: '{ssh-credentials}'
+    scm:
+        - gerrit-trigger-scm:
+            credentials-id: '{ssh-credentials}'
+            refspec: '$GERRIT_REFSPEC'
+            choosing-strategy: 'gerrit'
 
     triggers:
-        - timed: 'H H * * *'
-
-    prebuilders:
-        - test-macro
+        - 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: '{project}'
+                branches:
+                  - branch-compare-type: 'ANT'
+                    branch-pattern: '**/{stream}'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'docs/**|.gitignore'
 
     builders:
         - shell: |
-            echo "Hello world from octopus {somevar} daily"
-        - test-macro
-
-    postbuilders:
-        - test-macro
-
+            echo "Nothing to verify!"