Meridio: Improvements (operator, e2e, dry-run...)

- Add dry-run (for job debug)
- Add operator images to be built and scanned
- Improve e2e badges
- e2e focus and skip support
- Better error handling in periodic and pr job
- Meridio and TAPA version support for e2e

Change-Id: I55708cecb636950518a3ad38c34164c558b9ea6d
diff --git a/jjb/nsm/Jenkinsfile b/jjb/nsm/Jenkinsfile
index e54acf6..dc537ce 100644
--- a/jjb/nsm/Jenkinsfile
+++ b/jjb/nsm/Jenkinsfile
@@ -57,12 +57,19 @@
             }
             stage('Verify') {
                 Verify().call()
+                if (currentBuild.result == 'FAILURE') {
+                    Error('Failed at verification stage').call()
+                }
             }
             stage('Docker login') {
-                withCredentials([usernamePassword(credentialsId: 'nordix-cicd-harbor-credentials', passwordVariable: 'HARBOR_PASSWORD', usernameVariable: 'HARBOR_USERNAME')]) {
-                    sh '''#!/bin/bash -eu
+                if (env.DRY_RUN != 'true') {
+                    withCredentials([usernamePassword(credentialsId: 'nordix-cicd-harbor-credentials', passwordVariable: 'HARBOR_PASSWORD', usernameVariable: 'HARBOR_USERNAME')]) {
+                        sh '''#!/bin/bash -eu
                     echo $HARBOR_PASSWORD | docker login --username $HARBOR_USERNAME --password-stdin $IMAGE_REGISTRY
                     '''
+                    }
+                } else {
+                    Utils.markStageSkippedForConditional('Docker login')
                 }
             }
             stage('Base Image') {
@@ -70,9 +77,16 @@
             }
             stage('Images') {
                 Images(image_names, version, build_steps, image_registry, local_version).call()
+                if (currentBuild.result == 'FAILURE') {
+                    Error('Failed to build image(s)').call()
+                }
             }
             stage('E2E') {
-                E2e(e2e_enabled).call()
+                if (e2e_enabled == 'true' && env.DRY_RUN != 'true') {
+                    E2e(e2e_enabled).call()
+                } else {
+                    Utils.markStageSkippedForConditional('E2E')
+                }
             }
         }
         stage('Cleanup') {
@@ -107,7 +121,8 @@
                 SetBuildStatus(completed, context, success)
             } catch (Exception e) {
                 SetBuildStatus(failed, context, failure)
-                Error(exception_message_exec + command).call()
+                unstable "${exception_message_exec} ${command}"
+                currentBuild.result = 'FAILURE'
             }
         }
     }
@@ -125,7 +140,8 @@
                 SetBuildStatus(completed, context, success)
             } catch (Exception e) {
                 SetBuildStatus(failed, context, failure)
-                Error(exception_message_exec + command).call()
+                unstable "${exception_message_exec} ${command}"
+                currentBuild.result = 'FAILURE'
             }
         }
     }
@@ -167,17 +183,6 @@
         stage('Proto') {
             // TODO: protoc version could be different
             Utils.markStageSkippedForConditional('Proto')
-        // try {
-        //     sh 'make proto'
-        //     if (GetModifiedFiles() != '') {
-        //         throw new Exception(exception_message)
-        //     }
-        // } catch (Exception e) {
-        //     SetBuildStatus(failed, context, failure)
-        //     sh 'git diff'
-        //     sh 'git status -s'
-        //     Error(e).call()
-        // }
         }
         SetBuildStatus(completed, context, success)
     }
@@ -215,7 +220,8 @@
                 SetBuildStatus(completed_message, context, success)
             } catch (Exception e) {
                 SetBuildStatus(failed_message, context, failure)
-                Error(exception_message_exec + command).call()
+                unstable "${exception_message_exec} ${command}"
+                currentBuild.result = 'FAILURE'
             }
         }
     }
@@ -224,14 +230,8 @@
 // Run the E2e Tests
 // Currently skipped
 def E2e(e2e_enabled) {
-    if (e2e_enabled == 'true') {
-        return {
-            echo 'make e2e' // todo
-        }
-    } else {
-        return {
-            Utils.markStageSkippedForConditional('E2E')
-        }
+    return {
+        echo 'make e2e' // todo
     }
 }
 
@@ -253,24 +253,30 @@
 // Execute command
 def ExecSh(command) {
     return {
-        sh """
-            . \${HOME}/.profile
-            ${command}
-        """
+        if (env.DRY_RUN != 'true') {
+            sh """
+                . \${HOME}/.profile
+                ${command}
+            """
+        } else {
+            echo "${command}"
+        }
     }
 }
 
 // Set the commit status on Github
 // https://plugins.jenkins.io/github/#plugin-content-pipeline-examples
 def SetBuildStatus(String message, String context, String state) {
-    step([
-        $class: 'GitHubCommitStatusSetter',
-        reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/Nordix/Meridio'],
-        commitShaSource: [$class: 'ManuallyEnteredShaSource', sha: GetCommitSha()],
-        contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: context],
-        errorHandlers: [[$class: 'ShallowAnyErrorHandler']], // Prevent GitHubCommitStatusSetter to set the job status to unstable
-        statusResultSource: [ $class: 'ConditionalStatusResultSource', results: [[$class: 'AnyBuildResult', message: message, state: state]] ]
-  ])
+    if (env.DRY_RUN != 'true') {
+        step([
+            $class: 'GitHubCommitStatusSetter',
+            reposSource: [$class: 'ManuallyEnteredRepositorySource', url: 'https://github.com/Nordix/Meridio'],
+            commitShaSource: [$class: 'ManuallyEnteredShaSource', sha: GetCommitSha()],
+            contextSource: [$class: 'ManuallyEnteredCommitContextSource', context: context],
+            errorHandlers: [[$class: 'ShallowAnyErrorHandler']], // Prevent GitHubCommitStatusSetter to set the job status to unstable
+            statusResultSource: [ $class: 'ConditionalStatusResultSource', results: [[$class: 'AnyBuildResult', message: message, state: state]] ]
+        ])
+    }
 }
 
 // Return the current commit sha
diff --git a/jjb/nsm/Jenkinsfile.security-scan b/jjb/nsm/Jenkinsfile.security-scan
index 708a3a0..41857e9 100644
--- a/jjb/nsm/Jenkinsfile.security-scan
+++ b/jjb/nsm/Jenkinsfile.security-scan
@@ -1,3 +1,19 @@
+/*
+Copyright (c) 2022 Nordix Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 
 node('nordix-nsm-build-ubuntu1804') {
     build_number = env.BUILD_NUMBER
@@ -44,18 +60,19 @@
                 ExecSh(command).call()
             }
             stage('Report') {
-                archiveArtifacts artifacts: '_output/*', followSymlinks: false
+                if (env.DRY_RUN != 'true') {
+                    archiveArtifacts artifacts: '_output/*', followSymlinks: false
 
-                def number_of_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | awk \'{print $1}\' | sort | uniq | wc -l', returnStdout: true).trim()
-                def list_of_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | awk \'{print $1}\' | sort | uniq | sed \':a;N;$!ba;s/\\n/ ; /g\'', returnStdout: true).trim()
-                def number_of_high_severity_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | grep -i "high" | awk \'{print $1}\' | sort | uniq | wc -l', returnStdout: true).trim()
-                def list_of_high_severity_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | grep -i "high" | awk \'{print $1}\' | sort | uniq | sed \':a;N;$!ba;s/\\n/ ; /g\'', returnStdout: true).trim()
-                def git_describe =  sh(script: 'git describe --dirty --tags', returnStdout: true).trim()
-                def git_rev =  sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
-                def report =  sh(script: 'cat _output/report.txt', returnStdout: true).trim()
+                    def number_of_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | awk \'{print $1}\' | sort | uniq | wc -l', returnStdout: true).trim()
+                    def list_of_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | awk \'{print $1}\' | sort | uniq | sed \':a;N;$!ba;s/\\n/ ; /g\'', returnStdout: true).trim()
+                    def number_of_high_severity_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | grep -i "high" | awk \'{print $1}\' | sort | uniq | wc -l', returnStdout: true).trim()
+                    def list_of_high_severity_vulnerabilities =  sh(script: 'cat _output/list.txt | grep -v "^$" | grep -i "high" | awk \'{print $1}\' | sort | uniq | sed \':a;N;$!ba;s/\\n/ ; /g\'', returnStdout: true).trim()
+                    def git_describe =  sh(script: 'git describe --dirty --tags', returnStdout: true).trim()
+                    def git_rev =  sh(script: 'git rev-parse HEAD', returnStdout: true).trim()
+                    def report =  sh(script: 'cat _output/report.txt', returnStdout: true).trim()
 
-                def subject = "Meridio - Security Scan - ${number_of_high_severity_vulnerabilities} high severity vulnerabilities detected"
-                def body = """
+                    def subject = "Meridio - Security Scan - ${number_of_high_severity_vulnerabilities} high severity vulnerabilities detected"
+                    def body = """
 Run: ${RUN_DISPLAY_URL}
 git describe --dirty --tags: ${git_describe}
 git rev-parse HEAD: ${git_rev}
@@ -71,9 +88,12 @@
 report:
 ${report}
 """
-                emailext body: "${body}", subject: "${subject}", to: "${email_recipients}"
+                    emailext body: "${body}", subject: "${subject}", to: "${email_recipients}"
 
-                vulnerabilityBadge.setStatus("${number_of_vulnerabilities}")
+                    vulnerabilityBadge.setStatus("${number_of_vulnerabilities}")
+                } else {
+                    Utils.markStageSkippedForConditional('Report')
+                }
             }
         }
         stage('Cleanup') {
@@ -90,9 +110,13 @@
 // Execute command
 def ExecSh(command) {
     return {
-        sh """
-            . \${HOME}/.profile
-            ${command}
-        """
+        if (env.DRY_RUN != 'true') {
+            sh """
+                . \${HOME}/.profile
+                ${command}
+            """
+        } else {
+            echo "${command}"
+        }
     }
 }
diff --git a/jjb/nsm/e2e.Jenkinsfile b/jjb/nsm/e2e.Jenkinsfile
index 04f7f36..9d23cdc 100644
--- a/jjb/nsm/e2e.Jenkinsfile
+++ b/jjb/nsm/e2e.Jenkinsfile
@@ -1,3 +1,18 @@
+/*
+Copyright (c) 2022 Nordix Foundation
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
 import org.jenkinsci.plugins.pipeline.modeldefinition.Utils
 
 node('nordix-nsm-build-ubuntu1804') {
@@ -16,6 +31,8 @@
         def ip_family = params.IP_FAMILY
         def number_of_workers = params.NUMBER_OF_WORKERS
         def environment_name = params.ENVIRONMENT_NAME
+        def focus = params.FOCUS
+        def skip = params.SKIP
 
         def seed = params.SEED
 
@@ -36,8 +53,9 @@
             stage('Environment') {
                 currentBuild.description = "Meridio version: $meridio_version / TAPA version: $tapa_version / NSM version: $nsm_version / IP Family: $ip_family / Kubernetes version: $kubernetes_version / Current Branch: $current_branch / Seed: $seed"
 
+                def command = "make -s -C test/e2e/environment/$environment_name/ KUBERNETES_VERSION=$kubernetes_version NSM_VERSION=$nsm_version IP_FAMILY=$ip_family KUBERNETES_WORKERS=$number_of_workers MERIDIO_VERSION=$meridio_version TAPA_VERSION=$tapa_version"
                 try {
-                    ExecSh("make -s -C test/e2e/environment/$environment_name/ KUBERNETES_VERSION=$kubernetes_version NSM_VERSION=$nsm_version KUBERNETES_IP_FAMILY=$ip_family KUBERNETES_WORKERS=$number_of_workers").call()
+                    ExecSh(command).call()
                 } catch (Exception e) {
                     unstable 'Environment setup failed'
                     currentBuild.result = 'FAILURE'
@@ -45,8 +63,10 @@
             }
             stage('E2E') {
                 if (currentBuild.result != 'FAILURE') {
+                    def command = "make e2e E2E_PARAMETERS=\"\$(cat ./test/e2e/environment/$environment_name/$ip_family/config.txt | tr '\\n' ' ')\" E2E_SEED=$seed E2E_FOCUS=\"$focus\" E2E_SKIP=\"$skip\""
                     try {
-                        ExecSh("make e2e E2E_PARAMETERS=\"\$(cat ./test/e2e/environment/$environment_name/$ip_family/config.txt | tr '\\n' ' ')\" E2E_SEED=$seed").call()
+                        ExecSh(command).call()
+                        currentBuild.result = 'SUCCESS'
                     } catch (Exception e) {
                         unstable 'E2E Tests failed'
                         currentBuild.result = 'FAILURE'
@@ -64,7 +84,11 @@
             }
         }
         stage('Next') {
-            Next(next, number_of_workers, environment_name).call()
+            if (next == true && currentBuild.result != 'ABORTED') {
+                Next(next, number_of_workers, environment_name, focus, skip, current_branch).call()
+            } else {
+                Utils.markStageSkippedForConditional('Next')
+            }
         }
         stage('Cleanup') {
             Cleanup()
@@ -72,17 +96,16 @@
     }
 }
 
-def Next(next, number_of_workers, environment_name) {
-    if (next == 'true') {
-        return {
-            def meridio_version = GetMeridioVersion()
-            def tapa_version = GetTAPAVersion()
-            def nsm_version = GetNSMVersion()
-            def kubernetes_version = GetKubernetesVersion()
-            def ip_family = GetIPFamily()
-            def seed = GetSeed()
-            echo "Meridio version: $meridio_version / TAPA version: $tapa_version / NSM version: $nsm_version / IP Family: $ip_family / Kubernetes version: $kubernetes_version / Seed: $seed"
-            build job: 'meridio-e2e-test-kind', parameters: [
+def Next(next, number_of_workers, environment_name, focus, skip, current_branch) {
+    return {
+        def meridio_version = GetMeridioVersion()
+        def tapa_version = GetTAPAVersion()
+        def nsm_version = GetNSMVersion()
+        def kubernetes_version = GetKubernetesVersion()
+        def ip_family = GetIPFamily()
+        def seed = GetSeed()
+        echo "Meridio version: $meridio_version / TAPA version: $tapa_version / NSM version: $nsm_version / IP Family: $ip_family / Kubernetes version: $kubernetes_version / Seed: $seed"
+        build job: 'meridio-e2e-test-kind', parameters: [
                 string(name: 'NEXT', value: 'true'),
                 string(name: 'MERIDIO_VERSION', value: "$meridio_version"),
                 string(name: 'TAPA_VERSION', value: "$tapa_version"),
@@ -91,13 +114,12 @@
                 string(name: 'IP_FAMILY', value: "$ip_family"),
                 string(name: 'NUMBER_OF_WORKERS', value: "$number_of_workers"),
                 string(name: 'ENVIRONMENT_NAME', value: "$environment_name"),
-                string(name: 'SEED', value: "$seed")
+                string(name: 'SEED', value: "$seed"),
+                string(name: 'FOCUS', value: "$focus"),
+                string(name: 'SKIP', value: "$skip"),
+                string(name: 'CURRENT_BRANCH', value: "$current_branch"),
+                string(name: 'DRY_RUN', value: env.DRY_RUN)
             ], wait: false
-        }
-    } else {
-        return {
-            Utils.markStageSkippedForConditional('Next')
-        }
     }
 }
 
@@ -148,7 +170,7 @@
         def success = ''
         try {
             success = sh(script: """
-            data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,999\\}&pretty=true")
+            data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,1000\\}&pretty=true")
             success=\$(echo \"\$data\" | jq -r '.allBuilds[] | select(.result == \"SUCCESS\") | [.description] | @tsv' | grep -v \"^\$\")
             echo \$success
             """, returnStdout: true).trim()
@@ -158,7 +180,7 @@
         def failure = ''
         try {
             failure = sh(script: """
-            data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,999\\}&pretty=true")
+            data=\$(curl -s -L "http://$jenkins_url/job/meridio-e2e-test-kind/api/json?tree=allBuilds\\[status,timestamp,id,result,description\\]\\{0,1000\\}&pretty=true")
             failure=\$(echo \"\$data\" | jq -r '.allBuilds[] | select(.result == \"FAILURE\") | [.description] | @tsv' | grep -v \"^\$\")
             echo \$failure
             """, returnStdout: true).trim()
@@ -170,6 +192,11 @@
         ReportNSM(success, failure).call()
         ReportIPFamily(success, failure).call()
         ReportKubernetes(success, failure).call()
+
+        try {
+            archiveArtifacts artifacts: '_output/*', followSymlinks: false
+        } catch (Exception e) {
+        }
     }
 }
 
@@ -180,7 +207,7 @@
         def meridio = sh(script: "echo \"$meridio_success\\n$meridio_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
         def formatted = sh(script: "echo \"$meridio\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3  }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
         echo "Meridio: $formatted"
-        def meridio_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-meridio', subject: 'Meridio', color: '#0B1F67', status: "$formatted")
+        badge('meridio-e2e-kind-meridio', 'Meridio', formatted)
     }
 }
 
@@ -191,7 +218,7 @@
         def tapa = sh(script: "echo \"$tapa_success\\n$tapa_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
         def formatted = sh(script: "echo \"$tapa\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3  }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
         echo "TAPA: $formatted"
-        def tapa_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-tapa', subject: 'TAPA', color: '#0B1F67', status: "$formatted")
+        badge('meridio-e2e-kind-tapa', 'TAPA', formatted)
     }
 }
 
@@ -202,7 +229,7 @@
         def nsm = sh(script: "echo \"$nsm_success\\n$nsm_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
         def formatted = sh(script: "echo \"$nsm\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3  }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
         echo "NSM: $formatted"
-        def nsm_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-nsm', subject: 'NSM', color: '#0B1F67', status: "$formatted")
+        badge('meridio-e2e-kind-nsm', 'NSM', formatted)
     }
 }
 
@@ -213,7 +240,7 @@
         def ip_family = sh(script: "echo \"$ip_family_success\\n$ip_family_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
         def formatted = sh(script: "echo \"$ip_family\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3  }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
         echo "IP Family: $formatted"
-        def ip_family_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-ip-family', subject: 'IP Family', color: '#0B1F67', status: "$formatted")
+        badge('meridio-e2e-kind-ip-family', 'IP Family', formatted)
     }
 }
 
@@ -224,10 +251,23 @@
         def kubernetes = sh(script: "echo \"$kubernetes_success\\n$kubernetes_failure\" | grep -v '^\$' | awk '{ success[\$1] += \$2 ; failure[\$1] += \$3 } END { for(elem in success) print elem, success[elem], failure[elem] }' | sort -k1", returnStdout: true).trim()
         def formatted = sh(script: "echo \"$kubernetes\" | awk '{ printf \"%s (✅ %s / ❌ %s)\\n\", \$1, \$2, \$3  }' | sed ':a;N;\$!ba;s/\\n/ | /g'", returnStdout: true).trim()
         echo "Kubernetes: $formatted"
-        def kubernetes_badge = addEmbeddableBadgeConfiguration(id: 'meridio-e2e-kind-kubernetes', subject: 'Kubernetes', color: '#0B1F67', status: "$formatted")
+        badge('meridio-e2e-kind-kubernetes', 'Kubernetes', formatted)
     }
 }
 
+def badge(id, subject, message) {
+    addEmbeddableBadgeConfiguration(id: "${id}", subject: "${subject}", color: '#0B1F67', status: "$message")
+    sh """
+    mkdir -p _output
+    echo '{' >> _output/${id}.json
+    echo '"schemaVersion": 1,' >> _output/${id}.json
+    echo '"label": "${subject}",' >> _output/${id}.json
+    echo '"message": "${message}",' >> _output/${id}.json
+    echo '"color": "#0B1F67"' >> _output/${id}.json
+    echo '}' >> _output/${id}.json
+    """
+}
+
 // Raise error in Jenkins job
 def Error(e) {
     return {
@@ -238,16 +278,21 @@
 
 // Cleanup directory and kind cluster
 def Cleanup() {
-    ExecSh('make -s -C docs/demo/scripts/kind/ clean').call()
+    def command = 'make -s -C docs/demo/scripts/kind/ clean'
+    ExecSh(command).call()
     cleanWs()
 }
 
 // Execute command
 def ExecSh(command) {
     return {
-        sh """
-            . \${HOME}/.profile
-            ${command}
-        """
+        if (env.DRY_RUN != 'true') {
+            sh """
+                . \${HOME}/.profile
+                ${command}
+            """
+        } else {
+            echo "${command}"
+        }
     }
 }
diff --git a/jjb/nsm/meridio-e2e-test-kind.yaml b/jjb/nsm/meridio-e2e-test-kind.yaml
index 7af3660..cf877b7 100644
--- a/jjb/nsm/meridio-e2e-test-kind.yaml
+++ b/jjb/nsm/meridio-e2e-test-kind.yaml
@@ -57,9 +57,9 @@
           name: DEFAULT_BRANCH
           default: "master"
           description: default branch
-      - string:
+      - bool:
           name: NEXT
-          default: 'false'
+          default: false
           description: Does the job run has to call for a next run?
       - string:
           name: MERIDIO_VERSION
@@ -87,12 +87,24 @@
           description: Number of Kubernetes Workers
       - string:
           name: ENVIRONMENT_NAME
-          default: "kind-helm"
+          default: "kind-operator"
           description: Name of the environment (under test/e2e/environment directory in Meridio)
       - string:
           name: SEED
           default: "1"
           description: Order in which the tests are running
+      - string:
+          name: SKIP
+          default: ""
+          description: e2e tests to skip
+      - string:
+          name: FOCUS
+          default: ""
+          description: e2e tests to focus
+      - bool:
+          name: DRY_RUN
+          default: false
+          description: Dry Run
 
     dsl: 
       !include-raw-escape: e2e.Jenkinsfile
diff --git a/jjb/nsm/meridio-periodic-security-scan.yaml b/jjb/nsm/meridio-periodic-security-scan.yaml
index 9cf718f..30820d0 100644
--- a/jjb/nsm/meridio-periodic-security-scan.yaml
+++ b/jjb/nsm/meridio-periodic-security-scan.yaml
@@ -63,8 +63,12 @@
           description: Recipients of the report
       - string:
           name: IMAGE_NAMES
-          default: 'stateless-lb proxy tapa ipam nsp frontend'
+          default: 'stateless-lb proxy tapa ipam nsp frontend operator'
           description: Images to compile
+      - bool:
+          name: DRY_RUN
+          default: false
+          description: Dry Run
 
     triggers:
       - timed: '@midnight'
diff --git a/jjb/nsm/meridio-periodic.yaml b/jjb/nsm/meridio-periodic.yaml
index 631f5fd..4acefe3 100644
--- a/jjb/nsm/meridio-periodic.yaml
+++ b/jjb/nsm/meridio-periodic.yaml
@@ -53,7 +53,7 @@
           description: JJB configured PROJECT parameter to identify a Nordix GitHub project
       - string:
           name: IMAGE_NAMES
-          default: 'stateless-lb proxy tapa ipam nsp example-target frontend'
+          default: 'stateless-lb proxy tapa ipam nsp example-target frontend operator'
           description: Images to compile
       - string:
           name: IMAGE_VERSION
@@ -83,6 +83,10 @@
           name: IMAGE_REGISTRY
           default: 'registry.nordix.org/cloud-native/meridio'
           description: Meridio image regsitry
+      - bool:
+          name: DRY_RUN
+          default: false
+          description: Dry Run
 
     triggers:
       - pollscm:
diff --git a/jjb/nsm/meridio-pull-request.yaml b/jjb/nsm/meridio-pull-request.yaml
index 40cd3b1..9dd3301 100644
--- a/jjb/nsm/meridio-pull-request.yaml
+++ b/jjb/nsm/meridio-pull-request.yaml
@@ -54,7 +54,7 @@
           description: JJB configured PROJECT parameter to identify a Nordix GitHub project
       - string:
           name: IMAGE_NAMES
-          default: 'stateless-lb proxy tapa ipam nsp example-target frontend'
+          default: 'stateless-lb proxy tapa ipam nsp example-target frontend operator'
           description: Images to compile
       - string:
           name: IMAGE_VERSION
@@ -84,6 +84,10 @@
           name: IMAGE_REGISTRY
           default: 'registry.nordix.org/cloud-native/meridio'
           description: Meridio image regsitry
+      - bool:
+          name: DRY_RUN
+          default: false
+          description: Dry Run
 
     # https://opendev.org/jjb/jenkins-job-builder/src/commit/be422af6bb5edc32886a98d78340051f71244c41/jenkins_jobs/modules/triggers.py#L1235
     triggers: