engine: Create openstack release jobs
[infra/cicd.git] / jjb / cloud-infra / cloud-infra-periodic-onap.yaml
index 69e33a80e5e00920af31a3bfb1245a5c165f95ca..b967fc2d2f61e928790655dc42925b0ced3e974f 100644 (file)
 
     project: 'infra/engine'
 
+    cloud:
+      - city:
+          slave-label: 'engine-jumphost-online-ubuntu1804'
+          openrc-credentials-file: 'est-jenkins-openrcfile-city-frankfurt-onap'
+          daily-trigger: '@midnight'
+      - xerces:
+          slave-label: 'xerces-jumphost-ubuntu1804'
+          openrc-credentials-file: 'est-estinfra-openrcfile-xerces-lund-onap'
+          daily-trigger: '#@midnight'
+
     onap-branch:
-      - 'dublin':
+      - 'elalto':
           nordix-branch: master
-          onap-version: dublin
+          onap-version: elalto
           onap-flavor: full
           engine-version: master
           engine-refspec: master
+          deploy-scenario: 'onap-nofeature-noha'
           deploy-scenario-version: master
           deploy-scenario-refspec: master
-          disabled: false
+          disabled: true
           delete-stack: 'yes'
       - 'master':
           nordix-branch: master
           onap-flavor: full
           engine-version: master
           engine-refspec: master
+          deploy-scenario: 'onap-nofeature-noha'
           deploy-scenario-version: master
           deploy-scenario-refspec: master
-          disabled: false
-          delete-stack: 'no'
+          disabled: true
+          delete-stack: 'yes'
 
     distro:
       - ubuntu1804
 
-    deploy-scenario:
-      - onap-nofeature-noha
-
     ci-loop:
       - daily
 
           pod-name: est-cloud
           provisioner-type: heat
           installer-type: kubespray
-          slave-label: 'jumphost-onap-ubuntu1804'
 
     onap-other-phases:
       - onap-deploy:
           build-timeout: 210
-      - oom-healthcheck:
+      - oom-hc:
           build-timeout: 30
           test-type: oom-healthcheck
       - promote-onap:
-          build-timeout: 5
+          build-timeout: 240
 
     onap-healthcheck-phases:
       - onap-hc-core:
           test-type: onap-healthcheck
 
     jobs:
-      - '{deploy-scenario}-{onap-flavor}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
+      - 'onap-online-{onap-flavor}-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{onap-branch}'
       - '{onap-other-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
       - '{onap-healthcheck-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
 
 - job-template:
-    name: '{deploy-scenario}-{onap-flavor}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
+    name: 'onap-online-{onap-flavor}-{distro}-{installer-type}-{cloud}-{type}-{ci-loop}-{onap-branch}'
 
     project-type: multijob
 
     disabled: '{obj:disabled}'
 
-    concurrent: true
+    concurrent: false
 
     parameters:
       - project-parameters:
           project: '{project}'
           branch: '{nordix-branch}'
       - nordix-gerrit-parameters
-      - onap-parameter-macro
+      - onap-parameter-macro-legacy
+      - label:
+          name: SLAVE_LABEL
+          default: '{slave-label}'
+          description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
+      - string:
+          name: DISTRO
+          default: '{distro}'
+          description: 'Distribution to use for configuring target nodes (networking etc.)'
+      - string:
+          name: OPENSTACK_CLOUD_PROVIDER
+          default: '{cloud}'
+          description: 'Name of the cloud where this job is run'
       - string:
           name: ONAP_VERSION
           default: '{onap-version}'
       - string:
           name: STACK_NAME
           default: 'nordix-cicd-{deploy-scenario}-{onap-branch}-{onap-flavor}'
