CI_BUILD_TOKEN vs CI_JOB_TOKEN

CI_BUILD_TOKEN variable was renamed to CI_JOB_TOKEN a while ago so make sure to use this when authenticating against repos.

Installing python packages

If you are getting errors like this:

pip install testname --index-url https://__token__:<token>@gitlab.example.com/api/v4/projects/<project-id>/packages/pypi/simple
 
Looking in indexes: https://__token__:****gitlab.example.com/api/v4/projects/<project-id>/packages/pypi/simple
ERROR: Could not find a version that satisfies the requirement testname (from versions: none)
ERROR: No matching distribution found for riot

Check your API key. You may not have permission. Running this command with -vv can force pip to display issues such as a 403 response which indicates that your key is valid but doesn’t have the right permissions.