|
| 1 | +# Copyright (c) NVIDIA CORPORATION & AFFILIATES, 2026. ALL RIGHTS RESERVED. |
| 2 | +# See file LICENSE for terms. |
| 3 | +# |
| 4 | +# Jenkins Job Builder (JJB) configuration for UCX GitHub (Blossom) jobs |
| 5 | +# |
| 6 | +# Entry point: ucx-dispatcher-github (generic-webhook-trigger token must match job name) |
| 7 | +# Leaf jobs: ucx-*-github (triggered by dispatcher, not directly from GitHub) |
| 8 | +# |
| 9 | +# NOTE: This file is applied by DevOps to Jenkins. |
| 10 | + |
| 11 | +- job-template: |
| 12 | + name: "{jjb_proj}-dispatcher-github" |
| 13 | + folder: "UCX-GitHub" |
| 14 | + project-type: pipeline |
| 15 | + properties: |
| 16 | + - github: |
| 17 | + url: "https://github.com/openucx/ucx" |
| 18 | + - build-discarder: |
| 19 | + days-to-keep: 14 |
| 20 | + num-to-keep: 1000 |
| 21 | + - inject: |
| 22 | + keep-system-variables: true |
| 23 | + properties-content: | |
| 24 | + jjb_proj={jjb_proj}-dispatcher-github |
| 25 | + triggers: |
| 26 | + - generic-webhook-trigger: |
| 27 | + token: "{jjb_proj}-dispatcher-github" |
| 28 | + print-contributors: true |
| 29 | + print-posted-content: true |
| 30 | + silent-response: false |
| 31 | + cause: "GitHub Blossom trigger" |
| 32 | + post-content-params: |
| 33 | + - type: JSONPath |
| 34 | + key: githubData |
| 35 | + value: $ |
| 36 | + - type: JSONPath |
| 37 | + key: VARIABLE_FROM_POST |
| 38 | + value: $ |
| 39 | + description: "UCX GitHub dispatcher (Blossom). Do NOT edit via Web GUI!" |
| 40 | + concurrent: true |
| 41 | + sandbox: true |
| 42 | + parameters: |
| 43 | + - string: |
| 44 | + name: "VARIABLE_FROM_POST" |
| 45 | + default: "" |
| 46 | + description: "Raw GitHub webhook payload (Blossom)" |
| 47 | + dsl: | |
| 48 | + @Library('blossom-github-lib@master') |
| 49 | + import ipp.blossom.* |
| 50 | +
|
| 51 | + def githubHelper = null |
| 52 | + withCredentials([usernamePassword(credentialsId: 'github-token', passwordVariable: 'GIT_PASSWORD', usernameVariable: 'GIT_USERNAME')]) {{ |
| 53 | + githubHelper = GithubHelper.getInstance("${{GIT_PASSWORD}}", VARIABLE_FROM_POST) |
| 54 | + }} |
| 55 | +
|
| 56 | + def sha = githubHelper.getMergedSHA() |
| 57 | +
|
| 58 | + currentBuild.description = githubHelper.getBuildDescription() |
| 59 | +
|
| 60 | + def jobs = [ |
| 61 | + 'ucx-codestyle-github', |
| 62 | + 'ucx-static-checks-github', |
| 63 | + 'ucx-coverity-github', |
| 64 | + 'ucx-build-github', |
| 65 | + 'ucx-build-static-github', |
| 66 | + ] |
| 67 | +
|
| 68 | + def fanout = [:] |
| 69 | + for (def j in jobs) {{ |
| 70 | + def jobName = "UCX-GitHub/${{j}}" |
| 71 | + fanout[jobName] = {{ |
| 72 | + build job: jobName, parameters: [ |
| 73 | + string(name: 'sha1', value: sha), |
| 74 | + string(name: 'githubData', value: VARIABLE_FROM_POST), |
| 75 | + ], propagate: false, wait: true |
| 76 | + }} |
| 77 | + }} |
| 78 | + parallel fanout |
| 79 | +
|
| 80 | +- job-template: |
| 81 | + name: "{jjb_proj}" |
| 82 | + folder: "UCX-GitHub" |
| 83 | + project-type: pipeline |
| 84 | + disabled: false |
| 85 | + properties: |
| 86 | + - github: |
| 87 | + url: "https://github.com/openucx/ucx" |
| 88 | + - build-discarder: |
| 89 | + days-to-keep: 14 |
| 90 | + num-to-keep: 1000 |
| 91 | + - inject: |
| 92 | + keep-system-variables: true |
| 93 | + properties-content: | |
| 94 | + jjb_proj={jjb_proj} |
| 95 | + description: "{jjb_description}" |
| 96 | + concurrent: true |
| 97 | + sandbox: true |
| 98 | + parameters: |
| 99 | + - string: |
| 100 | + name: "sha1" |
| 101 | + default: "master" |
| 102 | + description: "Git ref/commit to build, set by dispatcher" |
| 103 | + - string: |
| 104 | + name: "githubData" |
| 105 | + default: "" |
| 106 | + description: "Webhook payload from Blossom" |
| 107 | + - string: |
| 108 | + name: "conf_file" |
| 109 | + default: "{jjb_conf_file}" |
| 110 | + description: "Matrix config file" |
| 111 | + - bool: |
| 112 | + name: "build_dockers" |
| 113 | + default: false |
| 114 | + description: "Force rebuild docker containers (if supported)" |
| 115 | + - string: |
| 116 | + name: "DEBUG" |
| 117 | + default: 0 |
| 118 | + description: "Enable debug prints and traces, valid values are 0-9" |
| 119 | + pipeline-scm: |
| 120 | + scm: |
| 121 | + - git: |
| 122 | + url: "https://github.com/openucx/ucx.git" |
| 123 | + branches: [ '$sha1' ] |
| 124 | + shallow-clone: false |
| 125 | + do-not-fetch-tags: false |
| 126 | + refspec: "+refs/heads/*:refs/remotes/origin/* +refs/pull/*:refs/remotes/origin/pr/* +refs/tags/*:refs/remotes/origin/tags/*" |
| 127 | + browser: githubweb |
| 128 | + browser-url: "https://github.com/openucx/ucx" |
| 129 | + script-path: ".ci/jenkins/Jenkinsfile.github" |
| 130 | + |
| 131 | +- project: |
| 132 | + name: ucx-dispatcher-github |
| 133 | + jjb_proj: "ucx" |
| 134 | + jobs: |
| 135 | + - "{jjb_proj}-dispatcher-github" |
| 136 | + |
| 137 | +- project: |
| 138 | + name: ucx-codestyle-github |
| 139 | + jjb_proj: "ucx-codestyle-github" |
| 140 | + jjb_conf_file: ".ci/pipeline/codestyle_matrix.yaml" |
| 141 | + jjb_description: "UCX Codestyle checks (GitHub Blossom). Do NOT edit via Web GUI!" |
| 142 | + jobs: |
| 143 | + - "{jjb_proj}" |
| 144 | + |
| 145 | +- project: |
| 146 | + name: ucx-static-checks-github |
| 147 | + jjb_proj: "ucx-static-checks-github" |
| 148 | + jjb_conf_file: ".ci/pipeline/static_checks_matrix.yaml" |
| 149 | + jjb_description: "UCX Static checks (GitHub Blossom). Do NOT edit via Web GUI!" |
| 150 | + jobs: |
| 151 | + - "{jjb_proj}" |
| 152 | + |
| 153 | +- project: |
| 154 | + name: ucx-coverity-github |
| 155 | + jjb_proj: "ucx-coverity-github" |
| 156 | + jjb_conf_file: ".ci/pipeline/coverity_matrix.yaml" |
| 157 | + jjb_description: "UCX Coverity (GitHub Blossom). Do NOT edit via Web GUI!" |
| 158 | + jobs: |
| 159 | + - "{jjb_proj}" |
| 160 | + |
| 161 | +- project: |
| 162 | + name: ucx-build-github |
| 163 | + jjb_proj: "ucx-build-github" |
| 164 | + jjb_conf_file: ".ci/pipeline/build_matrix.yaml" |
| 165 | + jjb_description: "UCX Build job (GitHub Blossom). Do NOT edit via Web GUI!" |
| 166 | + jobs: |
| 167 | + - "{jjb_proj}" |
| 168 | + |
| 169 | +- project: |
| 170 | + name: ucx-build-static-github |
| 171 | + jjb_proj: "ucx-build-static-github" |
| 172 | + jjb_conf_file: ".ci/pipeline/build_static_matrix.yaml" |
| 173 | + jjb_description: "UCX Static build (GitHub Blossom). Do NOT edit via Web GUI!" |
| 174 | + jobs: |
| 175 | + - "{jjb_proj}" |
0 commit comments