Add pipeline to start long test scenarious
PROD-36050
Change-Id: I7e381385d74bf4e3703d755c343bd2f380f9e253
diff --git a/jobs/templates/test-scenarios.yml b/jobs/templates/test-scenarios.yml
new file mode 100644
index 0000000..10388e0
--- /dev/null
+++ b/jobs/templates/test-scenarios.yml
@@ -0,0 +1,237 @@
+---
+
+- project:
+ name: test-scenarios
+ views:
+ - Test Backups
+ - Test Ceph
+ - Test MCP updates
+ jobs:
+ - backup-tests
+ - ceph-tests
+ - update-tests
+
+################### VIEWS #######################
+- view:
+ name: Test Backups
+ view-type: list
+ filter-executors: true
+ filter-queue: true
+ regex: 'backup-.*'
+ columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+
+- view:
+ name: Test Ceph
+ view-type: list
+ filter-executors: true
+ filter-queue: true
+ regex: 'ceph_.*'
+ columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+
+- view:
+ name: Test MCP updates
+ view-type: list
+ filter-executors: true
+ filter-queue: true
+ regex: '.*-update-.*'
+ columns:
+ - status
+ - weather
+ - job
+ - last-success
+ - last-failure
+ - last-duration
+ - build-button
+
+######################## JOB GROUP ####################
+- job-group:
+ name: 'backup-tests'
+ test_scenario:
+
+ - backup-saltmaster-queens-dvr-sl:
+ run-test-opts: '-k TestBackupRestoreMaster'
+ deployment: heat-cicd-queens-dvr-sl
+
+ - backup-saltmaster-pike-dvr-sl:
+ run-test-opts: '-k TestBackupRestoreMaster'
+ deployment: heat-cicd-pike-dvr-sl
+
+ - backup-cassandra-queens-contrail-sl:
+ run-test-opts: '-k TestBackupRestoreCassandra'
+ deployment: heat-cicd-queens-contrail-sl
+
+ jobs:
+ - '{test_scenario}'
+
+- job-group:
+ name: 'ceph-tests'
+ test_scenario:
+ - ceph_osd-queens-dvr-sl:
+ run-test-opts: '-k TestCephOsd'
+ deployment: heat-cicd-queens-dvr-sl
+ jobs:
+ - '{test_scenario}'
+
+- job-group:
+ name: 'update-tests'
+ test-opt: |-
+ --keep-duplicates --maxfail=1 \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_drivetrain \
+ tcp_tests/tests/system/test_mcp_update.py::TestOpenstackUpdate \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_galera
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_rabbit \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_stacklight \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_ceph \
+ \
+ tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest \
+ tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity \
+ tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+ test-opt-with-contrail: |-
+ --keep-duplicates --maxfail=1 \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_drivetrain \
+ tcp_tests/tests/system/test_upgrade_contrail.py::TestUpdateContrail \
+ tcp_tests/tests/system/test_mcp_update.py::TestOpenstackUpdate \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_galera
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_rabbit \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_stacklight \
+ tcp_tests/tests/system/test_mcp_update.py::TestUpdateMcpCluster::test_update_ceph \
+ \
+ tcp_tests/tests/system/test_3rdparty_suites.py::Test3rdpartySuites::test_run_tempest \
+ tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_func_sanity \
+ tcp_tests/tests/system/test_cvp_pipelines.py::TestCvpPipelines::test_run_cvp_stacklight
+
+ test_scenario:
+ - mcp-update-pike-sl:
+ deployment: released-heat-cicd-pike-dvr-sl
+ disabled: true
+ run-test-opts: '{test-opt}'
+
+ - mcp-update-queens-dvr-sl:
+ deployment: released-heat-cicd-queens-dvr-sl
+ disabled: true
+ run-test-opts: '{test-opt}'
+
+ - mcp-update-pike-contrail-sl:
+ deployment: released-heat-cicd-pike-contrail41-sl
+ disabled: true
+ run-test-opts: '{test-opt-with-contrail}'
+
+ - mcp-update-queens-contrail-sl:
+ deployment: released-heat-cicd-queens-contrail41-sl
+ disabled: true
+ run-test-opts: '{test-opt-with-contrail}'
+
+ - os-update-pike-to-queens:
+ deployment: heat-cicd-pike-dvr-sl
+ run-test-opts: '-k TestUpdatePikeToQueens'
+
+ - ceph-update-luminous-to-nautilus:
+ deployment: heat-cicd-pike-dvr-sl
+ disabled: true
+ run-test-opts: '-k TestCephUpdate'
+
+ jobs:
+ - '{test_scenario}'
+
+###################### JOB TEMPLATE ###################
+- job-template:
+ name: '{test_scenario}'
+ project-type: pipeline
+ concurrent: false
+ disabled: '{disabled|false}'
+ quiet-period: 2
+ node: 'openstack_slave_{deployment}'
+ logrotate:
+ daysToKeep: 30
+ numToKeep: 60
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+ # Requires the Jenkins BuildResultTrigger Plugin
+ triggers:
+ - build-result:
+ cron: '* * * * *'
+ combine: true
+ groups:
+ - jobs:
+ - '{deployment}'
+ results:
+ - success
+
+ pipeline-scm:
+ lightweight-checkout: false
+ scm:
+ - git:
+ branches:
+ - FETCH_HEAD
+ refspec: ${{TCP_QA_REFS}}
+ url: https://gerrit.mcp.mirantis.com/mcp/tcp-qa.git
+ script-path: jobs/pipelines/run-test-scenarios.groovy
+
+ parameters:
+ - node:
+ name: NODE
+ allowed-slaves:
+ - 'openstack_slave_{deployment}'
+ - string:
+ default: '{deployment}'
+ description: 'Required: Fuel-devops environment name'
+ name: ENV_NAME
+ trim: 'false'
+ - string:
+ default: ''
+ description: 'Example: refs/changes/89/411189/36
+ (for now - only one reference allowed)'
+ name: TCP_QA_REFS
+ trim: 'false'
+ - string:
+ default: 'openstack_slave_{deployment}'
+ description: 'Required: Name of the jenkins slave to create the environment
+ To be set by the parent deployment job.'
+ name: PARENT_NODE_NAME
+ trim: 'false'
+ - string:
+ default: '/home/jenkins/workspace/workspace/{deployment}'
+ description: 'Required: Workspace on the jenkins slave to reuse for
+ the job To be set by the parent deployment job'
+ name: PARENT_WORKSPACE
+ trim: 'false'
+ - string:
+ default: ''
+ description: 'Completed steps to install components on the environment.
+ If tests require some additional components, it may be installed in
+ appropriate fixtures, so set the PASSED_STEPS correctly for the
+ testing environment.'
+ name: PASSED_STEPS
+ trim: 'false'
+ - string:
+ default: ''
+ description: 'Example: refs/changes/89/411189/36
+ (for now - only one reference allowed)'
+ name: TCP_QA_REFS
+ trim: 'false'
+ - text:
+ default: '{run-test-opts}'
+ description: |-
+ Pytest option -k or -m, with expression to select necessary tests.
+ Additional pytest options are allowed.
+ name: RUN_TEST_OPTS
+ trim: 'false'
+ - bool:
+ default: true
+ name: REPORT_TO_TESTRAIL
+
+