Skip to content

Commit 4eb9ea0

Browse files
committed
Fix: create m2repo path for copy command
Issue: RELENG-5637 Signed-off-by: Kevin Sandi <[email protected]> Change-Id: Ie1a19bc1531862cee490164beb95d22fcee88dd8
1 parent 377006d commit 4eb9ea0

File tree

3 files changed

+24
-16
lines changed

3 files changed

+24
-16
lines changed

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,38 +13,38 @@ projects save time from having to define their own job templates.
1313

1414
### [Install](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/)
1515

16-
- [Jenkins configuration](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#jenkins-configuration)
16+
- [Jenkins configuration](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#jenkins-configuration)
1717

18-
- [ci-management](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#ci-management)
18+
- [ci-management](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#ci-management)
1919

20-
- [Deploy ci-jobs](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#deploy-ci-jobs)
20+
- [Deploy ci-jobs](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#deploy-ci-jobs)
2121

22-
- [Deploy packer-jobs](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#deploy-packer-jobs)
22+
- [Deploy packer-jobs](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/install.html#deploy-packer-jobs)
2323

2424
### [Configuration](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html)
2525

26-
- [defaults.yaml](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#defaults-yaml)
26+
- [defaults.yaml](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#defaults-yaml)
2727

28-
- [Jenkins Files](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#jenkins-files)
28+
- [Jenkins Files](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#jenkins-files)
2929

30-
- [Jenkins CI Jobs](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#jenkins-ci-jobs)
30+
- [Jenkins CI Jobs](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#jenkins-ci-jobs)
3131

32-
- [Log Archiving](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#log-archiving)
32+
- [Log Archiving](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/configuration.html#log-archiving)
3333

3434
### [Best Practices](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html)
3535

36-
- [JJB YAML Layout](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#jjb-yaml-layout)
36+
- [JJB YAML Layout](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#jjb-yaml-layout)
3737

38-
- [Passing parameters to shell scripts](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#passing-parameters-to-shell-scripts)
38+
- [Passing parameters to shell scripts](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#passing-parameters-to-shell-scripts)
3939

40-
- [Shell scripts](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#shell-scripts)
40+
- [Shell scripts](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#shell-scripts)
4141

42-
- [Usage of config-file-provider](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#usage-of-config-file-provider)
42+
- [Usage of config-file-provider](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#usage-of-config-file-provider)
4343

44-
- [Preserving Objects in Variable References](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#preserving-objects-in-variable-references)
44+
- [Preserving Objects in Variable References](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#preserving-objects-in-variable-references)
4545

46-
- [Using single quotes around variables](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#using-single-quotes-around-variables)
46+
- [Using single quotes around variables](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#using-single-quotes-around-variables)
4747

48-
- [Variable expansion and Defaults](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#variable-expansion-and-defaults)
48+
- [Variable expansion and Defaults](https://docs.releng.linuxfoundation.org/projects/global-jjb/en/latest/best-practices.html#variable-expansion-and-defaults)
4949

5050
## For Detail Documentation [Global-JJB](http://docs.releng.linuxfoundation.org/projects/global-jjb)
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
fixes:
3+
- |
4+
Explicitly create m2repo path for copy command before moving files to it
5+
as per sbom generator script was assuming the filesystem path exists and
6+
it could not be the case.

shell/sbom-generator.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@ if [[ "$JOB_NAME" =~ "maven" ]]; then
4545

4646
mv "${WORKSPACE}/archives/bom-Java-Maven.spdx" \
4747
"${WORKSPACE}/archives/${PROJECT##*/}-sbom-${release_version}.spdx"
48+
M2REPO_PATH="${WORKSPACE}/m2repo/${group_id_path}"
49+
mkdir -p "${M2REPO_PATH}"
4850
cp "${WORKSPACE}/archives/${PROJECT##*/}-sbom-${release_version}.spdx" \
49-
"${WORKSPACE}/m2repo/${group_id_path}/${PROJECT##*/}-sbom-${release_version}.spdx"
51+
"${M2REPO_PATH}/${PROJECT##*/}-sbom-${release_version}.spdx"
5052
fi
5153

5254
mv spdx-sbom-generator /tmp/

0 commit comments

Comments
 (0)