Skip to content

Commit e0d4799

Browse files
NirWolfergalnoam
authored andcommitted
[CI] issue: HPCINFRA-3388 DR Weekly - do not run on master
Today we have a few CI pipelines that still use nodeLabel: 'master' in their matrix file, causing some steps to run on the master node. This is a security risk and we should run only on containers, the master node will be taken down in the future not allowing this type of run. Removed weekly dr job that uses nodelabel definition, move this ability to the release pipeline Weekly DR test job now runs using the release pipeline, which doesnt use the master node (runs on containers only) Signed-off-by: NirWolfer <[email protected]>
1 parent 1d6f055 commit e0d4799

File tree

4 files changed

+14
-163
lines changed

4 files changed

+14
-163
lines changed

.ci/pipeline/dr_weekly_jjb.yaml

Lines changed: 0 additions & 68 deletions
This file was deleted.

.ci/pipeline/dr_weekly_matrix.yaml

Lines changed: 0 additions & 91 deletions
This file was deleted.

.ci/pipeline/release_jjb.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,17 @@
4747
name: "conf_file"
4848
default: ".ci/pipeline/release_matrix_job.yaml"
4949
description: "job config file. Do not change it"
50+
- bool:
51+
name: "do_dr_build"
52+
default: false
53+
description: "Build DR weekly"
5054
pipeline-scm:
5155
scm:
5256
- git:
5357
url: "{jjb_git}"
5458
credentials-id: 'swx-jenkins_ssh_key'
5559
branches: ['$sha1']
56-
shallow-clone: true
60+
shallow-clone: false
5761
depth: 2
5862
refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
5963
browser: githubweb

.ci/pipeline/release_matrix_job.yaml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ kubernetes:
1515
arch_table:
1616
x86_64:
1717
nodeSelector: 'kubernetes.io/arch=amd64'
18-
jnlpImage: 'harbor.mellanox.com/toolbox/c3po-jnlp:latest'
18+
jnlpImage: 'nbu-harbor.gtm.nvidia.com/toolbox/c3po-jnlp:latest'
1919

2020
env:
2121
MAIL_FROM: [email protected]
@@ -52,7 +52,10 @@ steps:
5252
- name: Release
5353
parallel: false
5454
run: |
55-
.ci/do_release.sh
55+
if ${do_dr_build}; then
56+
git checkout tags/${release_tag}
57+
fi
58+
.ci/do_release.sh
5659
archiveArtifacts: "**/build_pkg.log,**/packages/*.rpm"
5760

5861
- name: Antivirus
@@ -65,6 +68,9 @@ pipeline_start:
6568
shell: action
6669
module: groovy
6770
run: |
71+
if (params.do_dr_build) {
72+
env.release_tag = sh (returnStdout: true, script: "git describe --tags --abbrev=0 2>/dev/null").trim()
73+
}
6874
echo "Starting release process for LibXLIO-${release_tag}"
6975
currentBuild.displayName += "-${release_tag}"
7076
@@ -76,7 +82,7 @@ pipeline_stop:
7682
mail from: "${MAIL_FROM}",
7783
mimeType: 'text/html',
7884
to: "${notification_email}",
79-
subject: "Release build ended for LibXLIO - ${release_tag}",
85+
subject: "${params.do_dr_build ? 'Weekly DR' : 'Release'} build ended for LibXLIO - ${release_tag}",
8086
body: """
8187
<p><b>Tag:</b> ${release_tag}</p>
8288
<p><b>Build url:</b> <a href=${currentBuild.absoluteUrl}>link</a></p>

0 commit comments

Comments
 (0)