add optional TR_CASE_IDS argument to e2e PR tests
Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
parent
94c7953f30
commit
f30f0ed139
|
@ -26,6 +26,10 @@ pipeline {
|
||||||
name: 'PR_ID',
|
name: 'PR_ID',
|
||||||
description: 'ID of the Pull Request triggering this build.',
|
description: 'ID of the Pull Request triggering this build.',
|
||||||
)
|
)
|
||||||
|
string(
|
||||||
|
name: 'TR_CASE_IDS',
|
||||||
|
description: 'IDs of the TestRail case, separated by a comma. (Optional)',
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
options {
|
options {
|
||||||
|
@ -33,6 +37,12 @@ pipeline {
|
||||||
}
|
}
|
||||||
|
|
||||||
stages {
|
stages {
|
||||||
|
stage('Checks') {
|
||||||
|
steps { script {
|
||||||
|
if (params.APK_NAME == null) { error("APK_NAME parameter not set!") }
|
||||||
|
if (params.PR_ID == null) { error("PR_ID parameter not set!") }
|
||||||
|
} }
|
||||||
|
}
|
||||||
stage('Setup') {
|
stage('Setup') {
|
||||||
steps { script {
|
steps { script {
|
||||||
dir('test/appium') {
|
dir('test/appium') {
|
||||||
|
@ -43,6 +53,11 @@ pipeline {
|
||||||
stage('Test') {
|
stage('Test') {
|
||||||
steps { script {
|
steps { script {
|
||||||
currentBuild.displayName = "PR-${params.PR_ID}"
|
currentBuild.displayName = "PR-${params.PR_ID}"
|
||||||
|
/* for managing optional arguments */
|
||||||
|
def extraPytestOpts = ""
|
||||||
|
if (params.TR_CASE_IDS != "") {
|
||||||
|
extraPytestOpts = "--run_testrail_ids='${params.TR_CASE_IDS}'"
|
||||||
|
}
|
||||||
|
|
||||||
withCredentials([
|
withCredentials([
|
||||||
string(
|
string(
|
||||||
|
@ -69,7 +84,8 @@ pipeline {
|
||||||
--network=${params.NETWORK} \
|
--network=${params.NETWORK} \
|
||||||
--apk=${params.APK_NAME} \
|
--apk=${params.APK_NAME} \
|
||||||
--build=PR-${params.PR_ID} \
|
--build=PR-${params.PR_ID} \
|
||||||
--pr_number=${params.PR_ID}
|
--pr_number=${params.PR_ID} \
|
||||||
|
${extraPytestOpts}
|
||||||
"""
|
"""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue