Update ki-ntree and handle failing of ki-ntree commands

This commit is contained in:
andrewc
2024-10-24 19:07:29 +10:00
parent 55e7b874ae
commit 95129c8206
2 changed files with 6 additions and 2 deletions

View File

@@ -142,16 +142,20 @@ image:
- !reference [.commands, strip_tag] - !reference [.commands, strip_tag]
- !reference [.commands, get_files] - !reference [.commands, get_files]
- cd $CI_PROJECT_DIR/.gitlab/.scripts/ki-ntree/ - cd $CI_PROJECT_DIR/.gitlab/.scripts/ki-ntree/
- FAIL=0
- | - |
for f in $FILES for f in $FILES
do do
echo $f echo $f
name=$(echo $f | cut -c3- | cut -d'-' -f1)A name=$(echo $f | cut -c3- | cut -d'-' -f1)A
poetry run python -m kintree_cli -p $CI_PROJECT_DIR/Fabrication/$f --assembly "{'ipn': '$name', 'rev': '$TAG'}" --settings $KINTREE_SETT --digi_token token_storage.json poetry run python -m kintree_cli -p $CI_PROJECT_DIR/Fabrication/$f --assembly "{'ipn': '$name', 'rev': '$TAG'}" --settings $KINTREE_SETT --digi_token token_storage.json || FAIL=1
done done
# - cp token_storage.json /tmp
- | - |
cat /tmp/token_storage.json cat /tmp/token_storage.json
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file /tmp/token_storage.json $url curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file /tmp/token_storage.json $url
- exit $FAIL
# USE PRIVATE-TOKEN to upload from gitlab-ci
git_tag: git_tag:
- !reference [.commands, strip_tag] - !reference [.commands, strip_tag]