Remove references to zuul and nodepool
[ci-management.git] / jjb / ci-management / ci-management-jobs.yaml
index 24fa255..acd8ae8 100644 (file)
@@ -3,6 +3,15 @@
     jobs:
         - 'ci-management-verify-jjb'
         - 'ci-management-merge-jjb'
+        - 'ci-management-verify-packer'
+        - 'ci-management-merge-packer-{platforms}-{templates}'
+
+    platforms:
+        - centos
+        - ubuntu-16.04
+
+    templates:
+        - basebuild
 
     project: ci-management
     branch: master
             maven-version: 'mvn33-new'
 
 - job-template:
-    name: ci-management-verify-zuul
-
+    name: 'ci-management-verify-packer'
     project-type: freestyle
-    node: jjb
+    node: ubuntu1604-basebuild-4c-4g
     concurrent: true
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
-
-    scm:
-        - zuul-trigger-scm:
-            credentials-id: 'jenkins-gerrit-credentials'
-            refspec: '$ZUUL_REF'
-            commit: '$ZUUL_COMMIT'
-
-    wrappers:
-        - fdio-infra-wrappers:
-            build-timeout: '{build-timeout}'
-
-    builders:
-        - shell:
-            !include-raw-escape: include-raw-test-zuul.sh
-
-- job-template:
-    name: ci-management-merge-zuul
-
-    project-type: freestyle
-    node: jjb
+    properties:
+        - fdio-infra-properties:
+            build-days-to-keep: '{build-days-to-keep}'
+            build-num-to-keep: '{build-num-to-keep}'
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - gerrit-refspec-parameter:
+            refspec: 'refs/heads/{branch}'
 
     scm:
-        - zuul-trigger-scm:
+        - gerrit-trigger-scm:
             credentials-id: 'jenkins-gerrit-credentials'
-            refspec: ''
-            commit: 'origin/$ZUUL_BRANCH'
+            refspec: '$GERRIT_REFSPEC'
+            branches:
+                - '$GERRIT_BRANCH'
+            choosing-strategy: 'gerrit'
 
     wrappers:
         - fdio-infra-wrappers:
             build-timeout: '{build-timeout}'
+        - ssh-agent-credentials:
+            users:
+                - 'jenkins-gerrit-credentials'
+
+    triggers:
+        - timed: 'H H 1 * *'
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - patchset-created-event:
+                    exclude-drafts: 'true'
+                    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: 'ci-management'
+                  branches:
+                    - branch-compare-type: 'ANT'
+                      branch-pattern: '**/master'
+                  file-paths:
+                    - compare-type: ANT
+                      pattern: packer/**
 
     builders:
-        - shell:
-            !include-raw-escape: include-raw-test-zuul.sh
-        - shell:
-            !include-raw-escape: include-raw-merge-zuul.sh
+        - packer-validate:
 
-- job-template:
-    name: ci-management-verify-nodepool
+    publishers:
+        - archive:
+            artifacts: 'packer/*.log'
+            allow-empty: 'true'
+            only-if-success: 'true'
+        - fdio-infra-shiplogs:
+            maven-version: 'mvn33-new'
 
+- job-template:
+    name: 'ci-management-merge-packer-{platforms}-{templates}'
     project-type: freestyle
-    node: np
+    node: ubuntu1604-basebuild-4c-4g
     concurrent: true
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 10
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
-
-    scm:
-        - zuul-trigger-scm:
-            credentials-id: 'jenkins-gerrit-credentials'
-            refspec: '$ZUUL_REF'
-            commit: '$ZUUL_COMMIT'
-
-    wrappers:
-        - fdio-infra-wrappers:
-            build-timeout: '{build-timeout}'
-
-    builders:
-        - shell:
-            !include-raw-escape: include-raw-test-nodepool.sh
-
-- job-template:
-    name: ci-management-merge-nodepool
-
-    project-type: freestyle
-    node: np
+    properties:
+        - fdio-infra-properties:
+            build-days-to-keep: '{build-days-to-keep}'
+            build-num-to-keep: '{build-num-to-keep}'
 
-    logrotate:
-        daysToKeep: 30
-        numToKeep: 40
-        artifactDaysToKeep: -1
-        artifactNumToKeep: 5
+    parameters:
+        - project-parameter:
+            project: '{project}'
+        - gerrit-parameter:
+            branch: '{branch}'
+        - gerrit-refspec-parameter:
+            refspec: 'refs/heads/{branch}'
 
     scm:
-        - zuul-trigger-scm:
+        - gerrit-trigger-scm:
             credentials-id: 'jenkins-gerrit-credentials'
-            refspec: ''
-            commit: 'origin/$ZUUL_BRANCH'
+            refspec: '$GERRIT_REFSPEC'
+            branches:
+                - '$GERRIT_BRANCH'
+            choosing-strategy: 'default'
 
     wrappers:
         - fdio-infra-wrappers:
             build-timeout: '{build-timeout}'
+        - ssh-agent-credentials:
+            users:
+                - 'jenkins-gerrit-credentials'
+
+    triggers:
+        - timed: 'H H 1 * *'
+        - gerrit:
+            server-name: 'Primary'
+            trigger-on:
+                - change-merged-event
+                - comment-added-contains-event:
+                    comment-contains-value: 'remerge'
+            projects:
+              - project-compare-type: 'ANT'
+                project-pattern: 'ci-management'
+                branches:
+                    - branch-compare-type: 'ANT'
+                      branch-pattern: '**/master'
+                file-paths:
+                    - compare-type: ANT
+                      pattern: 'packer/vars/{platforms}.json'
+                    - compare-type: ANT
+                      pattern: 'packer/templates/{templates}.json'
+                    - compare-type: ANT
+                      pattern: 'packer/provision/{templates}.sh'
+                    - compare-type: ANT
+                      pattern: 'packer/provision/system_reseal.sh'
+                    - compare-type: ANT
+                      pattern: 'packer/provision/rh-user_data.sh'
+                    - compare-type: ANT
+                      pattern: 'packer/provision/baseline.sh'
 
     builders:
-        - shell:
-            !include-raw-escape: include-raw-test-nodepool.sh
-        - shell:
-            !include-raw-escape: include-raw-merge-nodepool.sh
+        - packer-validate:
+        - packer-build:
+            platform: '{platforms}'
+            template: '{templates}'
+
+    publishers:
+        - archive:
+            artifacts: 'packer/*.log'
+            allow-empty: 'true'
+            only-if-success: 'true'
+        - fdio-infra-shiplogs:
+            maven-version: 'mvn33-new'