iHeart private packaging tools & index
git clone [email protected]:iheartradio/ihrpi.git
cd ihrpi/ && python setup.py install
this will install ihrpi and setup cli tools under bin- Assemble values for
IHRPI_HOST
,IHRPI_USER
, andIHRPI_PASS
ihrpi-setup-env
to setup pip.conf withIHRPI_*
values from previous steppip install ihrpi[tools]
if you plan to use the cli tools
Basic application file is provided. See create_app()
for setting s3 bucket
and prefix.
# In your python project of choice:
cd my_project/
ihrpi-release
ihrpi-publish
pip install 'mypkg>=0.17.0' \
--extra-index-url ${IHRPI_URL} \
--trusted-host ${IHRPI_HOST}
Travis can be configured to access the private package index. Be careful to not leak the credentials for ihrpi in travis build logs.
cd my_project/
ihrpi-configure-travis
# tox.ini sections should have:
install_command =
ihrpi-tox-install {opts} {packages}
# .travis.yml install section should include:
install:
- git clone [email protected]:iheartradio/ihrpi.git && cd ihrpi/ && python setup.py install && cd ..
# .travis.yml script section should be:
script:
- ihrpi-tox-run
Should I be careful when using tox and the IHRPI_*
env variables on travis?
Yes!! tox spews configuration parameters to stdout including the entire
environment when a run doesn't succeed. This is why `ihrpi-tox-run` and
`ihrpi-tox-install` scripts are used.
ihrpi API is a flask app serving an s3 bucket formatted to the pypi
simple specification. We use
pip2pi
to handle formatting when we run ihrpi-publish
.
This curl should return "pong" from each environment:
curl "http://${IHRPI_USER}:${IHRPI_PASS}@${IHRPI_HOST}:8089/ping"