Skip to content

Commit f70f88d

Browse files
NirWolfergalnoam
authored andcommitted
[CI] issue: 4681261 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 0dc96e0 commit f70f88d

File tree

4 files changed

+13
-161
lines changed

4 files changed

+13
-161
lines changed

.ci/pipeline/dr_weekly_jjb.yaml

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

.ci/pipeline/dr_weekly_matrix.yaml

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

.ci/pipeline/release_jjb.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,17 @@
4343
name: "conf_file"
4444
default: ".ci/pipeline/release_matrix_job.yaml"
4545
description: "job config file. Do not change it"
46+
- bool:
47+
name: "do_dr_build"
48+
default: false
49+
description: "Build DR weekly"
4650
pipeline-scm:
4751
scm:
4852
- git:
4953
url: "{jjb_git}"
5054
credentials-id: 'swx-jenkins_ssh_key'
5155
branches: ['$sha1']
52-
shallow-clone: true
56+
shallow-clone: false
5357
depth: 2
5458
refspec: "+refs/pull/*:refs/remotes/origin/pr/*"
5559
browser: githubweb

.ci/pipeline/release_matrix_job.yaml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ kubernetes:
1414
arch_table:
1515
x86_64:
1616
nodeSelector: 'kubernetes.io/arch=amd64'
17-
jnlpImage: 'harbor.mellanox.com/toolbox/c3po-jnlp:latest'
17+
jnlpImage: 'nbu-harbor.gtm.nvidia.com/toolbox/c3po-jnlp:latest'
1818

1919
env:
2020
MAIL_FROM: [email protected]
@@ -42,13 +42,19 @@ steps:
4242
- name: Release
4343
parallel: false
4444
run: |
45+
if ${do_dr_build}; then
46+
git checkout tags/${release_tag}
47+
fi
4548
.ci/do_release.sh
4649
archiveArtifacts: pkg/build_pkg.log,pkg/packages/*.rpm
4750

4851
pipeline_start:
4952
shell: action
5053
module: groovy
5154
run: |
55+
if (params.do_dr_build) {
56+
env.release_tag = sh (returnStdout: true, script: "git describe --tags --abbrev=0 2>/dev/null").trim()
57+
}
5258
echo "Starting release process for LibVMA-${release_tag}"
5359
currentBuild.displayName += "-${release_tag}"
5460
@@ -60,7 +66,7 @@ pipeline_stop:
6066
mail from: "${MAIL_FROM}",
6167
mimeType: 'text/html',
6268
to: "${notification_email}",
63-
subject: "Release build ended for LibVMA - ${release_tag}",
69+
subject: "${params.do_dr_build ? 'Weekly DR' : 'Release'} build ended for LibVMA - ${release_tag}",
6470
body: """
6571
<p><b>Tag:</b> ${release_tag}</p>
6672
<p><b>Build url:</b> <a href=${currentBuild.absoluteUrl}>link</a></p>

0 commit comments

Comments
 (0)