Merge "upgrade paramterizing follow up"
authorKashif Khan <kashif.khan@est.tech>
Mon, 17 Apr 2023 09:08:50 +0000 (09:08 +0000)
committerNordix Gerrit <gerrit@nordix.org>
Mon, 17 Apr 2023 09:08:50 +0000 (09:08 +0000)
26 files changed:
jjb/geode-native-win/apache-geode-native-win-slave/apache-geode-native-win-slave-setup.yaml
jjb/geode-native-win/apache-geode-native-win-verify.yaml
jjb/geode-native-win/global-template-apache-geode-native-win-tests.yaml
jjb/geode-native/apache-geode-native-release/apache-geode-native-SrcRelease.yaml
jjb/geode-native/apache-geode-native-slave/apache-geode-native-slave-setup.yaml
jjb/geode-native/apache-geode-native-verify.yaml
jjb/geode-native/global-template-apache-geode-native-test.yaml
jjb/geode/apache-geode-slave/apache-geode-slave-setup.yaml
jjb/geode/apache-geode-test-coordinator.yaml
jjb/geode/global-template-apache-geode-build.yaml
jjb/geode/global-template-apache-geode-test.yaml
jjb/metal3/defaults.yml
jjb/metal3/job_bml_integration_tests.yml
jjb/metal3/job_bml_main_integration_tests.yml
jjb/metal3/job_integration_tests.yml
jjb/metal3/job_openstack_image_building.yml
jjb/metal3/job_openstack_node_image_building.yml
jjb/metal3/projects.yml
jjb/nsm/Jenkinsfile
jjb/nsm/meridio-e2e-long-run-test-kind.yaml
jjb/nsm/meridio-periodic.yaml
jjb/nsm/meridio-pull-request.yaml
jjb/onap/policy-docker-csit-jobs.sh
jjb/oransc/nonrtric-plt-helmmanager/nonrtric-plt-helmmanager-verify-jobs.yaml
jjb/oransc/nonrtric-plt-rappcatalogue/nonrtric-plt-rappcatalogue-verify-jobs.yaml
jjb/oransc/portal-nonrtric-controlpanel/portal-nonrtric-controlpanel-verify-jobs.yml

index 3f624b681182b0745d342f240101ae039a206cf5..38b835a062b8b921df381a71ca807ce9ee2cbec2 100644 (file)
@@ -21,7 +21,7 @@
     name: 'win-geode-native-SlaveSetup'
 
     node: geode-windows2019
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index e072dce8346bf9225c419e871868e63bd12d0831..51c3725de0a21dec5907b104e48e8e74bc2cf8b7 100644 (file)
@@ -30,7 +30,7 @@
 - job-template:
     name: 'win-geode-native-{stream}-verify'
     project-type: multijob
-    disabled: false
+    disabled: true
     concurrent: true
     node: geode-windows2019
 
index cd63d2b7bb786656f53db099fe07f6f553c15195..c7b3f84d9fb4ed10f7dac079eaa7c47b4fa9feb4 100644 (file)
@@ -21,7 +21,7 @@
     name: 'win-geode-native-{test-type}'
 
     node: geode-windows2019
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index 9103ee60d559bd7758295b1a68fdebbbb2176f35..a0bca227f92273f15157a41848de2b3e5144d9cc 100644 (file)
@@ -21,7 +21,7 @@
     name: 'apache-geode-native-SrcRelease'
 
     node: geode-ubuntu1804
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index 183f4dc9df5e65c46c149b342d68e120aa4b92c1..5451a130c9b046d65f302df3eb8abeb5255926fc 100644 (file)
@@ -21,7 +21,7 @@
     name: 'apache-geode-native-SlaveSetup'
 
     node: geode-ubuntu1804
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index 1abd311c417b7a50d9b91421ac6f0e8df2c1dad2..650c3288193c0afa70071ad324d1b714c25a93a9 100644 (file)
@@ -30,7 +30,7 @@
 - job-template:
     name: 'apache-geode-native-{stream}-verify'
     project-type: multijob
-    disabled: false
+    disabled: true
     concurrent: true
     node: geode-ubuntu1804
 
