Store and retrieving token written, upload tested.
This commit is contained in:
29
kibot-ci.yml
29
kibot-ci.yml
@@ -127,22 +127,31 @@ image:
|
|||||||
|
|
||||||
boms:
|
boms:
|
||||||
- cd $CI_PROJECT_DIR/.gitlab/.scripts/ki-ntree/
|
- 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
|
- 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
|
- ls
|
||||||
- cd $CI_PROJECT_DIR/Fabrication
|
- cd $CI_PROJECT_DIR/Fabrication
|
||||||
- 'SEARCH="bom.csv"'
|
- 'SEARCH="bom.csv"'
|
||||||
- !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/
|
||||||
- |
|
- |
|
||||||
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 $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
|
done
|
||||||
|
- |
|
||||||
|
curl --header "JOB-TOKEN: $CI_JOB_TOKEN" --upload-file /tmp/token_storage.json $url
|
||||||
|
|
||||||
git_tag:
|
git_tag:
|
||||||
- !reference [.commands, strip_tag]
|
- !reference [.commands, strip_tag]
|
||||||
|
|||||||
Reference in New Issue
Block a user