Skip to content

Commit c3dd0d3

Browse files
committed
[CI] issue: 4705805 Add Blackduck to release job
Signed-off-by: Noam Tsemah <[email protected]>
1 parent 0dc96e0 commit c3dd0d3

File tree

3 files changed

+33
-2
lines changed

3 files changed

+33
-2
lines changed

.ci/blackduck_source.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ echo " SRC_PATH: ${PROJECT_SRC_PATH}"
2525

2626
# clone BlackDuck
2727
[[ -d /tmp/blackduck ]] && rm -rf /tmp/blackduck
28-
sudo -u swx-jenkins git clone -c core.sshCommand="ssh -i ~/.ssh/id_ed25519" -b master --single-branch --depth=1 ssh://git-nbu.nvidia.com:12023/DevOps/Tools/blackduck /tmp/blackduck
28+
git clone -c core.sshCommand="ssh -i ~/.ssh/id_ed25519" -b master --single-branch --depth=1 ssh://git-nbu.nvidia.com:12023/DevOps/Tools/blackduck /tmp/blackduck
2929
cd /tmp/blackduck
3030

3131
# disable check errors

.ci/pipeline/release_jjb.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
name: "do_release"
3636
default: true
3737
description: "Release build packges into the release folder, set to false for debugging"
38+
- bool:
39+
name: "do_blackduck"
40+
default: true
41+
description: "Run BlackDuck."
3842
- string:
3943
name: "notification_email"
4044
default: "{jjb_release_email}"

.ci/pipeline/release_matrix_job.yaml

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ kubernetes:
1616
nodeSelector: 'kubernetes.io/arch=amd64'
1717
jnlpImage: 'harbor.mellanox.com/toolbox/c3po-jnlp:latest'
1818

19+
credentials:
20+
- {credentialsId: 'blackduck_api_token', type: 'string', variable: 'BLACKDUCK_API_TOKEN'}
21+
- {credentialsId: 'swx-jenkins2-svc-gerrit-ssh-key', keyFileVariable: 'GERRIT_SSH_KEY', type: 'sshUserPrivateKey'}
22+
1923
env:
2024
MAIL_FROM: [email protected]
2125

@@ -37,14 +41,37 @@ runs_on_dockers:
3741
arch: 'x86_64',
3842
tag: '20250128'
3943
}
44+
- {
45+
name: 'blackduck',
46+
file: '.ci/dockerfiles/Dockerfile.rhel8.6',
47+
category: 'tool',
48+
arch: 'x86_64',
49+
tag: '20250630',
50+
uri: 'vma/$arch/$name/bduck',
51+
build_args: '--no-cache --target bduck',
52+
runAsUser: '6213',
53+
runAsGroup: '101'
54+
}
4055

4156
steps:
4257
- name: Release
43-
parallel: false
58+
containerSelector:
59+
- "{name: 'rhel8.6', variant:1}"
4460
run: |
4561
.ci/do_release.sh
4662
archiveArtifacts: pkg/build_pkg.log,pkg/packages/*.rpm
4763

64+
- name: Blackduck
65+
enable: ${do_blackduck}
66+
containerSelector:
67+
- "{name: 'blackduck', category:'tool', variant:1}"
68+
run: |
69+
.ci/blackduck_source.sh
70+
archiveArtifacts: 'logs/'
71+
credentialsId:
72+
- "swx-jenkins2-svc-gerrit-ssh-key"
73+
- "blackduck_api_token"
74+
4875
pipeline_start:
4976
shell: action
5077
module: groovy

0 commit comments

Comments
 (0)