index 1058b894e7615ea915f0ad0454b261be8fd7913e..7f234bc38757614059d135ea74a61f3bf3d698d3 100644 (file)
@@ -21,7 +21,7 @@
     name: 'apache-geode-native-{test-type}'
 
     node: geode-ubuntu1804
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index f4deac383715d8d41eddc52cf4ad0978bfa395a1..da406ac86d75cd2fbe2c0f34f72eb1f025435e4a 100644 (file)
@@ -21,7 +21,7 @@
     name: 'apache-geode-SlaveSetup'
 
     node: geode-ubuntu1804
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index f17219638a6085f587e1c133c068142816c6109d..f93ab003de874fddc3139b3945f79defa89c2b6f 100644 (file)
@@ -34,7 +34,7 @@
 - job-template:
     name: 'apache-geode-verify-{stream}-coordinator'
     project-type: multijob
-    disabled: false
+    disabled: true
     concurrent: true
     node: geode-ubuntu1804
 
index 65217c4723c989f65ed565765daf60c85e88a043..4a7d873fbe583388e9835006536dd9e8d7e93202 100644 (file)
@@ -21,7 +21,7 @@
     name: 'apache-geode-build-release-jdk{java-build-version}'
 
     node: geode-ubuntu1804
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index 7209fb67046ad6146a05250cd0d8126d7d0bf76c..6fdfec893b1111b502d6ae777d6e2bc3c988abfc 100644 (file)
@@ -21,7 +21,7 @@
     name: 'apache-geode-{test-type}Test-jdk{java-test-version}'
 
     node: geode-ubuntu1804
-    disabled: false
+    disabled: true
     concurrent: true
 
     properties:
index ca76832f6c035d57c48142b0478ad18baa8f8964..ca138c71e7d7b97790c8314a1e946e1a2cc6e63d 100644 (file)
@@ -39,5 +39,7 @@
     name: integration-default-values
     <<: *global_defaults
     ironic_install_type: 'rpm'
+    build_mariadb_image_locally: 'false'
+    ironic_use_mariadb: 'false'
     name_postfix: ''
     trigger_postfix: ''
index 8ca4dd5dc34387c17d866503b6929878c2c248bb..dfe9b608895472a2cf320f03540ffc05a5bda4a7 100644 (file)
         name: TARGET_NODE_MEMORY
         default: 4096
         description: 'RAM size of the target host.'
+    - string:
+        name: NUM_NODES
+        default: 2
+        description: 'Number of baremetal servers.'
 
     properties:
     - build-discarder:
index 039d93ca1ae9c19a2b78cf20442f9ec9ebb6db3e..0d80a3f6af21c6ab0fa045ed2c128467c5719afd 100644 (file)
         name: TARGET_NODE_MEMORY
         default: 4096
         description: 'RAM size of the target host.'
+    - string:
+        name: NUM_NODES
+        default: 2
+        description: 'Number of baremetal servers.'
 
     properties:
     - build-discarder:
index 20a6ca205f681be56b87a2b3f40994c3578ad642..c72d810ad3bb6ad810b8fd24e929045446d13630 100644 (file)
         name: IRONIC_INSTALL_TYPE
         default: '{ironic_install_type}'
         description: 'Sets the installation type of ironic during ironic-image build of the BMO deployment'
+    - string:
+        name: IRONIC_USE_MARIADB
+        default: '{ironic_use_mariadb}'
+        description: 'If Ironic should use MariaDB or not.'
+    - string:
+        name: BUILD_MARIADB_IMAGE_LOCALLY
+        default: '{build_mariadb_image_locally}'
     properties:
     - build-discarder:
         days-to-keep: 30
@@ -89,7 +96,7 @@
     triggers:
     - github-pull-request:
         admin-list:
-          - '{ci_github_admin_user}'
+        - '{ci_github_admin_user}'
         org-list: "{ci_github_whitelist_org}"
         cron: 'H/5 * * * *'
         auth-id: "{ci_ghprb_auth_id}"
           url: "{ci_github_repo}"
           credentials-id: "{ci_github_jenkins_credentials_id}"
           branches:
-            - '{branch|main}'
+          - '{branch|main}'
           name: 'origin'
           refspec: '+refs/heads/*:refs/remotes/origin/*'
           wipe-workspace: True
index d8973d5592452c82c4c226d3260edb300b199d10..e9e90b51ab0c384cc7b55f894b8806d8eba4dff1 100644 (file)
     parameters:
     - string:
         name: KUBERNETES_VERSION
