Skip to content

Commit c72b3aa

Browse files
committed
[CI] issue: HPCINFRA-3388 Run all CI steps on containers
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 Signed-off-by: NirWolfer <[email protected]>
1 parent 1691622 commit c72b3aa

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
@@ -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: 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]
@@ -48,13 +48,19 @@ steps:
4848
- name: Release
4949
parallel: false
5050
run: |
51-
.ci/do_release.sh
51+
if ${do_dr_build}; then
52+
git checkout tags/${release_tag}
53+
fi
54+
.ci/do_release.sh
5255
archiveArtifacts: "**/build_pkg.log,**/packages/*.rpm"
5356

5457
pipeline_start:
5558
shell: action
5659
module: groovy
5760
run: |
61+
if (params.do_dr_build) {
62+
env.release_tag = sh (returnStdout: true, script: "git describe --tags --abbrev=0 2>/dev/null").trim()
63+
}
5864
echo "Starting release process for LibXLIO-${release_tag}"
5965
currentBuild.displayName += "-${release_tag}"
6066
@@ -66,7 +72,7 @@ pipeline_stop:
6672
mail from: "${MAIL_FROM}",
6773
mimeType: 'text/html',
6874
to: "${notification_email}",
69-
subject: "Release build ended for LibXLIO - ${release_tag}",
75+
subject: "${params.do_dr_build ? 'Weekly DR' : 'Release'} build ended for LibXLIO - ${release_tag}",
7076
body: """
7177
<p><b>Tag:</b> ${release_tag}</p>
7278
<p><b>Build url:</b> <a href=${currentBuild.absoluteUrl}>link</a></p>

0 commit comments

Comments
 (0)