+      - string:
+          name: KEYPAIR_NAME
+          default: 'keypair-nordix-cicd-{deploy-scenario}-{onap-branch}-{onap-flavor}'
+      - string:
+          name: HEAT_ENVIRONMENT_FILENAME
+          default: "heat-environment-{cloud}-{distro}-full.yaml"
+          description: 'Type of the deployment'
       - string:
           name: ENGINE_VERSION
           default: '{engine-version}'
       - build-blocker:
           use-build-blocker: true
           blocking-jobs:
+            - 'cloud-infra-verify-engine-.*'
+            - 'cloud-infra-verify-scenario-.*'
             - 'cloud-infra-periodic-engine-.*'
             - 'onap-.*'
             - 'k8-.*'
+            - 'os-.*'
+            - 'nolabs-.*'
           block-level: 'NODE'
       - throttle:
           max-per-node: 1
-          max-total: 3
+          max-total: 1
           option: project
 
     wrappers:
       - credentials-binding:
           - file:
-              credential-id: est-jenkins-openrcfile-city-karlskrona-onap
+              credential-id: '{openrc-credentials-file}'
               variable: OPENRC_FILE
       - mask-passwords
       - build-timeout:
-          timeout: 300
+          timeout: 630
       - fix-workspace-permissions
       - openstack:
           single-use: True
 
     triggers:
-      - timed: '@midnight'
+      - timed: '{daily-trigger}'
 
     scm:
       - git-scm:
           description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
       - shell: |
           #!/bin/bash
-          cp $OPENRC_FILE /tmp/openrc
+          /bin/rm -rf /tmp/openrc && /bin/cp -f $OPENRC_FILE /tmp/openrc
       - multijob:
           name: Deploy ONAP using OOM
           condition: ALWAYS
               current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 ONAP_FLAVOR=$ONAP_FLAVOR
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               git-revision: true
               node-parameters: true
               kill-phase-on: NEVER
               current-parameters: false
               predefined-parameters: |
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 TEST_TYPE=oom-healthcheck
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_TYPE=onap-healthcheck
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_TYPE=onap-healthcheck
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_TYPE=onap-healthcheck
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_TYPE=onap-healthcheck
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
               predefined-parameters: |
                 SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 PROVISIONER_TYPE=$PROVISIONER_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 TEST_TYPE=onap-healthcheck
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 ENGINE_VERSION=$ENGINE_VERSION
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
             - name: 'promote-onap-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
               current-parameters: false
               predefined-parameters: |
+                SLAVE_LABEL=$SLAVE_LABEL
                 DISTRO=$DISTRO
+                OPENSTACK_CLOUD_PROVIDER=$OPENSTACK_CLOUD_PROVIDER
                 DEPLOY_TYPE=$DEPLOY_TYPE
                 INSTALLER_TYPE=$INSTALLER_TYPE
                 DEPLOY_SCENARIO=$DEPLOY_SCENARIO
                 ENGINE_REFSPEC=$ENGINE_REFSPEC
                 POD_NAME=$POD_NAME
                 STACK_NAME=$STACK_NAME
+                KEYPAIR_NAME=$KEYPAIR_NAME
+                HEAT_ENVIRONMENT_FILENAME=$HEAT_ENVIRONMENT_FILENAME
                 DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION
                 DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC
                 XTESTING_REPO_URL=$XTESTING_REPO_URL
                 ENGINE_ANSIBLE_PARAMS=$ENGINE_ANSIBLE_PARAMS
-                CLEANUP=$CLEANUP
               node-parameters: true
               kill-phase-on: NEVER
               abort-all-job: false
           project: '{project}'
           branch: '{nordix-branch}'
       - nordix-gerrit-parameters
-      - onap-parameter-macro
+      - onap-parameter-macro-legacy
+      - label:
+          name: SLAVE_LABEL
+          default: 'xerces-jumphost-onap-ubuntu1804'
+          description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
+      - string:
+          name: OPENSTACK_CLOUD_PROVIDER
+          default: 'city'
+          description: 'Name of the cloud where this job is run'
+      - string:
+          name: DISTRO
+          default: 'ubuntu1804'
+          description: 'Distribution to use for configuring target nodes (networking etc.)'
       - string:
           name: ONAP_FLAVOR
           default: '{onap-flavor}'
           name: ONAP_VERSION
           default: '{onap-version}'
           description: 'ONAP version to deploy'
