Merge "fuel-deploy.sh: mv lab-config repo to TMPDIR"
[releng.git] / jjb / apex / apex.yml.j2
index 0d446dc..a8fc70f 100644 (file)
@@ -6,17 +6,17 @@
         - 'apex-verify-gate-{stream}'
         - 'apex-verify-unit-tests-{stream}'
         - 'apex-runner-cperf-{stream}'
-        - 'apex-build-{stream}'
+        - 'apex-virtual-{stream}'
         - 'apex-deploy-{platform}-{stream}'
-        - 'apex-daily-master'
-        - 'apex-daily-danube'
+        - 'apex-daily-{stream}'
         - 'apex-csit-promote-daily-{stream}'
         - 'apex-fdio-promote-daily-{stream}'
-        - 'apex-verify-iso-{stream}'
         - 'apex-{scenario}-baremetal-{scenario_stream}'
         - 'apex-testsuite-{scenario}-baremetal-{scenario_stream}'
         - 'apex-upload-snapshot'
         - 'apex-create-snapshot'
+        - 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
+        - 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
     # stream:    branch with - in place of / (eg. stable-arno)
     # branch:    branch (eg. stable/arno)
     stream:
             virtual-slave: 'apex-virtual-master'
             baremetal-slave: 'apex-baremetal-master'
             verify-scenario: 'os-odl-nofeature-ha'
-            concurrent-builds: 3
             scenario_stream: 'master'
-
+        - euphrates: &euphrates
+            branch: 'stable/euphrates'
+            gs-pathname: '/euphrates'
+            build-slave: 'apex-build-master'
+            virtual-slave: 'apex-virtual-master'
+            baremetal-slave: 'apex-baremetal-master'
+            verify-scenario: 'os-odl-nofeature-ha'
+            scenario_stream: 'euphrates'
         - danube: &danube
             branch: 'stable/danube'
             gs-pathname: '/danube'
@@ -37,7 +43,6 @@
             virtual-slave: 'apex-virtual-danube'
             baremetal-slave: 'apex-baremetal-danube'
             verify-scenario: 'os-odl_l3-nofeature-ha'
-            concurrent-builds: 1
             scenario_stream: 'danube'
             disabled: true
 
                 branches:
                   - branch-compare-type: 'ANT'
                     branch-pattern: '**/{branch}'
+                disable-strict-forbidden-file-verification: 'false'
                 file-paths:
                   - compare-type: ANT
                     pattern: 'apex/tests/**'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: '*'
+                  - compare-type: ANT
+                    pattern: 'apex/*'
+                  - compare-type: ANT
+                    pattern: 'build/**'
+                  - compare-type: ANT
+                    pattern: 'lib/**'
+                  - compare-type: ANT
+                    pattern: 'config/**'
+                  - compare-type: ANT
+                    pattern: 'apex/build/**'
+                  - compare-type: ANT
+                    pattern: 'apex/common/**'
+                  - compare-type: ANT
+                    pattern: 'apex/inventory/**'
+                  - compare-type: ANT
+                    pattern: 'apex/network/**'
+                  - compare-type: ANT
+                    pattern: 'apex/overcloud/**'
+                  - compare-type: ANT
+                    pattern: 'apex/settings/**'
+                  - compare-type: ANT
+                    pattern: 'apex/undercloud/**'
+                  - compare-type: ANT
+                    pattern: 'apex/virtual/**'
     properties:
         - logrotate-default
         - throttle:
                 branches:
                   - branch-compare-type: 'ANT'
                     branch-pattern: '**/{branch}'
+                disable-strict-forbidden-file-verification: 'true'
                 file-paths:
                   - compare-type: ANT
-                    pattern: 'ci/**'
+                    pattern: '*'
+                  - compare-type: ANT
+                    pattern: 'apex/*'
                   - compare-type: ANT
                     pattern: 'build/**'
                   - compare-type: ANT
                   - compare-type: ANT
                     pattern: 'config/**'
                   - compare-type: ANT
