Add ability to disable report and change testrail plan name prefi
Change-Id: Ib97bc66ed229292bebc69348d316dee2bd6956ce
Related-PROD: PROD-28588
diff --git a/jobs/pipelines/deploy-cicd-and-run-tests.groovy b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
index 0434b19..ca52a53 100644
--- a/jobs/pipelines/deploy-cicd-and-run-tests.groovy
+++ b/jobs/pipelines/deploy-cicd-and-run-tests.groovy
@@ -97,14 +97,15 @@
stage("Archive all xml reports") {
archiveArtifacts artifacts: "**/*.xml,**/*.ini,**/*.log,**/*.tar.gz"
}
- stage("report results to testrail") {
- shared.swarm_testrail_report(steps)
+ if (env.REPORT_TO_TESTRAIL ?: true) {
+ stage("report results to testrail") {
+ shared.swarm_testrail_report(steps)
+ }
+ stage("Store TestRail reports to job description") {
+ def String description = readFile("description.txt")
+ currentBuild.description += "\n${description}"
+ }
}
- stage("Store TestRail reports to job description") {
- def String description = readFile("description.txt")
- currentBuild.description += "\n${description}"
- }
-
}
}
//}
\ No newline at end of file
diff --git a/src/com/mirantis/system_qa/SharedPipeline.groovy b/src/com/mirantis/system_qa/SharedPipeline.groovy
index 4e819ae..ad52129 100644
--- a/src/com/mirantis/system_qa/SharedPipeline.groovy
+++ b/src/com/mirantis/system_qa/SharedPipeline.groovy
@@ -561,7 +561,8 @@
def testPlanDesc = env.LAB_CONFIG_NAME
def testrailURL = "https://mirantis.testrail.com"
def testrailProject = "Mirantis Cloud Platform"
- def testPlanName = "[MCP-Q2]System-${MCP_VERSION}-${new Date().format('yyyy-MM-dd')}"
+ def testPlanNamePrefix = env.TEST_PLAN_NAME_PREFIX ?: "[MCP-Q2]System"
+ def testPlanName = "${testPlanNamePrefix}-${MCP_VERSION}-${new Date().format('yyyy-MM-dd')}"
def testrailMilestone = "MCP1.1"
def testrailCaseMaxNameLenght = 250
def jobURL = env.BUILD_URL