+      - string:
+          name: HEAT_ENVIRONMENT_FILENAME
+          default: "heat-environment-full.yaml"
+          description: 'Type of the deployment'
+      - string:
+          name: HEAT_ENVIRONMENT_FILE
+          default: "file:///opt/engine/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/$HEAT_ENVIRONMENT_FILENAME"
+          description: 'Type of the deployment'
 
     wrappers:
-      - credentials-binding:
-          - file:
-              credential-id: est-jenkins-openrcfile-city-karlskrona-onap
-              variable: OPENRC_FILE
       - mask-passwords
       - build-timeout:
           timeout: '{build-timeout}'
       - fix-workspace-permissions
+      - credentials-binding:
+          - username-password-separated:
+              credential-id: 'nordix-cicd-arm-credentials'
+              username: NORDIX_ARM_USERNAME
+              password: NORDIX_ARM_TOKEN
+          - username-password-separated:
+              credential-id: 'nordix-cicd-harbor-credentials'
+              username: NORDIX_HARBOR_USERNAME
+              password: NORDIX_HARBOR_PASSWORD
 
     scm:
       - git-scm:
 
     builders:
       - description-setter:
-          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
-      - '{onap-other-phases}-macro'
+          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR | $OPENSTACK_CLOUD_PROVIDER
+      - '{onap-other-phases}-macro-legacy'
 
 - job-template:
     name: '{onap-healthcheck-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}'
           project: '{project}'
           branch: '{nordix-branch}'
       - nordix-gerrit-parameters
-      - onap-parameter-macro
+      - onap-parameter-macro-legacy
+      - label:
+          name: SLAVE_LABEL
+          default: 'xerces-jumphost-onap-ubuntu1804'
+          description: 'Slave label to schedule this job on. All slaves have Ubuntu1604 no matter what distro target nodes use'
+      - string:
+          name: OPENSTACK_CLOUD_PROVIDER
+          default: 'city'
+          description: 'Name of the cloud where this job is run'
+      - string:
+          name: DISTRO
+          default: 'ubuntu1804'
+          description: 'Distribution to use for configuring target nodes (networking etc.)'
       - string:
           name: ONAP_VERSION
           default: '{onap-version}'
           description: 'ONAP version to deploy'
+      - string:
+          name: HEAT_ENVIRONMENT_FILENAME
+          default: "heat-environment-full.yaml"
+          description: 'Type of the deployment'
+      - string:
+          name: HEAT_ENVIRONMENT_FILE
+          default: "file:///opt/engine/.cache/repos/swconfig/scenarios/$DEPLOY_SCENARIO/$INSTALLER_TYPE/role/$DEPLOY_SCENARIO/files/$HEAT_ENVIRONMENT_FILENAME"
+          description: 'Type of the deployment'
       - string:
           name: ENGINE_VERSION
           default: '{engine-version}'
           description: 'Development purposes only! Set to none for disabling test results DB reporting.'
 
     wrappers:
-      - credentials-binding:
-          - file:
-              credential-id: est-jenkins-openrcfile-city-karlskrona-onap
-              variable: OPENRC_FILE
       - mask-passwords
       - build-timeout:
           timeout: '{build-timeout}'
 
     builders:
       - description-setter:
-          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR
-      - 'onap-healthcheck-macro'
+          description: $DEPLOY_SCENARIO | $ONAP_FLAVOR | $OPENSTACK_CLOUD_PROVIDER
+      - 'onap-healthcheck-macro-legacy'
 
 # vim: set ts=2 sw=2 expandtab: