I have a package that I don't need to publish it into PyPi because it is for internal use only, so I wrote this pipeline that automate testing and deployment as zip file. But I need to upload it into repo downloads:
image: python:3.10
pipelines:
branches:
master:
- step:
name: Test and Build
script:
- pip install -r requirements.txt
- pip install coverage
- python -m coverage run -m unittest discover -v -s .\tests\ -p '*_tests.py'
- python -m coverage report
- step:
name: Check coverage and build package
script:
- python -m coverage report --fail-under=95
- if [[ $? -eq 0 ]]; then python setup.py sdist --formats zip; fi
- if [[ -e dist/*.zip ]]; then echo "Zip file exists"; fi
artifacts:
- dist/*.zip
- step:
name: Deploy to repo downloads
script:
- pipe: atlassian/bitbucket-upload-file:0.5.0
variables:
FILENAME: dist/*.zip
It is failing to execute, I can't figure out what it is.
Thanks for your help.