Skip to content

Commit c29dab5

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

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.ci/blackduck_source.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,11 @@ echo " NAME: ${PROJECT_NAME}"
2323
echo " VERSION: ${PROJECT_VERSION}"
2424
echo " SRC_PATH: ${PROJECT_SRC_PATH}"
2525

26+
whoami
27+
2628
# clone BlackDuck
2729
[[ -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
30+
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
2931
cd /tmp/blackduck
3032

3133
# 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: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ 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+
1922
env:
2023
MAIL_FROM: [email protected]
2124

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

4155
steps:
4256
- name: Release
43-
parallel: false
57+
containerSelector:
58+
- "{name: 'rhel8.6', variant:1}"
4459
run: |
4560
.ci/do_release.sh
4661
archiveArtifacts: pkg/build_pkg.log,pkg/packages/*.rpm
4762

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

0 commit comments

Comments
 (0)