Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 18 additions & 3 deletions ci/build_test_OnCommit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ def agent_name_linux = ""
def test_agent_linux = "ovms_ptl"
def disable_doc_tests_linux = false
def disable_doc_tests_windows = false
def validation_branch = "develop"

// Documentation test commit message overrides:
//
Expand All @@ -25,6 +26,10 @@ def disable_doc_tests_windows = false
// Override file list (space-separated, converted to pytest -k filter joined with ' or '):
// [test_doc_files_linux=<files>] - Use <files> instead of auto-detected list (Linux)
// [test_doc_files_windows=<files>] - Use <files> instead of auto-detected list (Windows)
//
// Override validation branch:
// [validation_branch=<branch>] - Use <branch> instead of default 'develop' for test repo checkout
//

pipeline {
agent {
Expand Down Expand Up @@ -100,6 +105,16 @@ pipeline {
test_agent_windows = agentWindowsDocValue
println "Commit override: test_agent_windows = ${test_agent_windows}"
}
def validationBranchMatcher = (commitMsg =~ /\[validation_branch=([^\]]+)\]/)
def validationBranchValue = validationBranchMatcher ? validationBranchMatcher[0][1] : null
validationBranchMatcher = null // Matcher is not serializable; null it before CPS checkpoint
if (validationBranchValue) {
if (!(validationBranchValue ==~ /[a-zA-Z0-9_\/.\-]+/)) {
error "Invalid validation_branch override: '${validationBranchValue}'. Only alphanumeric, hyphens, underscores, dots and slashes allowed."
}
validation_branch = validationBranchValue
println "Commit override: validation_branch = ${validation_branch}"
}
def docChangedFilesLinuxMatcher = (commitMsg =~ /\[test_doc_files_linux=([^\]]+)\]/)
def docChangedFilesLinuxValue = docChangedFilesLinuxMatcher ? docChangedFilesLinuxMatcher[0][1] : null
docChangedFilesLinuxMatcher = null // Matcher is not serializable; null it before CPS checkpoint
Expand Down Expand Up @@ -286,7 +301,7 @@ pipeline {
steps {
script {
dir ('internal_tests'){
checkout scmGit(branches: [[name: 'develop']], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
checkout scmGit(branches: [[name: validation_branch]], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
sh "pwd"
def pwd = sh(returnStdout:true, script: "pwd").strip()
sh "make create-venv && rm -f tests/functional && ln -s ${pwd}/../tests/functional tests/functional && TT_ON_COMMIT_TESTS=True TT_XDIST_WORKERS=10 TT_OVMS_IMAGE_NAME=openvino/model_server:${shortCommit} TT_OVMS_IMAGE_LOCAL=True make tests"
Expand All @@ -305,7 +320,7 @@ pipeline {
checkout scm
script {
dir ('documentation_tests') {
checkout scmGit(branches: [[name: 'develop']], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
checkout scmGit(branches: [[name: validation_branch]], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
sh "pwd"
def pwd = sh(returnStdout:true, script: "pwd").strip()
def ovms_c_repo_path = sh(returnStdout:true, script: "cd .. && pwd").strip()
Expand Down Expand Up @@ -371,7 +386,7 @@ pipeline {
checkout scm
script {
dir ('documentation_tests') {
checkout scmGit(branches: [[name: 'develop']], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
checkout scmGit(branches: [[name: validation_branch]], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
def test_doc_files_str = test_doc_files_windows.split('\n').join(' or ')
def current_path = bat(returnStdout: true, script: 'cd').trim().split('\n').last().trim()
def ovms_c_repo_path = bat(returnStdout: true, script: 'cd .. && cd').trim().split('\n').last().trim()
Expand Down
Loading