Add swarm-run-pytest job to JJB
Remove obsolete parameters
PROD-35295
Change-Id: I976d72b8968d4f25f36946ba88d80c836762e597
diff --git a/jobs/pipelines/swarm-run-pytest.groovy b/jobs/pipelines/swarm-run-pytest.groovy
index 8ef7122..1ebee5a 100644
--- a/jobs/pipelines/swarm-run-pytest.groovy
+++ b/jobs/pipelines/swarm-run-pytest.groovy
@@ -12,10 +12,6 @@
* PARENT_WORKSPACE Path to the workspace of the parent job to use tcp-qa repo
* TCP_QA_REFS Reference to the tcp-qa change on Gerrit, like refs/changes/46/418546/41
* SHUTDOWN_ENV_ON_TEARDOWN optional, shutdown fuel-devops environment at the end of the job
- * LAB_CONFIG_NAME Not used (backward compatibility, for manual deployment steps only)
- * REPOSITORY_SUITE Not used (backward compatibility, for manual deployment steps only)
- * MCP_IMAGE_PATH1604 Not used (backward compatibility, for manual deployment steps only)
- * IMAGE_PATH_CFG01_DAY01 Not used (backward compatibility, for manual deployment steps only)
* TEMPEST_IMAGE_VERSION Tempest image version: pike by default, can be queens.
* TEMPEST_TARGET Node where tempest will be run
* MAKE_SNAPSHOT_STAGES optional, use "dos.py snapshot" to snapshot stages
diff --git a/jobs/project.yaml b/jobs/project.yaml
index 83ce236..1250a84 100644
--- a/jobs/project.yaml
+++ b/jobs/project.yaml
@@ -44,6 +44,7 @@
- download-config-drive
- swarm-deploy-cicd
- swarm-deploy-platform
+ - swarm-run-pytest
# - generate-report - can't moved to JJB, a lot of parameters is not supported like Inject environment variables
# - mark-reports - can't moved to JJB, a lot of parameters is not supported like Inject environment variables
- cookied-cicd-queens-dvr-sl-heat
diff --git a/jobs/templates/swarm-run-pytest.yml b/jobs/templates/swarm-run-pytest.yml
new file mode 100644
index 0000000..eced52e
--- /dev/null
+++ b/jobs/templates/swarm-run-pytest.yml
@@ -0,0 +1,73 @@
+- job-template:
+ project-type: pipeline
+ description: '{job-description}'
+ concurrent: true
+ disabled: false
+ name: swarm-run-pytest
+ parameters:
+ - string:
+ default: ''
+ 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: ''
+ 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: ''
+ 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: 'Required: Workspace on the jenkins slave to reuse for the job
+ To be set by the parent deployment job.'
+ name: PARENT_WORKSPACE
+ trim: 'false'
+ - bool:
+ default: false
+ description: 'Shutdown the fuel-devops environment at the end of the job'
+ name: SHUTDOWN_ENV_ON_TEARDOWN
+ trim: 'false'
+ - bool:
+ default: false
+ description: 'Use "dos.py snapshot" to snapshot stages of deploy if ENV_MANAGER is devops'
+ name: MAKE_SNAPSHOT_STAGES
+ - text:
+ default: ''
+ description: |-
+ Pytest option -k or -m, with expression to select necessary tests.
+ Additional pytest options are allowed.
+ name: RUN_TEST_OPTS
+ trim: 'false'
+ - string:
+ default: pike
+ description: ''
+ name: TEMPEST_IMAGE_VERSION
+ trim: 'false'
+ - string:
+ default: ''
+ description: ''
+ name: TEMPEST_TARGET
+ trim: 'false'
+ 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/swarm-run-pytest.groovy
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index c06e9a4..e25a1f0 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -386,14 +386,8 @@
string(name: 'PARENT_WORKSPACE', value: pwd()),
string(name: 'TCP_QA_REFS', value: "${tcp_qa_refs}"),
booleanParam(name: 'SHUTDOWN_ENV_ON_TEARDOWN', value: false),
- string(name: 'LAB_CONFIG_NAME', value: "${LAB_CONFIG_NAME}"),
- string(name: 'REPOSITORY_SUITE', value: "${MCP_VERSION}"),
- string(name: 'MCP_IMAGE_PATH1604', value: "${MCP_IMAGE_PATH1604}"),
- string(name: 'IMAGE_PATH_CFG01_DAY01', value: "${IMAGE_PATH_CFG01_DAY01}"),
string(name: 'TEMPEST_IMAGE_VERSION', value: "${tempest_image_version}"),
string(name: 'TEMPEST_TARGET', value: "${tempest_target}"),
- string(name: 'TEMPEST_PATTERN', value: "${tempest_pattern}"),
- string(name: 'TEMPEST_EXTRA_ARGS', value: "${tempest_extra_args}"),
booleanParam(name: 'MAKE_SNAPSHOT_STAGES', value: make_snapshot_stages),
]
common.printMsg("Start building job 'swarm-run-pytest' with parameters:", "purple")