-                    pattern: 'apex/**'
+                    pattern: 'apex/build/**'
+                  - compare-type: ANT
+                    pattern: 'apex/common/**'
+                  - compare-type: ANT
+                    pattern: 'apex/inventory/**'
+                  - compare-type: ANT
+                    pattern: 'apex/network/**'
+                  - compare-type: ANT
+                    pattern: 'apex/overcloud/**'
+                  - compare-type: ANT
+                    pattern: 'apex/settings/**'
+                  - compare-type: ANT
+                    pattern: 'apex/undercloud/**'
+                  - compare-type: ANT
+                    pattern: 'apex/virtual/**'
+                forbidden-file-paths:
+                  - compare-type: ANT
+                    pattern: 'apex/tests/**'
+                  - compare-type: ANT
+                    pattern: 'docs/**'
 
     properties:
         - logrotate-default
-        - build-blocker:
-            use-build-blocker: true
-            block-level: 'NODE'
-            blocking-jobs:
-                - 'apex-verify.*'
         - throttle:
-            max-per-node: 1
+            max-per-node: 3
             max-total: 10
             option: 'project'
 
             name: deploy-virtual
             condition: SUCCESSFUL
             projects:
-                - name: 'apex-deploy-virtual-{stream}'
+                - name: 'apex-virtual-{stream}'
                   current-parameters: false
                   predefined-parameters: |
                     ARTIFACT_VERSION=$ARTIFACT_VERSION
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-        - multijob:
-            name: functest-smoke
-            condition: SUCCESSFUL
-            projects:
-              - name: 'functest-apex-virtual-suite-{stream}'
-                current-parameters: false
-                predefined-parameters: |
-                  DEPLOY_SCENARIO={verify-scenario}
-                  FUNCTEST_SUITE_NAME=healthcheck
-                  GERRIT_BRANCH=$GERRIT_BRANCH
-                  GERRIT_REFSPEC=$GERRIT_REFSPEC
-                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
-                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
-                node-parameters: true
-                kill-phase-on: NEVER
-                abort-all-job: true
-                git-revision: false
 
 # Verify Scenario Gate
 - job-template:
             block-level: 'NODE'
             blocking-jobs:
                 - 'apex-verify.*'
+                - 'apex-virtual.*'
         - throttle:
             max-per-node: 1
             max-total: 10
                   abort-all-job: false
                   git-revision: false
 
-# Build phase
+# Deploy job
 - job-template:
-    name: 'apex-build-{stream}'
-
-    # Job template for builds
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: '{build-slave}'
+    name: 'apex-deploy-{platform}-{stream}'
 
-    disabled: false
+    node: 'apex-{platform}-{stream}'
 
     concurrent: true
 
-    parameters:
-        - '{project}-defaults'
-        - project-parameter:
-            project: '{project}'
-            branch: '{branch}'
-        - apex-parameter:
-            gs-pathname: '{gs-pathname}'
-
+    disabled: false
+    quiet-period: 30
     scm:
         - git-scm-gerrit
 
     wrappers:
         - timeout:
-            timeout: 150
+            timeout: 140
             fail: true
 
-    properties:
-        - logrotate-default
-        - throttle:
-            max-per-node: {concurrent-builds}
-            max-total: 10
-            option: 'project'
-        - build-blocker:
-            use-build-blocker: true
-            block-level: 'NODE'
-            blocking-jobs:
-                - 'apex-verify-iso-{stream}'
-
-    builders:
-        - 'apex-build'
-        - inject:
-           properties-content: ARTIFACT_TYPE=rpm
-        - 'apex-upload-artifact'
-
-# ISO verify job
-- job-template:
-    name: 'apex-verify-iso-{stream}'
-
-    # Job template for builds
-    #
-    # Required Variables:
-    #     stream:    branch with - in place of / (eg. stable)
-    #     branch:    branch (eg. stable)
-    node: '{virtual-slave}'
-
-    disabled: false
-
-    concurrent: true
-
     parameters:
+        - '{project}-{platform}-{stream}-defaults'
         - project-parameter:
             project: '{project}'
             branch: '{branch}'
         - apex-parameter:
             gs-pathname: '{gs-pathname}'
         - string:
-            name: GIT_BASE
-            default: https://gerrit.opnfv.org/gerrit/$PROJECT
-            description: "Used for overriding the GIT URL coming from parameters macro."
-
-    scm:
-        - git-scm
+            name: DEPLOY_SCENARIO
+            default: '{verify-scenario}'
+            description: "Scenario to deploy with."
+        - string:
+            name: OPNFV_CLEAN
+            default: 'no'
+            description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
 
     properties:
         - logrotate-default
+        - build-blocker:
+            use-build-blocker: true
+            block-level: 'NODE'
+            blocking-jobs:
+                - 'apex-deploy.*'
+                - 'functest.*'
+                - 'yardstick.*'
+                - 'dovetail.*'
+                - 'storperf.*'
         - throttle:
             max-per-node: 1
             max-total: 10
             option: 'project'
 
     builders:
-        - 'apex-iso-verify'
-        - inject:
-           properties-content: ARTIFACT_TYPE=iso
-        - 'apex-upload-artifact'
+        - description-setter:
+            description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+        - 'apex-download-artifact'
+        - 'apex-deploy'
+        - 'clean-workspace'
 
-# Deploy job
-- job-template:
-    name: 'apex-deploy-{platform}-{stream}'
 
-    node: 'apex-{platform}-{stream}'
+# Virtual Deploy and Test
+- job-template:
+    name: 'apex-virtual-{stream}'
 
-    concurrent: true
+    project-type: 'multijob'
 
     disabled: false
-    quiet-period: 30
+
     scm:
         - git-scm-gerrit
 
-    wrappers:
-        - timeout:
-            timeout: 140
-            fail: true
-
     parameters:
-        - '{project}-{platform}-{stream}-defaults'
+        - '{project}-defaults'
+        - '{project}-virtual-{stream}-defaults'
         - project-parameter:
             project: '{project}'
             branch: '{branch}'
             default: '{verify-scenario}'
             description: "Scenario to deploy with."
         - string:
-            name: OPNFV_CLEAN
-            default: 'no'
-            description: "Use yes in lower case to invoke clean. Indicates if the deploy environment should be cleaned before deployment"
-
+            name: ARTIFACT_VERSION
+            default: dev
+            description: "Used for overriding the ARTIFACT_VERSION"
     properties:
         - logrotate-default
         - build-blocker:
             use-build-blocker: true
             block-level: 'NODE'
             blocking-jobs:
-                - 'apex-deploy.*'
-                - 'functest.*'
-                - 'yardstick.*'
-                - 'dovetail.*'
-                - 'storperf.*'
+                - 'apex-runner.*'
+                - 'apex-.*-promote.*'
+                - 'apex-run.*'
+                - 'apex-virtual-.*'
+                - 'apex-verify-gate-.*'
         - throttle:
             max-per-node: 1
             max-total: 10
             option: 'project'
-
     builders:
         - description-setter:
             description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
-        - 'apex-download-artifact'
-        - 'apex-deploy'
-        - 'apex-workspace-cleanup'
-
+        - multijob:
+            name: deploy-virtual
+            condition: SUCCESSFUL
+            projects:
+                - name: 'apex-deploy-virtual-{stream}'
+                  current-parameters: false
+                  predefined-parameters: |
+                    ARTIFACT_VERSION=$ARTIFACT_VERSION
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                    OPNFV_CLEAN=yes
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=$GERRIT_REFSPEC
+                    GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                    GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                  node-parameters: true
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+                  git-revision: true
+        - multijob:
+            name: functest-smoke
+            condition: SUCCESSFUL
+            projects:
+              - name: 'functest-apex-virtual-suite-{stream}'
+                current-parameters: false
+                predefined-parameters: |
+                  DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  FUNCTEST_SUITE_NAME=healthcheck
+                  GERRIT_BRANCH=$GERRIT_BRANCH
+                  GERRIT_REFSPEC=$GERRIT_REFSPEC
+                  GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
+                  GERRIT_CHANGE_COMMIT_MESSAGE=$GERRIT_CHANGE_COMMIT_MESSAGE
+                node-parameters: true
+                kill-phase-on: NEVER
+                abort-all-job: true
+                git-revision: false
 
 # Baremetal Deploy and Test
 - job-template:
 #            steps:
 #                - shell: 'echo "Tests Passed"'
 
-{% for stream in scenarios %}
-# {{ stream }} Daily
 - job-template:
