JIRA: AEGIS-458 Create xtesting package job for onap-verify 90/9690/1
authorAkash Rajguru <akash.rajguru@est.tech>
Wed, 21 Jul 2021 09:52:39 +0000 (10:52 +0100)
committerAkash Rajguru <akash.rajguru@est.tech>
Wed, 21 Jul 2021 09:52:39 +0000 (10:52 +0100)
* Converted onap-verify-package job to MultiJob
* MultiJop phases are onap packaging and test packaging
Change-Id: I2d3440a27bfdb730a66fd56f1a7cb3a4e1dea68c

jjb/cloud-infra/onap-jobs/onap-verify-package.yaml
jjb/cloud-infra/scripts/test-package.sh

index 5a8cbe54239bffc28dae95b31d8783c3e8ffe61c..b9f68c503dfb2f43068fdf82416eb979908b5694 100644 (file)
@@ -1,6 +1,6 @@
 ---
 # ============LICENSE_START=======================================================
-#  Copyright (C) 2019 Nordix Foundation.
+#  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.
@@ -22,7 +22,6 @@
 
     project: 'onap-verify-package'
 
-
     stream:
       - 'master':
           branch: '{stream}'
@@ -68,7 +67,6 @@
           unstable: false
           notbuilt: false
           deploy-scenario: 'onap-full-nofeature'
-
     distro:
       - ubuntu1804
 
 
     jobs:
       - 'onap-verify-package-{distro}-{stream}'
+      - 'onap-verify-packaging-{distro}-{stream}'
+      - 'onap-verify-test-packaging-{distro}-{stream}'
 
 - job-template:
     name: 'onap-verify-package-{distro}-{stream}'
 
+    project-type: multijob
+
     disabled: '{obj:disabled}'
 
     concurrent: true
           name: DEPLOY_SCENARIO
           default: '{deploy-scenario}'
           description: 'Scenario to test change with.'
-      - string:
-          name: EXECUTION_MODE
-          default: '{execution-mode}'
-          description: 'Engine execution mode - packaging'
       - string:
           name: CONTAINER_TOOL
           default: '{container-tool}'
                 #!/bin/bash
                 sudo chown -R $USER:$USER $WORKSPACE || exit 1
 
-
     builders:
       - 'generate-change-metadata-macro'
       - inject:
           properties-file: "$WORKSPACE/change.properties"
       - 'generate-ssh-keypair-macro'
       - 'wait-pkg-mgr-macro'
+      - multijob:
+          name: ONAP Framework Packaging
+          condition: SUCCESSFUL
+          execution-type: SEQUENTIALLY
+          projects:
+            - name: 'onap-verify-packaging-{distro}-{stream}'
+              current-parameters: true
+              git-revision: true
+              node-parameters: true
+              property-file: "$WORKSPACE/change.properties"
+              kill-phase-on: FAILURE
+              abort-all-job: true
+      - multijob:
+          name: Test Framework Packaging
+          condition: SUCCESSFUL
+          execution-type: SEQUENTIALLY
+          projects:
+            - name: 'onap-verify-test-packaging-{distro}-{stream}'
+              current-parameters: true
+              git-revision: true
+              node-parameters: true
+              property-file: "$WORKSPACE/change.properties"
+              kill-phase-on: FAILURE
+              abort-all-job: true
+
+- job-template:
+    name: 'onap-verify-packaging-{distro}-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    concurrent: false
+
+    parameters:
+      - string:
+          name: EXECUTION_MODE
+          default: 'packaging'
+          description: 'Execution mode to run engine'
+
+    properties:
+      - logrotate
+
+    wrappers:
+      - build-timeout:
+          timeout: 300
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: 'nordix-cicd-arm-credentials'
+              username: NORDIX_ARM_USERNAME
+              password: NORDIX_ARM_TOKEN
+      - mask-passwords
+      - fix-workspace-permissions
+
+    scm:
+      - git-scm-gerrit:
+            ssh-credentials-id: nordixinfra-nordix-gerrit-ssh
+            branch: $GERRIT_BRANCH
+            refspec: $GERRIT_REFSPEC
+            wipe_workspace: true
+            clean_before: false
+
+    builders:
       - 'package-macro'
       - 'upload-artifact-macro'
+
+- job-template:
+    name: 'onap-verify-test-packaging-{distro}-{stream}'
+
+    disabled: '{obj:disabled}'
+
+    concurrent: false
+
+    parameters:
+      - string:
+          name: EXECUTION_MODE
+          default: 'packaging'
+          description: 'Execution mode to run engine'
+
+    properties:
+      - logrotate
+
+    wrappers:
+      - build-timeout:
+          timeout: 30
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: 'nordix-cicd-arm-credentials'
+              username: NORDIX_ARM_USERNAME
+              password: NORDIX_ARM_TOKEN
+      - mask-passwords
+      - fix-workspace-permissions
+
+    scm:
+      - git:
+          url: https://gerrit.nordix.org/infra/test.git
+          branches:
+            - master
+          timeout: 15
+          wipe_workspace: true
+          clean_before: false
+
+    builders:
+      - 'test-package-macro'
+      - 'xtesting-upload-artifact-macro'
index 6361664b3f9713c31a87dc2a374ab72af34ae02f..8685c337d441b236c75bc3d8d82d23766a488749 100644 (file)
@@ -28,6 +28,7 @@ if [[ "$GERRIT_PROJECT" != "infra/test" ]]; then
   echo "Info : Cloning infra/engine repository"
   git clone -q https://gerrit.nordix.org/infra/test.git "$WORKSPACE"
   cd "$WORKSPACE"
+  export STACK_VERSION="$GERRIT_BRANCH"
 fi
 
 echo "Info  : Packaging test stack $STACK_TYPE"