|
9 | 9 | - job-template: |
10 | 10 | name: "{jjb_proj}-dispatcher" # Will be expanded to 'nixl-ci-dispatcher' |
11 | 11 | project-type: pipeline |
12 | | - folder: "{jjb_folder}" |
13 | 12 | properties: |
14 | 13 | # GitHub integration settings |
15 | 14 | - github: |
|
56 | 55 | githubHelper = GithubHelper.getInstance("${{GIT_PASSWORD}}", VARIABLE_FROM_POST) |
57 | 56 | }} |
58 | 57 | // Update GitHub commit status |
59 | | - githubHelper.updateCommitStatus("$BUILD_URL", "CI Dispatcher started", GitHubCommitState.PENDING) |
| 58 | + def blueOceanUrl = "${{JENKINS_URL}}blue/organizations/jenkins/nixl-ci-dispatcher/detail/nixl-ci-dispatcher/${{BUILD_NUMBER}}/pipeline/" |
| 59 | + githubHelper.updateCommitStatus(blueOceanUrl, "NIXL CI Started", GitHubCommitState.PENDING) |
60 | 60 | currentBuild.description = githubHelper.getBuildDescription() |
61 | 61 | try {{ |
62 | 62 | // Trigger the actual build and test jobs in parallel |
63 | 63 | parallel build: {{ |
64 | 64 | def buildJob = 'nixl-ci-build' |
65 | | - def build = build job: buildJob, parameters: [ |
| 65 | + build job: buildJob, parameters: [ |
66 | 66 | string(name: 'sha1', value: githubHelper.getMergedSHA()), |
67 | 67 | string(name: 'githubData', value: VARIABLE_FROM_POST) |
68 | | - ], propagate: false |
69 | | - currentBuild.description += "<br>Job: <a href='${{JENKINS_URL}}blue/organizations/jenkins/NIXL%2F${{buildJob}}/detail/${{buildJob}}/${{build.number}}/pipeline/'>${{buildJob}}</a> Result: <b style='color:${{build.result == 'SUCCESS' ? 'green' : 'red'}}'>${{build.result}}</b>" |
70 | | - if (!build.resultIsBetterOrEqualTo('SUCCESS')) {{ |
71 | | - currentBuild.result = build.result |
72 | | - error("Job ${{buildJob}} failed") |
73 | | - }} |
| 68 | + ] |
74 | 69 | }}, test: {{ |
75 | 70 | def buildJob = 'nixl-ci-test' |
76 | | - def build = build job: buildJob, parameters: [ |
| 71 | + build job: buildJob, parameters: [ |
77 | 72 | string(name: 'sha1', value: githubHelper.getMergedSHA()), |
78 | 73 | string(name: 'githubData', value: VARIABLE_FROM_POST) |
79 | | - ], propagate: false |
80 | | - currentBuild.description += "<br>Job: <a href='${{JENKINS_URL}}blue/organizations/jenkins/NIXL%2F${{buildJob}}/detail/${{buildJob}}/${{build.number}}/pipeline/'>${{buildJob}}</a> Result: <b style='color:${{build.result == 'SUCCESS' ? 'green' : 'red'}}'>${{build.result}}</b>" |
81 | | - if (!build.resultIsBetterOrEqualTo('SUCCESS')) {{ |
82 | | - currentBuild.result = build.result |
83 | | - error("Job ${{buildJob}} failed") |
84 | | - }} |
| 74 | + ] |
85 | 75 | }}, |
86 | 76 | failFast: false // Continue even if some parallel jobs fail |
87 | 77 |
|
88 | | - githubHelper.updateCommitStatus("$BUILD_URL", "CI Dispatcher successeded", GitHubCommitState.SUCCESS) |
| 78 | + githubHelper.updateCommitStatus(blueOceanUrl, "NIXL CI Succeeded", GitHubCommitState.SUCCESS) |
89 | 79 | }} catch(Exception ex) {{ |
90 | 80 | // Handle build failures |
91 | 81 | currentBuild.result = 'FAILURE' |
92 | 82 | println ex |
93 | | - githubHelper.updateCommitStatus("$BUILD_URL", "CI Dispatcher failed", GitHubCommitState.FAILURE) |
| 83 | + githubHelper.updateCommitStatus(blueOceanUrl, "NIXL CI Failed", GitHubCommitState.FAILURE) |
94 | 84 | error("failed") |
95 | 85 | }} |
96 | 86 |
|
97 | 87 | # Template for the main build job that performs the actual build process |
98 | 88 | - job-template: |
99 | 89 | name: "{jjb_proj}-build" # Will be expanded to 'nixl-ci-build' |
100 | 90 | project-type: pipeline |
101 | | - folder: "{jjb_folder}" |
102 | 91 | disabled: false |
103 | 92 | properties: |
104 | 93 | # Similar properties as dispatcher job |
|
161 | 150 | - job-template: |
162 | 151 | name: "{jjb_proj}-test" # Will be expanded to 'nixl-ci-test' |
163 | 152 | project-type: pipeline |
164 | | - folder: "{jjb_folder}" |
165 | 153 | disabled: false |
166 | 154 | properties: |
167 | 155 | # Similar properties as dispatcher job |
|
226 | 214 | - job-template: |
227 | 215 | name: "{jjb_proj}-build-container" |
228 | 216 | project-type: pipeline |
229 | | - folder: "{jjb_folder}" |
230 | 217 | disabled: false |
231 | 218 | properties: |
232 | 219 | - build-discarder: |
|
325 | 312 | jjb_proj: 'nixl-ci' # Project prefix for job names |
326 | 313 | jjb_git: 'git@github.com:ai-dynamo/nixl.git' # Repository URL |
327 | 314 | jjb_jenkinsfile: '.ci/jenkins/pipeline/Jenkinsfile' # Main pipeline definition |
328 | | - jjb_folder: 'NIXL' |
329 | 315 | jjb_branch: 'main' # Default branch |
330 | 316 | jjb_gh_url: 'https://github.com/ai-dynamo/nixl' # GitHub web URL |
331 | 317 | jobs: |
|
0 commit comments