-        default: "v1.26.0"
+        default: "v1.26.4"
         description: 'Kubernetes version'
     - string:
         name: KIND_NODE_IMAGE_VERSION
-        default: "v1.26.0"
+        default: "v1.26.3"
         description: 'Kind node container image version'
 
     properties:
index aadf58764459898b825bdb9b5f06c1701a212853..57576d36dc2e5aee2b487a88f8467a26173eb0c4 100644 (file)
     parameters:
     - string:
         name: KUBERNETES_VERSION
-        default: "v1.26.0"
+        default: "v1.26.4"
         description: 'Kubernetes version'
     - string:
         name: CRICTL_VERSION
-        default: "v1.26.0"
+        default: "v1.26.1"
         description: 'CRICTL VERSION'
     - string:
         name: CRIO_VERSION
-        default: "v1.26.1"
+        default: "v1.26.3"
         description: 'CRI-O VERSION'
 
     properties:
index a1a9907026dafc21520e108f908728e55a5fd871..ec65d76f9c66672aa9bd7cd95f709965a4463beb 100644 (file)
@@ -78,6 +78,8 @@
           repo: ironic-ipa-downloader
       - mariadb_image:
           repo: mariadb-image
+          build_mariadb_image_locally: 'true'
+          ironic_use_mariadb: 'true'
     image_os:
       - ubuntu
       - centos
index e30b92eb6188a32b645e4df0d787262a08983a0b..914dbbb6f53da4cc8c14a315a401ce8db4f0bf64 100644 (file)
@@ -34,6 +34,8 @@ node('nordix-nsm-build-ubuntu2204') {
         def image_names = params.IMAGE_NAMES.split(' ')
         def version = params.IMAGE_VERSION
         def e2e_enabled = params.E2E_ENABLED
+        def helm_chart_upload = params.HELM_CHART_UPLOAD
+        def security_scan_enabled = params.SECURITY_SCAN_ENABLED
         def git_project = params.GIT_PROJECT
         def current_branch = params.CURRENT_BRANCH
         def default_branch = params.DEFAULT_BRANCH
@@ -55,12 +57,7 @@ node('nordix-nsm-build-ubuntu2204') {
                 ])
                 sh 'git show'
             }
