Merge "remove Infra Engine jobs"
authorAndrew Fenner <Andrew.Fenner@est.tech>
Tue, 17 Jan 2023 16:09:32 +0000 (16:09 +0000)
committerNordix Gerrit <gerrit@nordix.org>
Tue, 17 Jan 2023 16:09:32 +0000 (16:09 +0000)
13 files changed:
jjb/metal3/job_capm3_e2e_integration_tests.yml [new file with mode: 0644]
jjb/metal3/job_capm3_e2e_tests.yml
jjb/metal3/job_capm3_main_e2e_ephemeral_tests.yml
jjb/metal3/job_capm3_main_e2e_tests.yml
jjb/metal3/job_feature_tests.yml
jjb/metal3/job_feature_tests_upgrade.yml
jjb/metal3/job_keep_capm3_e2e_tests.yml
jjb/metal3/job_openstack_image_building.yml
jjb/metal3/projects.yml
jjb/nsm/e2e-long-run.Jenkinsfile [new file with mode: 0644]
jjb/nsm/meridio-e2e-long-run-test-kind.yaml [new file with mode: 0644]
jjb/nsm/meridio-e2e-test-kind.yaml
jjb/onap/sdc-sdc-be-common/sdc-sdc-be-common-verify-jobs.yaml

diff --git a/jjb/metal3/job_capm3_e2e_integration_tests.yml b/jjb/metal3/job_capm3_e2e_integration_tests.yml
new file mode 100644 (file)
index 0000000..ea70ede
--- /dev/null
@@ -0,0 +1,128 @@
+---
+#
+# ============LICENSE_START=======================================================
+#  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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+# Description:
+# ============
+# This file contains job template definition for Cluster API Provider Metal3 (CAPM3) e2e integration tests.
+# This job can be triggered manually or through a Github pull request. It creates a
+# pipeline job. The pipeline scripts are maintained in Metal3 CI project infra repository.
+
+- job-template:
+    id: capm3_e2e_integration_tests
+    name: '{job_prefix}_{proj}_e2e_integration_test_{image_os}'
+    description: "CAPM3 e2e integration tests for {org}/{repo} on {image_os}."
+    project-type: pipeline
+    defaults: global
+    disabled: False
+    concurrent: True
+    parameters:
+    - string:
+        name: PROJECT_REPO_ORG
+        default: '{org}'
+        description: 'Project github repo org name'
+    - string:
+        name: PROJECT_REPO_NAME
+        default: '{repo}'
+        description: 'Project github repo name'
+    - string:
+        name: ghprbActualCommit
+        default: 'main'
+        description: 'CI Repo branch for triggering manual build'
+    - string:
+        name: ghprbAuthorRepoGitUrl
+        default: 'https://github.com/{org}/{repo}.git'
+        description: 'CI Repo URL for triggering manual build'
+    - string:
+        name: ghprbTargetBranch
+        default: 'main'
+        description: 'Target branch of the PR'
+    - string:
+        name: IMAGE_OS
+        default: '{image_os}'
+        description: 'Distribution to use for the target host as well as source and target cluster. Can be ubuntu or centos'
+    - string:
+        name: capm3_release_branch
+        default: 'main'
+        description: 'The target branch of CAPM3 to be used for this test'
+    - string:
+        name: CAPI_VERSION
+        default: 'v1beta1'
+        description: 'Cluster API version. E.g. v1beta1.'
+    - string:
+        name: CAPM3_VERSION
+        default: 'v1beta1'
+        description: 'Cluster API provider Metal3 version. E.g. v1beta1.'
+    - string:
+        name: TARGET_NODE_MEMORY
+        default: 4096
+        description: 'RAM size of the target host.'
+    - string:
+        name: TESTS_FOR
+        default: "e2e_tests"
+        description: 'Tests using the e2e framework.'
+    - string:
+        name: GINKGO_FOCUS
+        default: "integration"
+        description: 'Select the e2e integration test'
+
+    properties:
+    - build-discarder:
+        days-to-keep: 30
+        num-to-keep: 300
+        artifact-days-to-keep: -1
+        artifact-num-to-keep: -1
+    - github:
+        url: https://github.com/{org}/{repo}
+
+    triggers:
+    - github-pull-request:
+        admin-list:
+          - '{ci_github_admin_user}'
+        org-list: "{ci_github_whitelist_org}"
+        cron: 'H/5 * * * *'
+        auth-id: "{ci_ghprb_auth_id}"
+        trigger-phrase: '((.|\n)*\s)?/test-{image_os}-integration-e2e-main(\s(.|\n)*)?'
+        skip-build-phrase: '/skip-test'
+        only-trigger-phrase: True
+        github-hooks: True
+        permit-all: False
+        auto-close-on-fail: False
+        allow-whitelist-orgs-as-admins: True
+        white-list-target-branches:
+          - 'main'
+        status-context: "test-{image_os}-integration-e2e-main"
+        success-status: "Passed"
+        failure-status: "Failed"
+        error-status: "Error"
+        cancel-builds-on-update: True
+    pipeline-scm:
+      scm:
+      - git:
+          url: "{ci_github_repo}"
+          credentials-id: "{ci_github_jenkins_credentials_id}"
+          branches:
+            - '{branch|main}'
+          name: 'origin'
+          refspec: '+refs/heads/*:refs/remotes/origin/*'
+          wipe-workspace: True
+          honor-refspec: True
+          shallow-clone: False
+      script-path: "{ci_github_pipeline}"
+      lightweight-checkout: False
index b74841bf4fe7d5563e727196e4a9557b495660f3..b169e3c79834c73afe9c67c9b18bf9e4406ce156 100644 (file)
         name: TESTS_FOR
         default: "e2e_tests"
         description: 'Tests using the e2e framework.'