-    name: 'apex-daily-{{ stream }}'
+    name: 'apex-daily-{stream}'
 
     # Job template for daily build
     #
     #     branch:    branch (eg. stable)
     project-type: 'multijob'
 
-    node: '{{ build_slave[stream] }}'
+    node: '{baremetal-slave}'
 
     disabled: false
 
 
     parameters:
         - '{project}-defaults'
-        - '{project}-baremetal-{{ stream }}-defaults'
+        - '{project}-baremetal-{stream}-defaults'
         - project-parameter:
             project: '{project}'
-            branch: '{{ branch[stream] }}'
+            branch: '{branch}'
         - apex-parameter:
-            gs-pathname: '{{ gspathname[stream] }}'
+            gs-pathname: '{gs-pathname}'
 
     properties:
         - logrotate-default
 
     triggers:
-        - 'apex-{{ stream }}'
+        - 'apex-{stream}'
 
     builders:
         - multijob:
             name: build
             condition: SUCCESSFUL
             projects:
-                - name: 'apex-build-{{ stream }}'
+                - name: 'apex-build-{stream}'
                   current-parameters: false
                   predefined-parameters: |
                     GERRIT_BRANCH=$GERRIT_BRANCH
             name: 'Verify and upload ISO'
             condition: SUCCESSFUL
             projects:
-                - name: 'apex-verify-iso-{{ stream }}'
+                - name: 'apex-verify-iso-{stream}'
                   current-parameters: false
                   predefined-parameters: |
-                    BUILD_DIRECTORY=$WORKSPACE/../apex-build-{{ stream }}/.build
+                    BUILD_DIRECTORY=$WORKSPACE/../apex-build-{stream}/.build
                     GERRIT_BRANCH=$GERRIT_BRANCH
                     GERRIT_REFSPEC=
                     GERRIT_CHANGE_NUMBER=$GERRIT_CHANGE_NUMBER
                   kill-phase-on: FAILURE
                   abort-all-job: true
                   git-revision: true
-        - multijob:
-            name: Baremetal Deploy and Test Phase
-            condition: SUCCESSFUL
-            projects:
-{% for scenario in scenarios[stream] %}
-                - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
-                  node-parameters: false
-                  current-parameters: false
-                  predefined-parameters: |
-                    OPNFV_CLEAN=yes
-                  kill-phase-on: NEVER
-                  abort-all-job: true
-                  git-revision: false
-{% endfor %}
-{% endfor %}
+        - apex-builder-{stream}
 
 # snapshot create
 - job-template:
                 abort-all-job: true
                 git-revision: false
 
+# Flex job
+- job-template:
+    name: 'apex-flex-daily-os-nosdn-nofeature-ha-{stream}'
+
+    project-type: 'multijob'
+
+    disabled: false
+
+    node: 'flex-pod2'
+
+    scm:
+        - git-scm
+    triggers:
+        - 'apex-{stream}'
+    parameters:
+        - '{project}-defaults'
+        - project-parameter:
+            project: '{project}'
+            branch: '{branch}'
+        - apex-parameter:
+            gs-pathname: '{gs-pathname}'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'os-nosdn-nofeature-ha'
+            description: "Scenario to deploy with."
+        - string:
+            name: GIT_BASE
+            default: https://gerrit.opnfv.org/gerrit/$PROJECT
+            description: 'Git URL to use on this Jenkins Slave'
+        - string:
+            name: SSH_KEY
+            default: /root/.ssh/id_rsa
+            description: 'SSH key to use for Apex'
+    properties:
+        - logrotate-default
+        - build-blocker:
+            use-build-blocker: true
+            block-level: 'NODE'
+            blocking-jobs:
+                - 'apex-verify.*'
+                - 'apex-runner.*'
+                - 'apex-.*-promote.*'
+                - 'apex-run.*'
+                - 'apex-.+-baremetal-.+'
+        - throttle:
+            max-per-node: 1
+            max-total: 10
+            option: 'project'
+    builders:
+        - description-setter:
+            description: "Deployed on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+        - multijob:
+            name: 'Baremetal Deploy'
+            condition: SUCCESSFUL
+            projects:
+                - name: 'apex-deploy-baremetal-{stream}'
+                  node-parameters: true
+                  current-parameters: true
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+                  git-revision: false
+        - multijob:
+            name: Yardstick
+            condition: ALWAYS
+            projects:
+                - name: 'yardstick-apex-baremetal-daily-{stream}'
+                  node-parameters: true
+                  current-parameters: false
+                  predefined-parameters:
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: NEVER
+                  abort-all-job: false
+                  git-revision: false
+
+# Dovetail Danube test job
+- job-template:
+    name: 'apex-dovetail-daily-os-nosdn-nofeature-ha-baremetal-danube'
+
+    project-type: 'multijob'
+
+    node: 'huawei-pod4'
+
+    disabled: false
+
+    parameters:
+        - '{project}-defaults'
+        - project-parameter:
+            project: '{project}'
+            branch: 'stable/danube'
+        - apex-parameter:
+            gs-pathname: '/danube'
+        - string:
+            name: DEPLOY_SCENARIO
+            default: 'os-nosdn-nofeature-ha'
+            description: "Scenario to deploy with."
+
+    properties:
+        - logrotate-default
+        - build-blocker:
+            use-build-blocker: true
+            block-level: 'NODE'
+            blocking-jobs:
+                - 'apex-verify.*'
+                - 'apex-runner.*'
+                - 'apex-.*-promote.*'
+                - 'apex-run.*'
+
+    triggers:
+        - timed: '0 12 * * *'
+
+    builders:
+        - description-setter:
+            description: "Testing on $NODE_NAME - Scenario: $DEPLOY_SCENARIO"
+        - multijob:
+            name: 'Baremetal Deploy'
+            condition: SUCCESSFUL
+            projects:
+                - name: 'apex-deploy-baremetal-danube'
+                  node-parameters: true
+                  current-parameters: true
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                    GERRIT_BRANCH=$GERRIT_BRANCH
+                    GERRIT_REFSPEC=
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: FAILURE
+                  abort-all-job: true
+                  git-revision: false
+        - multijob:
+            name: Dovetail
+            condition: ALWAYS
+            projects:
+                - name: 'dovetail-apex-baremetal-proposed_tests-danube'
+                  node-parameters: true
+                  current-parameters: false
+                  predefined-parameters:
+                    DEPLOY_SCENARIO=$DEPLOY_SCENARIO
+                  kill-phase-on: NEVER
+                  abort-all-job: false
+                  git-revision: false
+
 ########################
 # parameter macros
 ########################
 ########################
 # builder macros
 ########################
+{% for stream in scenarios %}
+# {{ stream }} Builder
 - builder:
-    name: 'apex-unit-test'
-    builders:
-        - shell:
-            !include-raw: ./apex-unit-test.sh
-
-- builder:
-    name: 'apex-build'
-    builders:
-        - shell:
-            !include-raw: ./apex-build.sh
-
-- builder:
-    name: 'apex-workspace-cleanup'
-    builders:
-        - shell:
-            !include-raw: ./apex-workspace-cleanup.sh
+      name: apex-builder-{{ stream }}
+      builders:
+        - multijob:
+            name: Baremetal Deploy and Test Phase
+            condition: SUCCESSFUL
+            projects:
+{% for scenario in scenarios[stream] %}
+                - name: 'apex-{{ scenario }}-baremetal-{{ stream }}'
+                  node-parameters: false
+                  current-parameters: false
+                  predefined-parameters: |
+                    OPNFV_CLEAN=yes
+                  kill-phase-on: NEVER
+                  abort-all-job: true
+                  git-revision: false
+{% endfor %}
+{% endfor %}
 
 - builder:
-    name: 'apex-iso-verify'
+    name: 'apex-unit-test'
     builders:
         - shell:
-            !include-raw: ./apex-iso-verify.sh
-
+            !include-raw: ./apex-unit-test.sh
 
 - builder:
     name: 'apex-upload-artifact'
 ########################
 - trigger:
     name: 'apex-master'
+    triggers:
+        - timed: '0 3 1 1 7'
+- trigger:
+    name: 'apex-euphrates'
     triggers:
         - timed: '0 12 * * *'
 - trigger: