From: Maƫl Kimmerlin Date: Wed, 28 Aug 2019 12:37:23 +0000 (+0000) Subject: Merge "Enable Upstream repos CI for metal3-io integration tests" X-Git-Url: https://gerrit.nordix.org/gitweb?a=commitdiff_plain;h=06094c2722f9eb1776bb292d09773f7bcf45dc44;hp=81070bf81b4350b871e469e7b2094f6e2fd2bc6e;p=infra%2Fcicd.git Merge "Enable Upstream repos CI for metal3-io integration tests" --- diff --git a/jjb/cloud-infra/cloud-infra-deploy.sh b/jjb/cloud-infra/cloud-infra-deploy.sh index ae8c7984..1812f2fc 100644 --- a/jjb/cloud-infra/cloud-infra-deploy.sh +++ b/jjb/cloud-infra/cloud-infra-deploy.sh @@ -45,8 +45,17 @@ else IDF="https://gerrit.nordix.org/gitweb?p=infra/hwconfig.git;a=blob_plain;f=pods/nordix-vpod1-idf.yml" fi +if [[ $PROVISIONER_TYPE == "bifrost" ]]; then + DEPLOY_CMD="./engine/deploy.sh -c -r $PROVISIONER_TYPE -d $INSTALLER_TYPE -o $DISTRO -s $DEPLOY_SCENARIO -p $PDF -i $IDF" +elif [[ $PROVISIONER_TYPE == "heat" ]]; then + DEPLOY_CMD="./engine/deploy.sh -c -r $PROVISIONER_TYPE -d $INSTALLER_TYPE -o $DISTRO -s $DEPLOY_SCENARIO -u /tmp/openrc" +else + echo "Error: Unsupported provisioner type. Must either be bifrost or heat!" + exit 1 +fi + # execute cloud engine deploy.sh script cd $WORKSPACE -./engine/deploy.sh -d $INSTALLER_TYPE -o $DISTRO -s $DEPLOY_SCENARIO -p $PDF -i $IDF -c +$DEPLOY_CMD # vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-macros.yaml b/jjb/cloud-infra/cloud-infra-macros.yaml index 100ca8fc..398f7e10 100644 --- a/jjb/cloud-infra/cloud-infra-macros.yaml +++ b/jjb/cloud-infra/cloud-infra-macros.yaml @@ -59,7 +59,7 @@ - inject: properties-file: "$WORKSPACE/change.properties" - description-setter: - description: $INSTALLER_TYPE - $DEPLOY_SCENARIO + description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO - builder: name: 'cloud-infra-scenario-deploy-macro' diff --git a/jjb/cloud-infra/cloud-infra-periodic-scenario.yaml b/jjb/cloud-infra/cloud-infra-periodic-kubernetes.yaml similarity index 88% rename from jjb/cloud-infra/cloud-infra-periodic-scenario.yaml rename to jjb/cloud-infra/cloud-infra-periodic-kubernetes.yaml index d4258098..0214b7a9 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-scenario.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-kubernetes.yaml @@ -36,7 +36,7 @@ #-------------------------------------------------------------------------------------- - project: - name: 'cloud-infra-periodic-scenario' + name: 'cloud-infra-periodic-kubernetes' project: 'infra/engine' @@ -51,30 +51,24 @@ - centos7: disabled: 'true' + deploy-scenario: + - k8-calico-nofeature + - k8-flannel-nofeature + - k8-canal-nofeature + - k8-cilium-nofeature + - k8-weave-nofeature + - k8-multus-nofeature + ci-loop: - daily - deploy-scenario: - - k8-calico-nofeature: - installer-type: kubespray - - k8-flannel-nofeature: - installer-type: kubespray - - k8-canal-nofeature: - installer-type: kubespray - - k8-cilium-nofeature: - installer-type: kubespray - - k8-weave-nofeature: - installer-type: kubespray - - k8-multus-nofeature: - installer-type: kubespray - - os-nosdn-nofeature: - installer-type: kolla - type: - baremetal: - slave-label: 'baremetal-deploy' + pod-name: est-baremetal + provisioner-type: bifrost + installer-type: kubespray + slave-label: baremetal-deploy yardstick-dispatcher: 'influxdb' - provisioner-type: 'bifrost' phase: - deploy: @@ -87,11 +81,11 @@ build-timeout: 5 jobs: - - '{deploy-scenario}-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' - - 'scenario-{distro}-{phase}-{type}-{ci-loop}-{stream}' + - '{deploy-scenario}-{distro}-kubespray-{type}-{ci-loop}-{stream}' + - 'kubernetes-{phase}-{distro}-kubespray-{type}-{ci-loop}-{stream}' - job-template: - name: '{deploy-scenario}-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' + name: '{deploy-scenario}-{distro}-kubespray-{type}-{ci-loop}-{stream}' project-type: multijob @@ -182,7 +176,7 @@ name: deploy condition: SUCCESSFUL projects: - - name: 'scenario-{distro}-deploy-{type}-{ci-loop}-{stream}' + - name: 'kubernetes-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' current-parameters: true predefined-parameters: | DISTRO=$DISTRO @@ -198,9 +192,9 @@ abort-all-job: true - multijob: name: functest - condition: SUCCESSFUL + condition: ALWAYS projects: - - name: 'scenario-{distro}-functest-{type}-{ci-loop}-{stream}' + - name: 'kubernetes-functest-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' current-parameters: true predefined-parameters: | DISTRO=$DISTRO @@ -212,13 +206,13 @@ YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER CLEANUP=$CLEANUP node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true + kill-phase-on: NEVER + abort-all-job: false - multijob: name: yardstick - condition: SUCCESSFUL + condition: ALWAYS projects: - - name: 'scenario-{distro}-yardstick-{type}-{ci-loop}-{stream}' + - name: 'kubernetes-yardstick-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' current-parameters: true predefined-parameters: | DISTRO=$DISTRO @@ -230,8 +224,8 @@ YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER CLEANUP=$CLEANUP node-parameters: true - kill-phase-on: FAILURE - abort-all-job: true + kill-phase-on: NEVER + abort-all-job: false - multijob: name: promote condition: SUCCESSFUL @@ -252,7 +246,7 @@ abort-all-job: true - job-template: - name: 'scenario-{distro}-{phase}-{type}-{ci-loop}-{stream}' + name: 'kubernetes-{phase}-{distro}-kubespray-{type}-{ci-loop}-{stream}' disabled: false diff --git a/jjb/cloud-infra/cloud-infra-periodic-onap.yaml b/jjb/cloud-infra/cloud-infra-periodic-onap.yaml index 488dc817..4a0b86dd 100644 --- a/jjb/cloud-infra/cloud-infra-periodic-onap.yaml +++ b/jjb/cloud-infra/cloud-infra-periodic-onap.yaml @@ -117,7 +117,7 @@ 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-onap-{onap-branch}-{onap-flavor}' + default: 'nordix-cicd-{deploy-scenario}-{onap-branch}-{onap-flavor}' - string: name: ENGINE_VERSION default: '{engine-version}' diff --git a/jjb/cloud-infra/cloud-infra-periodic-openstack.yml b/jjb/cloud-infra/cloud-infra-periodic-openstack.yml new file mode 100644 index 00000000..c90853cd --- /dev/null +++ b/jjb/cloud-infra/cloud-infra-periodic-openstack.yml @@ -0,0 +1,323 @@ +--- +# +# ============LICENSE_START======================================================= +# Copyright (C) 2019 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========================================================= + +#-------------------------------------------------------------------------------------- +# 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. +#-------------------------------------------------------------------------------------- + +- project: + name: 'cloud-infra-periodic-openstack' + + project: 'infra/engine' + + stream: + - 'master': + branch: '{stream}' + disabled: 'false' + + distro: + - ubuntu1804: + disabled: 'false' + - centos7: + disabled: 'true' + + deploy-scenario: + - os-nosdn-nofeature + + ci-loop: + - daily + + type: + - baremetal: + pod-name: est-baremetal + provisioner-type: bifrost + installer-type: kolla + slave-label: baremetal-deploy + yardstick-dispatcher: 'influxdb' + + phase: + - deploy: + build-timeout: 90 + - functest: + build-timeout: 240 + - yardstick: + build-timeout: 120 + - promote: + build-timeout: 5 + + jobs: + - '{deploy-scenario}-{distro}-kolla-{type}-{ci-loop}-{stream}' + - 'openstack-{phase}-{distro}-kolla-{type}-{ci-loop}-{stream}' + +- job-template: + name: '{deploy-scenario}-{distro}-kolla-{type}-{ci-loop}-{stream}' + + project-type: multijob + + disabled: '{obj:disabled}' + + concurrent: true + + parameters: + - project-parameters: + project: '{project}' + branch: '{branch}' + - nordix-gerrit-parameters + - 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: DEPLOY_TYPE + default: '{type}' + description: 'Type of the deployment' + - string: + name: USE_PREBUILT_DEPLOYMENT_IMAGE + default: 'true' + description: 'Use prebuilt deployment image while running as part of CI/CD' + - string: + name: PROVISIONER_TYPE + default: '{provisioner-type}' + description: 'Provisioner to use for provisioning nodes' + - string: + name: INSTALLER_TYPE + default: '{installer-type}' + description: 'Installer to use for deploying the scenario' + - string: + name: DEPLOY_SCENARIO + default: '{deploy-scenario}' + description: 'Scenario to deploy and test' + - string: + name: TEST_SUITE + default: 'smoke' + description: 'Test suite to run' + - string: + name: YARDSTICK_DISPATCHER + default: '{yardstick-dispatcher}' + description: 'Dispatcher to use for Yardstick reporting' + - string: + name: CLEANUP + default: 'true' + description: 'Cleanup leftovers of the previous run' + + properties: + - logrotate + - build-blocker: + use-build-blocker: true + blocking-jobs: + - 'cloud-infra-periodic-engine-.*' + - 'k8-.*' + - 'os-.*' + block-level: 'NODE' + - throttle: + max-per-node: 1 + max-total: 3 + option: project + + wrappers: + - build-timeout: + timeout: 455 + - fix-workspace-permissions + + scm: + - git-scm: + ssh-credentials-id: nordixinfra-nordix-gerrit-ssh + branch: '{branch}' + refspec: '' + wipe_workspace: true + clean_before: false + + triggers: + - timed: '@daily' + + builders: + - description-setter: + description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO + - multijob: + name: deploy + condition: SUCCESSFUL + projects: + - name: 'openstack-deploy-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO=$DISTRO + DEPLOY_TYPE=$DEPLOY_TYPE + USE_PREBUILT_DEPLOYMENT_IMAGE=$USE_PREBUILT_DEPLOYMENT_IMAGE + PROVISIONER_TYPE=$PROVISIONER_TYPE + INSTALLER_TYPE=$INSTALLER_TYPE + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + CLEANUP=$CLEANUP + git-revision: true + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + - multijob: + name: functest + condition: ALWAYS + projects: + - name: 'openstack-functest-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO=$DISTRO + DEPLOY_TYPE=$DEPLOY_TYPE + PROVISIONER_TYPE=$PROVISIONER_TYPE + INSTALLER_TYPE=$INSTALLER_TYPE + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE + YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER + CLEANUP=$CLEANUP + node-parameters: true + kill-phase-on: NEVER + abort-all-job: false + - multijob: + name: yardstick + condition: ALWAYS + projects: + - name: 'openstack-yardstick-{distro}-{installer-type}-{type}-{ci-loop}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO=$DISTRO + DEPLOY_TYPE=$DEPLOY_TYPE + PROVISIONER_TYPE=$PROVISIONER_TYPE + INSTALLER_TYPE=$INSTALLER_TYPE + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE + YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER + CLEANUP=$CLEANUP + node-parameters: true + kill-phase-on: NEVER + abort-all-job: false + - multijob: + name: promote + condition: SUCCESSFUL + projects: + - name: 'scenario-{distro}-promote-{type}-{ci-loop}-{stream}' + current-parameters: true + predefined-parameters: | + DISTRO=$DISTRO + DEPLOY_TYPE=$DEPLOY_TYPE + PROVISIONER_TYPE=$PROVISIONER_TYPE + INSTALLER_TYPE=$INSTALLER_TYPE + DEPLOY_SCENARIO=$DEPLOY_SCENARIO + TEST_SUITE=$TEST_SUITE + YARDSTICK_DISPATCHER=$YARDSTICK_DISPATCHER + CLEANUP=$CLEANUP + node-parameters: true + kill-phase-on: FAILURE + abort-all-job: true + +- job-template: + name: 'openstack-{phase}-{distro}-kolla-{type}-{ci-loop}-{stream}' + + disabled: false + + concurrent: true + + properties: + - logrotate + + parameters: + - string: + name: PROJECT + default: $GERRIT_PROJECT + - string: + name: DISTRO + default: 'ubuntu1804' + description: 'Distribution to use for configuring target nodes (networking etc.). Overriden by upstream job.' + - string: + name: DEPLOY_TYPE + default: 'virtual' + description: 'Type of the deployment. Overriden by upstream job.' + - string: + name: USE_PREBUILT_DEPLOYMENT_IMAGE + default: 'false' + description: 'Use prebuilt deployment image while running as part of CI/CD' + - string: + name: ENGINE_ANSIBLE_PARAMS + default: ' -v ' + description: 'Extra paramters that can be added when run the play books.' + - string: + name: DEPLOY_SCENARIO + default: 'k8-calico-nofeature' + description: 'Scenario to deploy and test' + - string: + name: PROVISIONER_TYPE + default: 'bifrost' + description: 'Provisioner to use for provisioning nodes' + - string: + name: INSTALLER_TYPE + default: 'kolla' + description: 'Installer to use for deploying the scenario' + - string: + name: TEST_FW + default: '{phase}' + description: 'Test framework to use' + - string: + name: TEST_SUITE + default: 'smoke' + description: 'Test suite to run' + - string: + name: TEST_REPO_URL + default: 'https://gerrit.nordix.org/infra/test.git' + description: 'URL to Nordix Cloud Infra test repository' + - string: + name: YARDSTICK_DISPATCHER + default: 'file' + description: 'Dispatcher to use for Yardstick reporting' + - string: + name: CLEANUP + default: 'false' + + wrappers: + - build-timeout: + timeout: '{build-timeout}' + - fix-workspace-permissions + + scm: + - git-scm: + ssh-credentials-id: nordixinfra-nordix-gerrit-ssh + branch: '{branch}' + refspec: '' + wipe_workspace: true + clean_before: false + + builders: + - description-setter: + description: $PROVISIONER_TYPE | $INSTALLER_TYPE | $DEPLOY_SCENARIO + - 'scenario-{phase}-macro' + +# vim: set ts=2 sw=2 expandtab: diff --git a/jjb/cloud-infra/cloud-infra-verify-engine.yaml b/jjb/cloud-infra/cloud-infra-verify-engine.yaml index 12e14a20..b8b549cb 100644 --- a/jjb/cloud-infra/cloud-infra-verify-engine.yaml +++ b/jjb/cloud-infra/cloud-infra-verify-engine.yaml @@ -139,6 +139,11 @@ option: project wrappers: + - credentials-binding: + - file: + credential-id: est-jenkins-openrcfile-city-karlskrona-onap + variable: OPENRC_FILE + - mask-passwords - build-timeout: timeout: 120 - fix-workspace-permissions @@ -183,6 +188,9 @@ custom-url: '* $JOB_NAME $BUILD_URL' builders: + - shell: | + #!/bin/bash + cp $OPENRC_FILE /tmp/openrc - 'cloud-infra-determine-scenario-macro' - multijob: name: deploy @@ -272,6 +280,11 @@ default: 'false' 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 diff --git a/jjb/onap/testsuite-oom/testsuite_oom-push-upstream-jobs.yaml b/jjb/onap/testsuite-oom/testsuite_oom-push-upstream-jobs.yaml new file mode 100644 index 00000000..9fdabb47 --- /dev/null +++ b/jjb/onap/testsuite-oom/testsuite_oom-push-upstream-jobs.yaml @@ -0,0 +1,31 @@ +--- +# ============LICENSE_START======================================================= +# Copyright (C) 2019 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========================================================= +# + +# this job gets triggered when push-upstream is commented on a change on Nordix Gerrit. +- project: + name: testsuite_oom-push-upstream + project: testsuite/oom + project-name: testsuite_oom + stream: + - master: + branch: '{stream}' + + jobs: + - 'onap-{project-name}-{stream}-push-upstream' diff --git a/jjb/onap/testsuite-oom/testsuite_oom-rebase-jobs.yaml b/jjb/onap/testsuite-oom/testsuite_oom-rebase-jobs.yaml new file mode 100644 index 00000000..9fcac15f --- /dev/null +++ b/jjb/onap/testsuite-oom/testsuite_oom-rebase-jobs.yaml @@ -0,0 +1,33 @@ +--- +# ============LICENSE_START======================================================= +# Copyright (C) 2019 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========================================================= +# + +# this job gets triggered when a change is merged to +# testsuite project on ONAP Gerrit. +- project: + name: testsuite_oom-rebase + project: testsuite/oom + project-name: testsuite_oom + + stream: + - master: + branch: '{stream}' + + jobs: + - 'onap-{project-name}-{stream}-rebase'