Skip to content

Commit f8a1b2a

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 5412ecf commit f8a1b2a

File tree

4 files changed

+13
-164
lines changed

4 files changed

+13
-164
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: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
description: "Tag to release"
2222
- string:
2323
name: sha1
24-
default: 'tags/$release_tag'
24+
default: 'vNext'
2525
description: 'commit to use, defaults to the commit tag provided under release_tag'
2626
- string:
2727
name: "revision"
@@ -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: 7 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,17 @@ steps:
4848
- name: Release
4949
parallel: false
5050
run: |
51-
.ci/do_release.sh
51+
git checkout tags/${release_tag}
52+
.ci/do_release.sh
5253
archiveArtifacts: "**/build_pkg.log,**/packages/*.rpm"
5354

5455
pipeline_start:
5556
shell: action
5657
module: groovy
5758
run: |
59+
if (params.do_dr_build) {
60+
env.release_tag = sh (returnStdout: true, script: "git describe --tags --abbrev=0 2>/dev/null").trim()
61+
}
5862
echo "Starting release process for LibXLIO-${release_tag}"
5963
currentBuild.displayName += "-${release_tag}"
6064
@@ -66,7 +70,7 @@ pipeline_stop:
6670
mail from: "${MAIL_FROM}",
6771
mimeType: 'text/html',
6872
to: "${notification_email}",
69-
subject: "Release build ended for LibXLIO - ${release_tag}",
73+
subject: "${params.do_dr_build ? 'Weekly DR' : 'Release'} build ended for LibXLIO - ${release_tag}",
7074
body: """
7175
<p><b>Tag:</b> ${release_tag}</p>
7276
<p><b>Build url:</b> <a href=${currentBuild.absoluteUrl}>link</a></p>

0 commit comments

Comments
 (0)