-
+    - string:
+        name: GINKGO_SKIP
+        default: "upgrade integration"
+        description: 'Skip non feature e2e test'
+        
     properties:
     - build-discarder:
         days-to-keep: 30
index 2b516871ae057036a260d550a4a0024b3867cbc9..36e2f93aed246eb22b8857c0af20e41ff546bb57 100644 (file)
         name: EPHEMERAL_TEST
         default: True
         description: 'Select the e2e test in ephemeral cluster'
+    - string:
+        name: GINKGO_SKIP
+        default: "upgrade integration"
+        description: 'Skip non feature e2e test'
 
     properties:
     - build-discarder:
index 40755f4c38f311b71cb296578c7110c89cc7aaa7..ed9f09d2bfd3a1b0bbc304d45a02220da5bace3e 100644 (file)
         name: TESTS_FOR
         default: "e2e_tests"
         description: 'Tests using the e2e framework.'
-
+    - string:
+        name: GINKGO_SKIP
+        default: "upgrade integration"
+        description: 'Skip non feature e2e test'
+        
     properties:
     - build-discarder:
         days-to-keep: 30
index 455d933681a7aea876384d7c7b0295ba58886482..89508fb9d78cdbdbac1aebca1a50516e117b8f7b 100644 (file)
         allow-whitelist-orgs-as-admins: True
         white-list-target-branches:
           - 'main'
+          - 'release-1.3'
           - 'release-1.2'
           - 'release-1.1'
-          - 'release-0.5'
-          - 'release-0.1'
         status-context: "test-features-{image_os}"
         success-status: "Passed"
         failure-status: "Failed"
index 11a3968f6c25ab19a06b7ea421e649b8add892e1..b17cfd4ca9c1b265663fae10393e0bf69df58e46 100644 (file)
         allow-whitelist-orgs-as-admins: True
         white-list-target-branches:
           - 'main'
+          - 'release-1.3'
           - 'release-1.2'
           - 'release-1.1'
           - 'release-0.5'
index 5a55058a1c65592da74abf88ac211a285b84161c..5d80035ab44bfe62faefb7c32e3bcb9b0dda3dfa 100644 (file)
         name: SKIP_DELETION
         default: 'true'
         description: 'Whether tester VM should be deleted or not by the end of the test'
+    - string:
+        name: GINKGO_SKIP
+        default: "upgrade integration"
+        description: 'Skip non feature e2e test'
 
     properties:
     - build-discarder:
index aa231183af7c3f99d62e3929884fe6ee600da29e..8c2791dabb24d070c1f6c584d77e340028f61263 100644 (file)
@@ -50,7 +50,7 @@
         artifact-num-to-keep: -1
 
     triggers:
-    - timed: "@midnight"
+    - timed: "0 5 */10 * *"
 
     pipeline-scm:
       scm:
index d54960bd4a7b78313da0c5d1a70bb801f8b3aa47..b01b4284ed1b599a7b1f86e5feb9a5ade06e6854 100644 (file)
           capm3_release_branch: main
           target_branches:
             - 'main'
+      - release-1-3:
+          capi_version: v1beta1
+          capm3_version: v1beta1
+          capm3_release_branch: release-1.3
+          target_branches:
+            - 'main'
+            - 'release-1.3'
       - release-1-2:
           capi_version: v1beta1
           capm3_version: v1beta1
           target_branches:
             - 'main'
             - 'release-1.1'
-      - release-0-5:
-          capi_version: v1alpha4
-          capm3_version: v1alpha5
-          capm3_release_branch: release-0.5
-          target_branches:
-            - 'main'
-            - 'release-0.5'
-            - 'release-0.1'
     exclude:
       - proj: ironic_ipa_downloader
         image_os: centos
-        capm3_target_branch: release-0-5
+        capm3_target_branch: release-1-1
     jobs:
       - integration_tests
 
           capm3_release_branch: main
           target_branches:
             - 'main'
+      - release-1-3:
+          capi_version: v1beta1
+          capm3_version: v1beta1
+          capm3_release_branch: release-1.3
+          target_branches:
+            - 'main'
+            - 'release-1.3'
       - release-1-2:
           capi_version: v1beta1
           capm3_version: v1beta1
           target_branches:
             - 'main'
             - 'release-1.1'
-      - release-0-5:
-          capi_version: v1alpha4
-          capm3_version: v1alpha5
-          capm3_release_branch: release-0.5
-          target_branches:
-            - 'main'
-            - 'release-0.5'
-            - 'release-0.1'
     jobs:
       - keep_integration_tests
 
                 capm3_version: v1beta1
                 capm3_release_branch: main
                 schedule: "H 4 * * *"
+            - release-1-3:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_release_branch: release-1.3
+                schedule: "30 4 * * *"
             - release-1-2:
                 capi_version: v1beta1
                 capm3_version: v1beta1
                 capm3_version: v1beta1
                 capm3_release_branch: release-1.1
                 schedule: "30 4 * * *"
-            - release-0-5:
-                capi_version: v1alpha4
-                capm3_version: v1alpha5
-                capm3_release_branch: release-0.5
-                schedule: "30 4 * * *"
 
 - project:
     name: bml-tests
           capm3_release_branch: main
           target_branches:
             - 'main'
+      - release-1-3:
+          capi_version: v1beta1
+          capm3_version: v1beta1
+          capm3_release_branch: release-1.3
+          target_branches:
+            - 'release-1.3'
       - release-1-2:
           capi_version: v1beta1
           capm3_version: v1beta1
           capm3_release_branch: release-1.1
           target_branches:
             - 'release-1.1'
-      - release-0-5:
-          capi_version: v1alpha4
-          capm3_version: v1alpha5
-          capm3_release_branch: release-0.5
-          target_branches:
-            - 'release-0.5'
     jobs:
       - capm3_e2e_upgrade_tests:
           exclude:
             - image_os: centos
+      - capm3_e2e_integration_tests:
       - capm3_e2e_tests_parallel:
-          exclude:
-            - capm3_target_branch:
-              - release-0-5
       - capm3_e2e_tests:
       - keep_capm3_e2e_tests:
 
                 capm3_branch: main
                 capm3_release_branch: main
                 schedule: "H 20 * * *"
+            - release-1-3:
+                capi_version: v1beta1
+                capm3_version: v1beta1
+                capm3_branch: release-1.3
+                capm3_release_branch: release-1.3
+                schedule: "H 23 * * *"
             - release-1-2:
                 capi_version: v1beta1
                 capm3_version: v1beta1
                 capm3_branch: release-1.1
                 capm3_release_branch: release-1.1
                 schedule: "H 23 * * *"
-            - release-0-5:
-                capi_version: v1alpha4
-                capm3_version: v1alpha5
-                capm3_branch: release-0.5
-                capm3_release_branch: release-0.5
-                schedule: "H 23 * * *"
-
 
 - project:
     name: 'ironic_image_build_tests'
diff --git a/jjb/nsm/e2e-long-run.Jenkinsfile b/jjb/nsm/e2e-long-run.Jenkinsfile
new file mode 100644 (file)
index 0000000..5090c31
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+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-ubuntu2204') {
+    build_number = env.BUILD_NUMBER
+    workspace = env.WORKSPACE
+    ws("${workspace}/${build_number}") {
+        def git_project = params.GIT_PROJECT
+        def current_branch = params.CURRENT_BRANCH
+        def default_branch = params.DEFAULT_BRANCH
+
+        def meridio_version = params.MERIDIO_VERSION
+        def tapa_version = params.TAPA_VERSION
+        def kubernetes_version = params.KUBERNETES_VERSION
+        def nsm_version = params.NSM_VERSION
+        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 number_of_runs = params.NUMBER_OF_RUNS
+        def interval = params.INTERVAL
+
+        stage('Clone/Checkout') {
+            git branch: default_branch, url: git_project
+            checkout([
+                $class: 'GitSCM',
+                branches: [[name: current_branch]],
+                extensions: [],
+                userRemoteConfigs: [[
+                    refspec: '+refs/pull/*/head:refs/remotes/origin/pr/*',
+                    url: git_project
+                ]]
+            ])
+            sh 'git show'
+        }
+        timeout(30) {
+            stage('Environment') {
+                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(command).call()
+                } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException e) {
+                    currentBuild.result = 'ABORTED'
+                } catch (Exception e) {
+                    unstable 'Environment setup failed'
+                    currentBuild.result = 'FAILURE'
+                }
+            }
+        }
+        stage('E2E List') {
+            E2EList(number_of_runs, interval, environment_name, ip_family, focus, skip).call()
+        }
+        stage('Cleanup') {
+            Cleanup()
+        }
+    }
+}
+
+// Creates the list of e2e to run during this job
+def E2EList(number_of_runs, interval, environment_name, ip_family, focus, skip) {
+    return {
+        def stages = [:]
+        def list = sh(script: "seq -w 1 $number_of_runs | paste -sd ' ' -", returnStdout: true).trim().split(' ')
+        def previous = '0'
+        env.E2E_PREVIOUSLY_EXECUTED = previous
+        for (i in list) {
+            stages.put("$i", E2E(i, previous, interval, environment_name, ip_family, focus, skip))
+            previous = i
+        }
+        parallel(stages)
+    }
+}
+
+// Run e2e
+def E2E(id, previous_id, interval, environment_name, ip_family, focus, skip) {
+    return {
+        stage('Wait for previous') {
+            waitUntil(initialRecurrencePeriod: 15000, quiet: true) {
+                return env.E2E_PREVIOUSLY_EXECUTED == previous_id
+            }
+        }
+        if (previous_id != '0') {
+            stage("Wait $interval seconds") {
+                sh "sleep $interval"
+            }
+        }
+        stage('E2E') {
+            def command = "make e2e E2E_ENVIRONMENT=\"$environment_name\" E2E_IP_FAMILY=\"$ip_family\" E2E_FOCUS=\"$focus\" E2E_SKIP=\"$skip\""
+            try {
+                ExecSh(command).call()
+            } catch (Exception e) {
+                unstable 'Failing e2e'
+            }
+        }
+        env.E2E_PREVIOUSLY_EXECUTED = id
+    }
+}
+
+// Raise error in Jenkins job
+def Error(e) {
+    return {
+        Cleanup()
+        error e
+    }
+}
+
+// Cleanup directory and kind cluster
+def Cleanup() {
+    def command = 'make -s -C docs/demo/scripts/kind/ clean'
+    ExecSh(command).call()
+    cleanWs()
+}
+
+// Execute command
+def ExecSh(command) {
+    return {
+        if (env.DRY_RUN != 'true') {
+            sh """
+                . \${HOME}/.profile
+                ${command}
+            """
+        } else {
+            echo "${command}"
+        }
+    }
+}
diff --git a/jjb/nsm/meridio-e2e-long-run-test-kind.yaml b/jjb/nsm/meridio-e2e-long-run-test-kind.yaml
new file mode 100644 (file)
index 0000000..70884c5
--- /dev/null
@@ -0,0 +1,110 @@
+---
+# ============LICENSE_START=======================================================
+#  Copyright (C) 2021 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.
+#
+# SPDX-License-Identifier: Apache-2.0
+# ============LICENSE_END=========================================================
+
+- project:
+    name: 'meridio-e2e-long-run-test-kind'
+
+    project: 'meridio-e2e-long-run-test-kind'
+
+    jobs:
+      - 'meridio-e2e-long-run-test-kind'
+
+- job-template:
+    name: 'meridio-e2e-long-run-test-kind'
+    project-type: pipeline
+    disabled: '{obj:disabled}'
+
+    concurrent: false
+
+    properties:
+      - github:
+          url: https://github.com/Nordix/Meridio-Operator
+
+    parameters:
+      - string:
+          name: GITHUB_ORGANIZATION
+          default: 'Nordix'
+          description: GitHub Organization
+      - string:
+          name: PROJECT
+          default: 'Meridio'
+          description: GitHub project
+      - string:
+          name: GIT_PROJECT
+          default: "https://github.com/$GITHUB_ORGANIZATION/$PROJECT.git"
+          description: Git URL of the project
+      - string:
+          name: CURRENT_BRANCH
+          default: "master"
+          description: Current Git branch
+      - string:
+          name: DEFAULT_BRANCH
+          default: "master"
+          description: default branch
+      - string:
+          name: MERIDIO_VERSION
+          default: 'latest'
+          description: Version of Meridio
+      - string:
+          name: TAPA_VERSION
+          default: 'latest'
+          description: Version of Meridio TAPA
+      - string:
+          name: KUBERNETES_VERSION
+          default: 'v1.25'
+          description: Version of Kubernetes
+      - string:
+          name: NSM_VERSION
+          default: 'v1.6.0'
+          description: Version of NSM
+      - string:
+          name: IP_FAMILY
+          default: 'dualstack'
+          description: IP Family
+      - string:
+          name: NUMBER_OF_WORKERS
+          default: "2"
+          description: Number of Kubernetes Workers
+      - string:
+          name: ENVIRONMENT_NAME
+          default: "kind-operator"
+          description: Name of the environment (under test/e2e/environment directory in Meridio)
+      - string:
+          name: SKIP
+          default: ""
+          description: e2e tests to skip
+      - string:
+          name: FOCUS
+          default: ""
+          description: e2e tests to focus
+      - string:
+          name: NUMBER_OF_RUNS
+          default: "100"
+          description: Number of e2e runs
+      - string:
+          name: INTERVAL
+          default: "7200"
+          description: Interval between each e2e test run (in seconds)
+      - bool:
+          name: DRY_RUN
+          default: false
+          description: Dry Run
+
+    dsl: 
+      !include-raw-escape: e2e-long-run.Jenkinsfile
index cf877b7f9ba18ad45c84ebc81768c1b74ed064b5..de9483de25e98d7b441cd64b68f638594b1dc669 100644 (file)
     properties:
       - github:
           url: https://github.com/Nordix/Meridio-Operator
+      - build-discarder:
+          days-to-keep: 60
+          num-to-keep: 2000
+          artifact-days-to-keep: 60
+          artifact-num-to-keep: 2000
+
 
     parameters:
       - string:
index d7554a324f339f00e4f3494b69c17686cba2a372..e90ab92ea27d6d6ff0b0ce826c1d36d3255f4c79 100644 (file)
@@ -28,7 +28,7 @@
     stream:
       - 'master':
           branch: '{stream}'
-          jdk-version: java-8
+          jdk-version: java-11
 
     jobs:
-      - 'onap-{project-name}-{stream}-verify-java'
\ No newline at end of file
+      - 'onap-{project-name}-{stream}-verify-java'