ci test - #4407
Open
dtrawins wants to merge 10 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the on-commit Jenkins pipeline to publish per-stage GitHub commit statuses for PR visibility and adds a manual approval gate for pull requests coming from forks.
Changes:
- Introduces a
withGithubStageStatuswrapper to sendPENDING/SUCCESS/FAILURE/ERRORGitHub statuses around stage bodies. - Wraps multiple build/test stages with the new status wrapper to expose granular progress/failures on GitHub.
- Adds an “Approve fork PR” stage using
inputto gate execution for forked PRs.
Suppressed comments (1)
ci/build_test_OnCommit.groovy:460
- In the Windows documentation tests stage,
withGithubStageStatussends the initial PENDING notification beforecheckout scm. Since this stage usesagent none+node(...), there is no default checkout, sogithubNotifymay run without SCM metadata and fail or attach to the wrong SHA.
script {
withGithubStageStatus('jenkins/oncommit/doc-tests-windows', 'Windows doc tests') {
checkout scm
dir ('documentation_tests') {
checkout scmGit(branches: [[name: validation_branch]], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']])
Comment on lines
+67
to
+75
| stage('Approve fork PR') { | ||
| when { | ||
| expression { env.CHANGE_ID && env.CHANGE_FORK } | ||
| } | ||
| steps { | ||
| input message: "Approve build for fork PR #${env.CHANGE_ID}?", | ||
| ok: 'Approve' | ||
| } | ||
| } |
Comment on lines
+17
to
+37
| def withGithubStageStatus = { String context, String stageName, Closure body -> | ||
| if (env.CHANGE_ID) { | ||
| githubNotify context: context, status: 'PENDING', description: "${stageName} started" | ||
| } | ||
| try { | ||
| body.call() | ||
| if (env.CHANGE_ID) { | ||
| githubNotify context: context, status: 'SUCCESS', description: "${stageName} passed" | ||
| } | ||
| } catch (org.jenkinsci.plugins.workflow.steps.FlowInterruptedException ex) { | ||
| if (env.CHANGE_ID) { | ||
| githubNotify context: context, status: 'ERROR', description: "${stageName} aborted" | ||
| } | ||
| throw ex | ||
| } catch (Exception ex) { | ||
| if (env.CHANGE_ID) { | ||
| githubNotify context: context, status: 'FAILURE', description: "${stageName} failed" | ||
| } | ||
| throw ex | ||
| } | ||
| } |
Comment on lines
386
to
+390
| script { | ||
| dir ('documentation_tests') { | ||
| 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() | ||
| def test_doc_files_str = test_doc_files_linux.split('\n').join(' or ') | ||
| sh "make create-venv && rm -f tests/functional && ln -s ${pwd}/../tests/functional tests/functional" | ||
| def cmd_venv_activate = ". .venv/bin/activate" | ||
| def cmd_export = "export TT_OVMS_C_REPO_PATH=../ && export TT_RUN_REGRESSION_TESTS=True && export TT_REGRESSION_WEEKLY_TESTS=True && export TT_TARGET_DEVICE=CPU,GPU,NPU && export TT_ENABLE_UAT_TESTS=True && export TT_ENABLE_SMOKE_TESTS=False && export TT_OVMS_C_REPO_PATH=${ovms_c_repo_path} && export TT_LOGGING_LEVEL_OVMS=DEBUG && export TT_WAIT_FOR_MESSAGES_TIMEOUT=1500 && export CORE_BRANCH=${env.CHANGE_BRANCH ?: 'main'}" | ||
| def cmd_pytest = "pytest tests/non_functional/documentation -k '${test_doc_files_str}' -n 0 --dist loadgroup" | ||
| def cmd = "" | ||
| if ( image_build_needed == "true" ) { | ||
| unstash 'ovms-release-image' | ||
| sh "gunzip -c ovms_release_image.tar.gz | docker load" | ||
| sh "rm -f ovms_release_image.tar.gz" | ||
| withGithubStageStatus('jenkins/oncommit/doc-tests-linux', 'Linux doc tests') { | ||
| checkout scm | ||
| dir ('documentation_tests') { | ||
| checkout scmGit(branches: [[name: validation_branch]], userRemoteConfigs: [[credentialsId: 'workflow-lab', url: 'https://github.com/intel-innersource/frameworks.ai.openvino.model-server.tests.git']]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🛠 Summary
CI groovy changes to expose github status for each stage - it will give visibility for external contributors which stage is failing
Added approval stage for PRs from fork
🧪 Checklist
``