Fix build-blocker level param typos
[ci-management.git] / jjb / iec / iec.yaml
index dc47acf..335ac1e 100644 (file)
@@ -6,7 +6,7 @@
     views:
       - common-view:
           view-name: iec
-          view-regex: '^{project-name}-(tox|fuel|compass)-.*'
+          view-regex: '^{project-name}-(tox|type1|type2)-(verify|fuel|compass)-.*'
     # -------------------------------
     # BRANCH DEFINITIONS
     # -------------------------------
       - ubuntu1604
       - ubuntu1804
       - centos7
-
+    #--------------------------------
+    # IEC TYPE DEFINITINONS
+    # type1 Mcbin embeded board
+    # type2 Arm Server
+    # -------------------------------
+    iecType:
+      - type1
+      - type2
     # -------------------------------
     # DEPLOY TYPE DEFINITIONS
     # -------------------------------
@@ -50,6 +57,8 @@
         os: centos7
       - installer: compass
         os: ubuntu1804
+      - iecType: type1
+        installer: fuel
 
     # -------------------------------
     # USECASE DEFINITIONS
           scenario: 'k8-calico-iec-noha'
 
     jobs:
-      - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}'
-      - 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
-      - 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
-      - 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
+      - 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}'
+      - 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
+      - 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
+      - 'iec-{iecType}-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
+      - gerrit-sonar:
+          sonar-project-file: ""
+          build-node: centos7-builder-2c-1g
+          sonar-properties: |
+            # Required metadata
+            sonar.projectKey=iec
+            sonar.projectName=iec
+            sonar.organization=akraino-edge-stack
+
+            #Source
+            sonar.sources=.
+            sonar.exclusions=**/*_test.go,**/vendor/**
+
+            # Language
+            sonar.language=go
+
+            # Encoding
+            sonar.build.sourceEncoding=UTF-8
+
+            # Inclusions
+            sonar.inclusions=**/**.go
+
+            # Test Execution
+            sonar.tests=.
+            sonar.test.inclusions=**/*_test.go
+            sonar.test.exclusions=**/vendor/**
+
+            # Unit tests
+            sonar.go.coverage.reportPaths=iec-coverage.xml
+            sonar.go.tests.reportPaths=iec-tests.xml
+
+            # Importing External Issues
+            sonar.go.govet.reportPaths=iec-govet.xml
+            sonar.go.golint.reportPaths=iec-golint.xml
+            sonar.go.gometalinter.reportPaths=iec-gometalinter.xml
+            sonar.go.golangci-lint.reportPaths=iec-golangci-lint.xml
 
 ##############
 # PARAMETERS #
     parameters:
       - string: &k8s_master_ip
           name: K8S_MASTER_IP
-          default: ''
+          default: '172.16.10.36'
           description: 'IP address to connect to the K8s master'
       - string: &k8s_ssh_user
           name: K8S_SSH_USER
           description: 'SSH password to connect to the K8s master'
       - string: &k8s_ssh_key
           name: K8S_SSH_KEY
-          default: ''
+          default: '/var/lib/opnfv/mcp.rsa'
           description: 'SSH key to connect to the K8s master'
 - parameter:
     <<: *k8s_fuel_ubuntu1604_parameter
 # job templates
 ########################
 - job-template:
-    name: 'iec-{installer}-{deploy_type}-{os}-daily-{stream}'
+    name: 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}'
     disabled: '{obj:disabled}'
     concurrent: false
     node: '{slave-label}'
           blocking-jobs:
             - '.*-fuel-{deploy_type}-.*'
             - '.*-compass-{deploy_type}-.*'
-          blocking-level: 'NODE'
+          block-level: 'NODE'
 
     wrappers:
       - build-name:
-          name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+          name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE'
 
     triggers:
-      - 'iec-{installer}-{deploy_type}-{os}-daily-{stream}-trigger'
+      - 'iec-{iecType}-{installer}-{deploy_type}-{os}-daily-{stream}-trigger'
 
     parameters:
       - lf-infra-parameters:
       - string:
           name: DEPLOY_SCENARIO
           default: '{scenario}'
+      - string:
+          name: IEC_TYPE
+          default: '{iecType}'
 
     builders:
       - trigger-builds:
-          - project: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
+          - project: 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
             current-parameters: true
             predefined-parameters:
               DEPLOY_SCENARIO={scenario}
           - project:
               !j2: |
                 {%- for uc in usecase -%}
-                iec-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }}
+                iec-{{ iecType }}-install-{{ uc | first }}-{{ installer }}-{{ deploy_type }}-{{ os }}-daily-{{ stream }}
                 {%- if not loop.last -%},{%- endif -%}
                 {%- endfor %}
             current-parameters: true
               build-step-failure-threshold: 'never'
               failure-threshold: 'never'
               unstable-threshold: 'FAILURE'
-          - project: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
+          - project: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
             current-parameters: false
-            predefined-parameters:
+            predefined-parameters: |
               DEPLOY_SCENARIO={scenario}
+              IEC_TYPE={iecType}
             same-node: true
             block: true
 
 - job-template:
-    name: 'iec-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
+    name: 'iec-{iecType}-deploy-{installer}-{deploy_type}-{os}-daily-{stream}'
     concurrent: true
     node: '{slave-label}'
     properties: &properties
       - build-blocker:
           use-build-blocker: true
           blocking-jobs:
-            - '.*-deploy-{installer}-{deploy_type}-.*'
-            - '.*-destroy-{installer}-{deploy_type}-.*'
-            - '.*-install-.*-{installer}-{deploy_type}-.*'
-          blocking-level: 'NODE'
+            - '.*-{iecType}-deploy-{installer}-{deploy_type}-.*'
+            - '.*-{iecType}-destroy-{installer}-{deploy_type}-.*'
+            - '.*-{iecType}-install-.*-{installer}-{deploy_type}-.*'
+          block-level: 'NODE'
 
     parameters:
       - lf-infra-parameters:
           stream: '{stream}'
           branch: '{branch}'
       - '{project}-defaults'
+      - '{installer}-{os}-defaults'
       - string:
           name: DEPLOY_SCENARIO
           default: '{scenario}'
+      - string:
+          name: IEC_TYPE
+          default: '{iecType}'
       - string:
           name: EXTRA_ARGS
           default: '-o {os}'
 
     wrappers: &wrappers
       - build-name:
-          name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO'
+          name: '$BUILD_NUMBER - Scenario: $DEPLOY_SCENARIO $IEC_TYPE'
 
     scm: &scm
       - git:
       - lf-infra-publish
 
 - job-template:
-    name: 'iec-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
+    name: 'iec-{iecType}-destroy-{installer}-{deploy_type}-{os}-daily-{stream}'
     concurrent: true
     node: '{slave-label}'
     properties: *properties
           stream: '{stream}'
           branch: '{branch}'
       - '{project}-defaults'
+      - '{installer}-{os}-defaults'
       - string:
           name: DEPLOY_SCENARIO
           default: '{scenario}'
+      - string:
+          name: IEC_TYPE
+          default: '{iecType}'
       - string:
           name: EXTRA_ARGS
           default: '-EEE -o {os}'
     publishers: *publishers
 
 - job-template:
-    name: 'iec-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
+    name: 'iec-{iecType}-install-{usecase}-{installer}-{deploy_type}-{os}-daily-{stream}'
     concurrent: true
     node: '{slave-label}'
     properties: *properties
           stream: '{stream}'
           branch: '{branch}'
       - '{project}-defaults'
+      - '{installer}-{os}-defaults'
 
     wrappers:
       - build-name:
 
     publishers: *publishers
 
+
 ########################
 # trigger macros
 ########################
 # Akraino IEC CI Baremetal Triggers running against master branch
 # ----------------------------------------------------------------
 - trigger:
-    name: 'iec-fuel-virtual-ubuntu1604-daily-master-trigger'
+    name: 'iec-type2-fuel-virtual-ubuntu1604-daily-master-trigger'
     triggers:
       - timed: '0 1 * * 1,3,5'
 - trigger:
-    name: 'iec-fuel-baremetal-ubuntu1604-daily-master-trigger'
+    name: 'iec-type2-fuel-baremetal-ubuntu1604-daily-master-trigger'
     triggers:
       - timed: ''
 - trigger:
-    name: 'iec-compass-virtual-ubuntu1604-daily-master-trigger'
+    name: 'iec-type2-compass-virtual-ubuntu1604-daily-master-trigger'
     triggers:
       - timed: '0 13 * * *'
 - trigger:
-    name: 'iec-fuel-virtual-ubuntu1804-daily-master-trigger'
+    name: 'iec-type2-fuel-virtual-ubuntu1804-daily-master-trigger'
     triggers:
       - timed: '0 1 * * 2,6'
 - trigger:
-    name: 'iec-fuel-baremetal-ubuntu1804-daily-master-trigger'
+    name: 'iec-type2-fuel-baremetal-ubuntu1804-daily-master-trigger'
     triggers:
       - timed: ''
 - trigger:
-    name: 'iec-fuel-virtual-centos7-daily-master-trigger'
+    name: 'iec-type2-fuel-virtual-centos7-daily-master-trigger'
     triggers:
       - timed: '0 1 * * 4,7'
 - trigger:
-    name: 'iec-fuel-baremetal-centos7-daily-master-trigger'
+    name: 'iec-type2-fuel-baremetal-centos7-daily-master-trigger'
     triggers:
       - timed: ''
+- trigger:
+    name: 'iec-type1-compass-virtual-ubuntu1604-daily-master-trigger'
+    triggers:
+      - timed: '0 19 * * *'