Skip to content

Commit

Permalink
Fix: create m2repo path for copy command
Browse files Browse the repository at this point in the history
Issue: RELENG-5637
Signed-off-by: Kevin Sandi <[email protected]>
Change-Id: Ie1a19bc1531862cee490164beb95d22fcee88dd8
  • Loading branch information
keanjapesan committed Nov 28, 2024
1 parent 377006d commit 4eb9ea0
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 16 deletions.
30 changes: 15 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,38 @@ projects save time from having to define their own job templates.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

## For Detail Documentation [Global-JJB](http://docs.releng.linuxfoundation.org/projects/global-jjb)
6 changes: 6 additions & 0 deletions releasenotes/notes/fix-sbom-generator-c48b4e40496335d2.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
fixes:
- |
Explicitly create m2repo path for copy command before moving files to it
as per sbom generator script was assuming the filesystem path exists and
it could not be the case.
4 changes: 3 additions & 1 deletion shell/sbom-generator.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,10 @@ if [[ "$JOB_NAME" =~ "maven" ]]; then

mv "${WORKSPACE}/archives/bom-Java-Maven.spdx" \
"${WORKSPACE}/archives/${PROJECT##*/}-sbom-${release_version}.spdx"
M2REPO_PATH="${WORKSPACE}/m2repo/${group_id_path}"
mkdir -p "${M2REPO_PATH}"
cp "${WORKSPACE}/archives/${PROJECT##*/}-sbom-${release_version}.spdx" \
"${WORKSPACE}/m2repo/${group_id_path}/${PROJECT##*/}-sbom-${release_version}.spdx"
"${M2REPO_PATH}/${PROJECT##*/}-sbom-${release_version}.spdx"
fi

mv spdx-sbom-generator /tmp/
Expand Down

0 comments on commit 4eb9ea0

Please sign in to comment.