Skip to content

Commit b8e0f81

Browse files
committed
fix ocm job
1 parent 2e3c47b commit b8e0f81

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

showroom/tasks/ocm.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ includes:
99

1010
tasks:
1111
create:
12-
desc: Walk through all available component constructors and create the component versions.
12+
desc: Build OCM transport archive from showroom descriptors.
1313
deps:
1414
- task: tools:install-ocm-v1
1515
requires:
@@ -18,7 +18,12 @@ tasks:
1818
- "{{ .OCM_CMD }} version | jq"
1919
- |
2020
shopt -s nullglob
21-
for FILE in ./ocm/*.yaml ; do
22-
{{ .OCM_CMD }} add componentversion --create --file ctf "$FILE"
23-
done
21+
FILES=(./showroom/ocm/*.yaml)
22+
if [[ ${#FILES[@]} -eq 0 ]]; then
23+
echo "No OCM descriptor files found under showroom/ocm/*.yaml"
24+
exit 1
25+
fi
26+
mkdir -p ./ocm
27+
rm -f ./ocm/transport.ctf
28+
{{ .OCM_CMD }} add componentversions --create --file ./ocm/transport.ctf "${FILES[@]}"
2429
silent: false

0 commit comments

Comments
 (0)