diff --git a/.ci/pipeline/dr_weekly_jjb.yaml b/.ci/pipeline/dr_weekly_jjb.yaml deleted file mode 100644 index 2076b8020..000000000 --- a/.ci/pipeline/dr_weekly_jjb.yaml +++ /dev/null @@ -1,68 +0,0 @@ -- job-template: - name: "{jjb_proj}" - project-type: pipeline - folder: pdc - properties: - - github: - url: "https://github.com/Mellanox/libxlio" - - build-discarder: - days-to-keep: 120 - num-to-keep: 20 - - inject: - keep-system-variables: true - properties-content: | - jjb_proj={jjb_proj} - description: Do NOT edit this job through the Web GUI ! - concurrent: false - parameters: - - string: - name: "sha1" - default: "vNext" - description: "Branch or sha1 to check out" - - string: - name: "release_tag" - default: "" - description: "Tag to release" - - string: - name: "release_folder" - default: "/tmp" - description: "Folder to release packages into. For NFS tests use /auto/sw/release/sw_acceleration/xlio/dr/weekly" - - string: - name: "CONF_FILE" - default: ".ci/pipeline/dr_weekly_matrix.yaml" - description: "Regex to select job config file" - - string: - name: "MAIL_TO" - default: "c2a304c7.NVIDIA.onmicrosoft.com@amer.teams.ms" - description: "Email address to send the report to" - triggers: - - timed: 'H 17 * * *' - pipeline-scm: - scm: - - git: - url: "{jjb_git}" - credentials-id: 'swx-jenkins_ssh_key' - branches: ['$sha1'] - shallow-clone: false - # depth: 10 - do-not-fetch-tags: false - # honor-refspec: true - refspec: "+refs/heads/*:refs/remotes/origin/* +refs/pull/*:refs/remotes/origin/pr/* +refs/tags/*:refs/remotes/origin/tags/*" - browser: githubweb - browser-url: "{jjb_git}" - submodule: - disable: false - recursive: true - tracking: true - parent-credentials: true - script-path: "{jjb_jenkinsfile}" - -- project: - name: libxlio - jjb_email: 'vlogin@nvidia.com' - jjb_proj: 'LIBXLIO-dr-weekly-launcher' - jjb_git: 'git@github.com:Mellanox/libxlio.git' - jjb_owner: 'Viacheslav Login' - jjb_jenkinsfile: '.ci/Jenkinsfile' - jobs: - - "{jjb_proj}" diff --git a/.ci/pipeline/dr_weekly_matrix.yaml b/.ci/pipeline/dr_weekly_matrix.yaml deleted file mode 100644 index 9743ce7ce..000000000 --- a/.ci/pipeline/dr_weekly_matrix.yaml +++ /dev/null @@ -1,91 +0,0 @@ ---- -job: LIBXLIO-dr-weekly-launcher -failFast: false -timeout_minutes: 120 - -runs_on_agents: - - {nodeLabel: 'master', category: 'base'} - -env: - MAIL_FROM: jenkins@nvidia.com - -pipeline_start: - shell: action - module: groovy - run: | - if (!params.MAIL_TO.isEmpty()) { - currentBuild.displayName += "_weekly-on-${sha1}" - mail from: "${MAIL_FROM}", - mimeType: 'text/html', - to: "${MAIL_TO}", - subject: 'LibXLIO weekly DR build has been started', - body: """ -
Branch: ${sha1}
-Build url: link
""" - } - -steps: - - name: Determine release_tag - agentSelector: - - "{category: 'base'}" - shell: action - module: groovy - run: | - if (params.release_tag.isEmpty()) { - env.RELEASE_TAG = sh (returnStdout: true, script: "git describe --tags --abbrev=0 2>/dev/null").trim() - } else { - env.RELEASE_TAG = "${params.release_tag}" - } - echo "Release tag for build: ${env.RELEASE_TAG}" - - - name: Check job state - shell: action - module: groovy - run: | - def job = Jenkins.instance.getItemByFullName('libxlio/LibXLIO-release') - if (!job.isBuildable()) { - echo "The job '${env.JOB}' is disabled. Enabling..." - job.setDisabled(false) - } - echo "The Job is enabled. Starting..." - - - name: Run Job with parameters - shell: action - module: groovy - run: | - echo "Release tag we're building on: ${env.RELEASE_TAG}" - if (env.RELEASE_TAG) { - def build = build job: 'libxlio/LibXLIO-release', - parameters: [ - string(name: 'release_tag', value: RELEASE_TAG), - string(name: 'release_folder', value: "${release_folder}"), - string(name: 'notification_email', value: MAIL_TO), - string(name: 'sha1', value: sha1), - ], - propagate: false - - env.LINUX_BUILD_URL = build.absoluteUrl - env.LINUX_BUILD_RES = build.result - if (!build.resultIsBetterOrEqualTo('SUCCESS')) { - currentBuild.result = 'FAILURE' - error("Weekly build failed") - } - } - -pipeline_stop: - shell: action - module: groovy - agentSelector: - - "{category: 'base'}" - run: | - if (!params.MAIL_TO.isEmpty()) { - mail from: "${MAIL_FROM}", - mimeType: 'text/html', - to: "${MAIL_TO}", - subject: "LibXLIO weekly DR build has ended - ${currentBuild.currentResult}", - body: """ -Branch: ${sha1}
-Version: ${env.RELEASE_TAG ?: "NA"}
-Weekly DR build: ${currentBuild.currentResult}
- """ - } diff --git a/.ci/pipeline/release_jjb.yaml b/.ci/pipeline/release_jjb.yaml index 4622a7333..63fc7f59a 100644 --- a/.ci/pipeline/release_jjb.yaml +++ b/.ci/pipeline/release_jjb.yaml @@ -43,13 +43,17 @@ name: "conf_file" default: ".ci/pipeline/release_matrix_job.yaml" description: "job config file. Do not change it" + - bool: + name: "do_dr_build" + default: false + description: "Build DR weekly" pipeline-scm: scm: - git: url: "{jjb_git}" credentials-id: 'swx-jenkins_ssh_key' branches: ['$sha1'] - shallow-clone: true + shallow-clone: false depth: 2 refspec: "+refs/pull/*:refs/remotes/origin/pr/*" browser: githubweb diff --git a/.ci/pipeline/release_matrix_job.yaml b/.ci/pipeline/release_matrix_job.yaml index 2f27d2ef5..440bc9af4 100644 --- a/.ci/pipeline/release_matrix_job.yaml +++ b/.ci/pipeline/release_matrix_job.yaml @@ -15,7 +15,7 @@ kubernetes: arch_table: x86_64: nodeSelector: 'kubernetes.io/arch=amd64' - jnlpImage: 'harbor.mellanox.com/toolbox/c3po-jnlp:latest' + jnlpImage: 'nbu-harbor.gtm.nvidia.com/toolbox/c3po-jnlp:latest' env: MAIL_FROM: jenkins@nvidia.com @@ -48,13 +48,19 @@ steps: - name: Release parallel: false run: | - .ci/do_release.sh + if ${do_dr_build}; then + git checkout tags/${release_tag} + fi + .ci/do_release.sh archiveArtifacts: "**/build_pkg.log,**/packages/*.rpm" pipeline_start: shell: action module: groovy run: | + if (params.do_dr_build) { + env.release_tag = sh (returnStdout: true, script: "git describe --tags --abbrev=0 2>/dev/null").trim() + } echo "Starting release process for LibXLIO-${release_tag}" currentBuild.displayName += "-${release_tag}" @@ -66,7 +72,7 @@ pipeline_stop: mail from: "${MAIL_FROM}", mimeType: 'text/html', to: "${notification_email}", - subject: "Release build ended for LibXLIO - ${release_tag}", + subject: "${params.do_dr_build ? 'Weekly DR' : 'Release'} build ended for LibXLIO - ${release_tag}", body: """Tag: ${release_tag}
Build url: link