Store and retrieving token written, upload tested.
This commit is contained in:
15
kibot-ci.yml
15
kibot-ci.yml
@@ -127,8 +127,16 @@ image:
|
||||
|
||||
boms:
|
||||
- cd $CI_PROJECT_DIR/.gitlab/.scripts/ki-ntree/
|
||||
- apt update && apt install pip -y && pip install --break-system-packages poetry
|
||||
- apt update && apt install curl wget pip -y && pip install --break-system-packages poetry
|
||||
- poetry install
|
||||
- cd /tmp
|
||||
- url="https://gitlab.com/api/v4/projects/${DIGI_API_PRJ_ID}/packages/generic/digikey_api/0/token_storage.json"
|
||||
- |
|
||||
if [[ -z "$KINTREE_DIGI_TOKEN" ]]; then
|
||||
wget $url
|
||||
else
|
||||
cp $KINTREE_DIGI_TOKEN token_storage.json
|
||||
fi
|
||||
- ls
|
||||
- cd $CI_PROJECT_DIR/Fabrication
|
||||
- 'SEARCH="bom.csv"'
|
||||
@@ -140,9 +148,10 @@ image:
|
||||
do
|
||||
echo $f
|
||||
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 $KINTREE_DIGI_TOKEN
|
||||
poetry run python -m kintree_cli -p $CI_PROJECT_DIR/Fabrication/$f --assembly "{'ipn': '$name', 'rev': '$TAG'}" --settings $KINTREE_SETT --digi_token storage_token.json
|
||||
done
|
||||
|
||||
- |
|
||||
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file /tmp/token_storage.json $url
|
||||
|
||||
git_tag:
|
||||
- !reference [.commands, strip_tag]
|
||||
|
||||
Reference in New Issue
Block a user