Skip to content

Commit 3d750d7

Browse files
committed
[CI] issue: HPCINFRA-3964 add Blackduck step to release job
Signed-off-by: Noam Tsemah <[email protected]>
1 parent 5fd84fb commit 3d750d7

File tree

3 files changed

+34
-5
lines changed

3 files changed

+34
-5
lines changed

.ci/blackduck_source.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,20 @@ cd "$topdir"
55

66
# Check if the variables and pipeline attributes are set
77
[[ -z "${WORKSPACE}" ]] && { echo "Error: WORKSPACE variable is not set"; exit 1; }
8-
[[ -z "$BLACKDUCK_API_TOKEN" ]] && { echo "Error: BLACKDUCK_API_TOKEN variable is not set"; exit 1; }
8+
[[ -z "${BLACKDUCK_API_TOKEN}" ]] && { echo "Error: BLACKDUCK_API_TOKEN variable is not set"; exit 1; }
99
[[ ! -d "${WORKSPACE}/logs" ]] && mkdir -p "${WORKSPACE}/logs"
1010

1111
# Create valid JSON for further authentication in BlackDuck server
1212
json=$(jq -n \
13-
--arg token "$BLACKDUCK_API_TOKEN" \
13+
--arg token "${BLACKDUCK_API_TOKEN}" \
1414
'{"blackduck.url": "https://blackduck.mellanox.com/", "blackduck.api.token": $token }')
1515

1616
export SPRING_APPLICATION_JSON="$json"
1717
export PROJECT_NAME=libxlio
18-
export PROJECT_VERSION="$sha1"
18+
export PROJECT_VERSION="${sha1}"
1919
export PROJECT_SRC_PATH="$topdir"/
2020

21-
echo "Running BlackDuck (SRC) on $name"
21+
echo "Running BlackDuck (SRC) on ${name}"
2222

2323
echo "CONFIG:"
2424
echo " NAME: ${PROJECT_NAME}"

.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: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ kubernetes:
1717
nodeSelector: 'kubernetes.io/arch=amd64'
1818
jnlpImage: 'harbor.mellanox.com/toolbox/c3po-jnlp:latest'
1919

20+
credentials:
21+
- {credentialsId: 'blackduck_api_token', type: 'string', variable: 'BLACKDUCK_API_TOKEN'}
22+
2023
env:
2124
MAIL_FROM: [email protected]
2225

@@ -35,22 +38,44 @@ runs_on_dockers:
3538
arch: 'x86_64',
3639
tag: '20250304'
3740
}
38-
41+
- {
42+
file: '.ci/dockerfiles/Dockerfile.rhel8.6',
43+
arch: 'x86_64',
44+
name: 'xlio_static.bduck',
45+
uri: '$arch/$name',
46+
tag: '20250418',
47+
build_args: '--no-cache --target bduck',
48+
category: 'tool'
49+
}
3950

4051
steps:
4152
- name: Build-dpcp
4253
parallel: false
54+
containerSelector:
55+
- "{name: 'rhel8.6'}"
4356
run: |
4457
git clone https://github.com/Mellanox/libdpcp.git libdpcp
4558
cd libdpcp
4659
./autogen.sh && ./configure --prefix=/usr && sudo make install
4760
4861
- name: Release
4962
parallel: false
63+
containerSelector:
64+
- "{name: 'rhel8.6'}"
5065
run: |
5166
.ci/do_release.sh
5267
archiveArtifacts: "**/build_pkg.log,**/packages/*.rpm"
5368

69+
- name: Blackduck
70+
enable: ${do_blackduck}
71+
parallel: false
72+
containerSelector:
73+
- "{name: 'xlio_static.bduck', category:'tool'}"
74+
run: |
75+
.ci/blackduck_source.sh
76+
archiveArtifacts: 'logs/'
77+
credentialsId: 'blackduck_api_token'
78+
5479
pipeline_start:
5580
shell: action
5681
module: groovy

0 commit comments

Comments
 (0)