Skip to content
Merged
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
22 changes: 17 additions & 5 deletions jenkins/L0_MergeRequest.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,9 @@ def globalVars = [
]

// If not running all test stages in the L0 pre-merge, we will not update the GitLab status at the end.
// GenPostMergeBuilds pipelines do not update GitLab status.
boolean enableUpdateGitlabStatus =
!GEN_POST_MERGE_BUILDS_ONLY &&
!testFilter[ENABLE_SKIP_TEST] &&
!testFilter[ONLY_MULTI_GPU_TEST] &&
!testFilter[DISABLE_MULTI_GPU_TEST] &&
Expand Down Expand Up @@ -312,7 +314,9 @@ def echoNodeAndGpuInfo(pipeline, stageName)
def setupPipelineEnvironment(pipeline, testFilter, globalVars)
{
sh "env | sort"
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: 'running'
if (!GEN_POST_MERGE_BUILDS_ONLY) {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: 'running'
}
echo "Using GitLab repo: ${LLM_REPO}."
sh "git config --global --add safe.directory \"*\""
// NB: getContainerURIs reads files in ${LLM_ROOT}/jenkins/
Expand Down Expand Up @@ -1333,24 +1337,32 @@ pipeline {
}
post {
unsuccessful {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: "failed"
script {
if (!GEN_POST_MERGE_BUILDS_ONLY) {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: "failed"
}
}
}
success {
script {
if (enableUpdateGitlabStatus) {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: "success"
} else {
} else if (!GEN_POST_MERGE_BUILDS_ONLY) {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: "canceled"
updateGitlabCommitStatus name: "Custom Jenkins build", state: "success"
}
}
}
aborted {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: 'canceled'
script {
if (!GEN_POST_MERGE_BUILDS_ONLY) {
updateGitlabCommitStatus name: "${BUILD_STATUS_NAME}", state: 'canceled'
}
}
}
always {
script {
if (!isReleaseCheckMode) {
if (!isReleaseCheckMode && !GEN_POST_MERGE_BUILDS_ONLY) {
collectTestResults(this, testFilter)
}
}
Expand Down
Loading