-            stage('Verify') {
-                Verify().call()
-                if (currentBuild.result == 'FAILURE') {
-                    Error('Failed at verification stage').call()
-                }
-            }
+            Verify().call()
             stage('Docker login') {
                 if (env.DRY_RUN != 'true') {
                     withCredentials([usernamePassword(credentialsId: 'nordix-cicd-harbor-credentials', passwordVariable: 'HARBOR_PASSWORD', usernameVariable: 'HARBOR_USERNAME')]) {
@@ -69,7 +66,7 @@ node('nordix-nsm-build-ubuntu2204') {
                     '''
                     }
                 } else {
-                    Utils.markStageSkippedForConditional('Docker login')
+                    echo 'Docker login'
                 }
             }
             stage('Base Image') {
@@ -81,9 +78,19 @@ node('nordix-nsm-build-ubuntu2204') {
                     Error('Failed to build image(s)').call()
                 }
             }
+            stage('Helm Chart') {
+                HelmChart(helm_chart_upload, version).call()
+            }
+            stage('Security Scan') {
+                if (security_scan_enabled == true) {
+                    SecurityScan(current_branch, version).call()
+                } else {
+                    Utils.markStageSkippedForConditional('Security Scan')
+                }
+            }
             stage('E2E') {
-                if (e2e_enabled == 'true' && env.DRY_RUN != 'true') {
-                    E2e(e2e_enabled).call()
+                if (e2e_enabled == true) {
+                    E2e(current_branch, version).call()
                 } else {
                     Utils.markStageSkippedForConditional('E2E')
                 }
@@ -95,17 +102,12 @@ node('nordix-nsm-build-ubuntu2204') {
     }
 }
 
-// Static analysis: Runs the GeneratedCode function and then UnitTests and Linter in parallel
+// Verify the Generated code, UnitTests and Linter
 def Verify() {
     return {
         GeneratedCode().call() // cannot generate code and run the linter and tests at the same time
-        // Linter().call()
-        // UnitTests().call()
-        def stages = [:]
-        stages.put('Unit Tests', UnitTests())
-        stages.put('Linter', Linter())
-        // stages.put('Generated code verification', GeneratedCode())
-        parallel(stages)
+        Linter().call()
+        UnitTests().call()
     }
 }
 
@@ -121,8 +123,7 @@ def UnitTests() {
                 SetBuildStatus(completed, context, success)
             } catch (Exception e) {
                 SetBuildStatus(failed, context, failure)
-                unstable "${exception_message_exec} ${command}"
-                currentBuild.result = 'FAILURE'
+                Error("${exception_message_exec} ${command}").call()
             }
         }
     }
@@ -140,8 +141,7 @@ def Linter() {
                 SetBuildStatus(completed, context, success)
             } catch (Exception e) {
                 SetBuildStatus(failed, context, failure)
-                unstable "${exception_message_exec} ${command}"
-                currentBuild.result = 'FAILURE'
+                Error("${exception_message_exec} ${command}").call()
             }
         }
     }
@@ -155,36 +155,20 @@ def Linter() {
 def GeneratedCode() {
     return {
         def context = 'Generated code verification'
-        SetBuildStatus(in_progress, context, pending)
-        stage('go mod tidy') {
-            def command = 'go mod tidy'
-            try {
-                ExecSh(command).call()
-                if (GetModifiedFiles() != '') {
-                    throw new Exception(exception_message_code_generation)
-                }
-            } catch (Exception e) {
-                SetBuildStatus(failed, context, failure)
-                Error(exception_message_exec + command).call()
-            }
-        }
-        stage('go generate ./...') {
-            def command = 'make generate'
+        stage('Generated code verification') {
+            def command = 'make go-generate manifests generate-controller'
             try {
+                SetBuildStatus(in_progress, context, pending)
                 ExecSh(command).call()
                 if (GetModifiedFiles() != '') {
                     throw new Exception(exception_message_code_generation)
                 }
+                SetBuildStatus(completed, context, success)
             } catch (Exception e) {
                 SetBuildStatus(failed, context, failure)
                 Error(exception_message_exec + command).call()
             }
         }
-        stage('Proto') {
-            // TODO: protoc version could be different
-            Utils.markStageSkippedForConditional('Proto')
-        }
-        SetBuildStatus(completed, context, success)
     }
 }
 
@@ -227,11 +211,64 @@ def Build(image, version, build_steps, registry, local_version) {
     }
 }
 
+// Generate and upload the helm chart
+def HelmChart(helm_chart_upload, version) {
+    return {
+        parallel(
+            'Helm Chart': {
+                stage('Generate Helm Chart') {
+                    def context = 'Generate Helm Chart'
+                    def command = "make generate-helm-chart VERSION=${version}"
+                    try {
+                        SetBuildStatus(in_progress, context, pending)
+                        ExecSh(command).call()
+                        SetBuildStatus(completed, context, success)
+                    } catch (Exception e) {
+                        SetBuildStatus(failed, context, failure)
+                        Error("${exception_message_exec} ${command}").call()
+                    }
+                }
+                stage('Upload Helm Chart') {
+                    if (helm_chart_upload == true) {
+                        withCredentials([string(credentialsId: 'nsm-nordix-artifactory-api-key', variable: 'API_KEY')]) {
+                            ExecSh("""
+                                charts=\$(cd _output/helm/ && ls *.tgz)
+                                for chart in \$charts
+                                do
+                                    curl -H 'X-JFrog-Art-Api:${API_KEY}' -T _output/helm/\$chart \"https://artifactory.nordix.org/artifactory/cloud-native/meridio/\$chart\"
+                                done
+                            """).call()
+                        }
+                    } else {
+                        Utils.markStageSkippedForConditional('Upload Helm Chart')
+                    }
+                }
+            }
+        )
+    }
+}
+
+// Run the security scan job
+def SecurityScan(current_branch, version) {
+    return {
+        build job: 'meridio-periodic-security-scan', parameters: [
+            string(name: 'IMAGE_VERSION', value: "$version"),
+            string(name: 'CURRENT_BRANCH', value: "$current_branch"),
+            string(name: 'DRY_RUN', value: env.DRY_RUN)
+        ], wait: true
+    }
+}
+
 // Run the E2e Tests
 // Currently skipped
-def E2e(e2e_enabled) {
+def E2e(current_branch, version) {
     return {
-        echo 'make e2e' // todo
+        build job: 'meridio-e2e-test-kind', parameters: [
+            string(name: 'MERIDIO_VERSION', value: "$version"),
+            string(name: 'TAPA_VERSION', value: "$version"),
+            string(name: 'CURRENT_BRANCH', value: "$current_branch"),
+            string(name: 'DRY_RUN', value: env.DRY_RUN)
+        ], wait: true
     }
 }
 
index 678878a2071b0c315fc2dab671259b91a1538104..218463ae7c3a5bf06fb10bc4d8fdd0aa467bf3b4 100644 (file)
@@ -98,7 +98,7 @@
       - string:
           name: INTERVAL
           default: "7200"
-          description: Interval between each e2e test run (in seconds)
+          description: Interval between each e2e test run (in seconds). This also defines the timeout of the e2e test runs.
       - bool:
           name: DRY_RUN
           default: false
index 4acefe37f62541280af3e1585ccf02359f98296f..d4e1f25512d65aa72c0e343c9d5a007f0b3aed28 100644 (file)
           name: IMAGE_VERSION
           default: 'latest'
           description: Version of the images
-      - string:
+      - bool:
           name: E2E_ENABLED
-          default: "false"
-          description: Is E2E Tests enabled?
+          default: false
+          description: Run the e2e tests?
+      - bool:
+          name: HELM_CHART_UPLOAD
+          default: true
+          description: Upload Helm Charts?
+      - bool:
+          name: SECURITY_SCAN_ENABLED
+          default: false
+          description: Run the security scan?
       - string:
           name: GIT_PROJECT
           default: "https://github.com/Nordix/Meridio.git"
index 9dd3301cfb937cdd6c27992909dc8c78ec771f25..c32235956a86fe9c1c7f9654a2d155c671712d06 100644 (file)
           name: IMAGE_VERSION
           default: 'latest'
           description: Version of the images
-      - string:
+      - bool:
           name: E2E_ENABLED
-          default: "false"
-          description: Is E2E Tests enabled?
+          default: false
+          description: Run the e2e tests?
+      - bool:
+          name: HELM_CHART_UPLOAD
+          default: false
+          description: Upload Helm Charts?
+      - bool:
+          name: SECURITY_SCAN_ENABLED
+          default: false
+          description: Run the security scan?
       - string:
           name: GIT_PROJECT
           default: "https://github.com/Nordix/Meridio.git"
index 82fb3e10e509441715b604668920e56cf1ecdd3b..77355147ba7a43e775bd449762636486b61b39fe 100644 (file)
@@ -24,10 +24,6 @@ fi
 
 unset WORKSPACE
 
-
-sed -i 's#./include-raw-integration-install-robotframework.sh#$SCRIPTS/include-raw-integration-install-robotframework.sh#g' prepare-csit.sh
-sed -i 's#pylibs.txt#$SCRIPTS/pylibs.txt#g' include-raw-integration-install-robotframework.sh
-
 git config --global user.email "infra@nordix.org"
 git config --global user.name "nordix"
 
index daf6f43a939b67c449c81a1163eb49a61d95e22c..82788bc97788c17dcf0663511ba98e53607f57f3 100644 (file)
@@ -24,7 +24,7 @@
     name: nonrtric-plt-helmmanager-verify
     project: nonrtric/plt/helmmanager
     project-name: nonrtric-plt-helmmanager
-    jdk-version: java-11
+    jdk-version: java-17
 
     jobs:
       - 'oransc-{project-name}-verify-java'
\ No newline at end of file
index 7773629c43988eb2cc645ae8e1c76134f3d41b37..3ff250371b544c64bb77b660c2f1d4963db06f53 100644 (file)
@@ -24,7 +24,7 @@
     name: nonrtric-plt-rappcatalogue-verify
     project: nonrtric/plt/rappcatalogue
     project-name: nonrtric-plt-rappcatalogue
-    jdk-version: java-11
+    jdk-version: java-17
 
     jobs:
       - 'oransc-{project-name}-verify-java'
\ No newline at end of file
index e6a3f94dd158b4adf65f92cd7a12803c2627ea39..159c1620612a96cc1602c6bdcbcf08a9e433f7de 100644 (file)
@@ -21,7 +21,7 @@
     name: portal-nonrtric-controlpanel-verify
     project: portal/nonrtric-controlpanel
     project-name: portal-nonrtric-controlpanel
-    jdk-version: java-11
+    jdk-version: java-17
 
     jobs:
       - 'oransc-{project-name}-verify-java'