X-Git-Url: https://gerrit.nordix.org/gitweb?a=blobdiff_plain;f=jjb%2Fcloud-infra%2Fcloud-infra-periodic-onap.yaml;h=3afc137e61a456e58a9a400b57c90359baf9b46b;hb=da7ada67ac1e0ea0fda274e36f76cfa991ca8ade;hp=cd4036a53ebdd508532aed921d6a50537677517c;hpb=ec9ae93a9200e2aabccb7ab78b41a35cdd79b380;p=infra%2Fcicd.git diff --git a/jjb/cloud-infra/cloud-infra-periodic-onap.yaml b/jjb/cloud-infra/cloud-infra-periodic-onap.yaml index cd4036a5..3afc137e 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-onap.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-onap.yaml @@ -19,20 +19,8 @@ # ============LICENSE_END========================================================= #-------------------------------------------------------------------------------------- -# The jobs declared in this JJB configuration file are used for verifying cloud-infra -# engine from the tip of the master branch periodically to check the stability of it. -# -# These jobs are set to run on slaves with label vpod-deploy-ubuntu1604. -# The slaves have -# - Ubuntu1604 as the base distro -# - nested virtualization -# - internet access -# - passwordless sudo -# - 16 CPUs/32GB RAM/200 GB Disk -# - docker, git vim curl wget zip unzip chrony apt-transport-https ca-certificates curl -# gnupg-agent software-properties-common docker-ce docker-ce-cli containerd.io openjdk-8-jre -# -# The slaves should not have a cloud infra scenario deployed on them. +# The jobs declared in this JJB configuration file are used for deploying and testing +# ONAP scenario onap-nofeature-noha. #-------------------------------------------------------------------------------------- - project: @@ -43,43 +31,49 @@ onap-branch: - 'dublin': nordix-branch: master - onap-version: 4.0.0-ONAP + onap-version: dublin + onap-flavor: full engine-version: master engine-refspec: master deploy-scenario-version: master deploy-scenario-refspec: master disabled: false + delete-stack: 'yes' - 'master': nordix-branch: master onap-version: master + onap-flavor: full engine-version: master engine-refspec: master deploy-scenario-version: master deploy-scenario-refspec: master - disabled: true + disabled: false + delete-stack: 'no' distro: - ubuntu1804 deploy-scenario: - - onap-oom-nofeature + - onap-nofeature-noha + + ci-loop: + - daily type: - cloud: + pod-name: est-cloud provisioner-type: heat installer-type: kubespray slave-label: 'jumphost-onap-ubuntu1804' onap-other-phases: - onap-deploy: - build-timeout: 150 + build-timeout: 210 - oom-healthcheck: build-timeout: 30 test-type: oom-healthcheck - promote-onap: build-timeout: 5 - - delete-stack: - build-timeout: 5 onap-healthcheck-phases: - onap-healthcheck-core: @@ -94,14 +88,17 @@ - onap-healthcheck-full: build-timeout: 30 test-type: onap-healthcheck + - onap-healthcheck-healthdist: + build-timeout: 30 + test-type: onap-healthcheck jobs: - - '{deploy-scenario}-periodic-{distro}-{installer-type}-{type}-{onap-branch}' - - '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}' - - '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - '{deploy-scenario}-{onap-flavor}-{distro}-{installer-type}-{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}-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + name: '{deploy-scenario}-{onap-flavor}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' project-type: multijob @@ -119,6 +116,13 @@ name: ONAP_VERSION default: '{onap-version}' description: 'ONAP version to deploy' + - string: + name: ONAP_FLAVOR + default: '{onap-flavor}' + description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.' + - string: + name: STACK_NAME + default: 'nordix-cicd-{deploy-scenario}-{onap-branch}-{onap-flavor}' - string: name: ENGINE_VERSION default: '{engine-version}' @@ -135,6 +139,14 @@ name: DEPLOY_SCENARIO_REFSPEC default: '{deploy-scenario-refspec}' description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.' + - string: + name: POD_NAME + default: '{pod-name}' + description: 'Development purposes only! Set to none for disabling test results DB reporting.' + - string: + name: DELETE_STACK + default: '{delete-stack}' + description: 'Development purposes only! Whether delete the stack or not. It must either be yes or no. Setting this to no will increase the cost!' properties: - logrotate @@ -151,12 +163,20 @@ option: project wrappers: + - credentials-binding: + - file: + credential-id: est-jenkins-openrcfile-city-karlskrona-onap + variable: OPENRC_FILE + - mask-passwords - build-timeout: - timeout: 220 + timeout: 300 - fix-workspace-permissions - openstack: single-use: True + triggers: + - timed: '@midnight' + scm: - git-scm: ssh-credentials-id: nordixinfra-nordix-gerrit-ssh @@ -167,12 +187,15 @@ builders: - description-setter: - description: $INSTALLER_TYPE | $DEPLOY_SCENARIO + description: $DEPLOY_SCENARIO | $ONAP_FLAVOR + - shell: | + #!/bin/bash + cp $OPENRC_FILE /tmp/openrc - multijob: name: Deploy ONAP using OOM - condition: SUCCESSFUL + condition: ALWAYS projects: - - name: 'onap-deploy-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'onap-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | DISTRO=$DISTRO @@ -182,6 +205,8 @@ DEPLOY_SCENARIO=$DEPLOY_SCENARIO ONAP_VERSION=$ONAP_VERSION ONAP_FLAVOR=$ONAP_FLAVOR + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -191,13 +216,13 @@ CLEANUP=$CLEANUP git-revision: true node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true + kill-phase-on: NEVER + abort-all-job: false - multijob: name: K8S and OOM Healthcheck using xtesting condition: ALWAYS projects: - - name: 'oom-healthcheck-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'oom-healthcheck-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | DISTRO=$DISTRO @@ -208,6 +233,8 @@ ONAP_VERSION=$ONAP_VERSION ONAP_FLAVOR=full TEST_TYPE=oom-healthcheck + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -222,7 +249,7 @@ name: ONAP Healthcheck using xtesting condition: ALWAYS projects: - - name: 'onap-healthcheck-core-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'onap-healthcheck-core-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | SLAVE_LABEL=$SLAVE_LABEL @@ -234,6 +261,8 @@ ONAP_VERSION=$ONAP_VERSION ONAP_FLAVOR=core TEST_TYPE=onap-healthcheck + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -244,7 +273,7 @@ node-parameters: true kill-phase-on: NEVER abort-all-job: false - - name: 'onap-healthcheck-small-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'onap-healthcheck-small-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | SLAVE_LABEL=$SLAVE_LABEL @@ -256,6 +285,8 @@ ONAP_VERSION=$ONAP_VERSION ONAP_FLAVOR=small TEST_TYPE=onap-healthcheck + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -266,7 +297,7 @@ node-parameters: true kill-phase-on: NEVER abort-all-job: false - - name: 'onap-healthcheck-medium-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'onap-healthcheck-medium-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | SLAVE_LABEL=$SLAVE_LABEL @@ -278,6 +309,8 @@ ONAP_VERSION=$ONAP_VERSION ONAP_FLAVOR=medium TEST_TYPE=onap-healthcheck + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -288,7 +321,7 @@ node-parameters: true kill-phase-on: NEVER abort-all-job: false - - name: 'onap-healthcheck-full-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'onap-healthcheck-full-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | SLAVE_LABEL=$SLAVE_LABEL @@ -300,6 +333,8 @@ ONAP_VERSION=$ONAP_VERSION ONAP_FLAVOR=full TEST_TYPE=onap-healthcheck + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -310,19 +345,20 @@ node-parameters: true kill-phase-on: NEVER abort-all-job: false - - multijob: - name: Promote ONAP (not activated) - condition: ALWAYS - projects: - - name: 'promote-onap-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'onap-healthcheck-healthdist-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | + SLAVE_LABEL=$SLAVE_LABEL DISTRO=$DISTRO - DEPLOY_TYPE=$DEPLOY_TYPE + PROVISIONER_TYPE=$PROVISIONER_TYPE INSTALLER_TYPE=$INSTALLER_TYPE DEPLOY_SCENARIO=$DEPLOY_SCENARIO + DEPLOY_TYPE=$DEPLOY_TYPE ONAP_VERSION=$ONAP_VERSION - ONAP_FLAVOR=$ONAP_FLAVOR + ONAP_FLAVOR=healthdist + TEST_TYPE=onap-healthcheck + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION @@ -334,10 +370,10 @@ kill-phase-on: NEVER abort-all-job: false - multijob: - name: Delete Stack + name: Promote ONAP (not activated) condition: ALWAYS projects: - - name: 'delete-stack-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + - name: 'promote-onap-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' current-parameters: false predefined-parameters: | DISTRO=$DISTRO @@ -348,6 +384,8 @@ ONAP_FLAVOR=$ONAP_FLAVOR ENGINE_VERSION=$ENGINE_VERSION ENGINE_REFSPEC=$ENGINE_REFSPEC + POD_NAME=$POD_NAME + STACK_NAME=$STACK_NAME DEPLOY_SCENARIO_VERSION=$DEPLOY_SCENARIO_VERSION DEPLOY_SCENARIO_REFSPEC=$DEPLOY_SCENARIO_REFSPEC XTESTING_REPO_URL=$XTESTING_REPO_URL @@ -357,8 +395,24 @@ kill-phase-on: NEVER abort-all-job: false + publishers: + - postbuildscript: + builders: + - role: SLAVE + build-on: + - SUCCESS + - FAILURE + - ABORTED + - NOT_BUILT + - UNSTABLE + build-steps: + - shell: + !include-raw-escape: ./wait-for-pkg-manager.sh + - shell: + !include-raw: ./delete-heat-stack.sh + - job-template: - name: '{onap-other-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + name: '{onap-other-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' disabled: false @@ -373,6 +427,10 @@ branch: '{nordix-branch}' - nordix-gerrit-parameters - onap-parameter-macro + - string: + name: ONAP_FLAVOR + default: '{onap-flavor}' + description: 'ONAP flavor to deploy - could be core, small, medium, full. Also used for xtesting as run_type.' - string: name: ONAP_VERSION default: '{onap-version}' @@ -381,7 +439,7 @@ wrappers: - credentials-binding: - file: - credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject + credential-id: est-jenkins-openrcfile-city-karlskrona-onap variable: OPENRC_FILE - mask-passwords - build-timeout: @@ -398,11 +456,11 @@ builders: - description-setter: - description: $INSTALLER_TYPE $DEPLOY_SCENARIO + description: $DEPLOY_SCENARIO | $ONAP_FLAVOR - '{onap-other-phases}-macro' - job-template: - name: '{onap-healthcheck-phases}-periodic-{distro}-{installer-type}-{type}-{onap-branch}' + name: '{onap-healthcheck-phases}-{distro}-{installer-type}-{type}-{ci-loop}-{onap-branch}' disabled: false @@ -437,11 +495,15 @@ name: DEPLOY_SCENARIO_REFSPEC default: '{deploy-scenario-refspec}' description: 'Development purposes only! Nordix Cloud Infra Scenario version to use for deploying ONAP. Depends on DEPLOY_SCENARIO_VERSION and must be refspec.' + - string: + name: POD_NAME + default: '{pod-name}' + description: 'Development purposes only! Set to none for disabling test results DB reporting.' wrappers: - credentials-binding: - file: - credential-id: nordix-jenkins-openrcfile-city-frankfurt-defaultproject + credential-id: est-jenkins-openrcfile-city-karlskrona-onap variable: OPENRC_FILE - mask-passwords - build-timeout: @@ -458,7 +520,7 @@ builders: - description-setter: - description: $INSTALLER_TYPE $DEPLOY_SCENARIO + description: $DEPLOY_SCENARIO | $ONAP_FLAVOR - 'onap-healthcheck-macro' # vim: set ts=2 sw=2 expandtab: