ReleaseEngineering/How To/Upload to internal Pypi: Difference between revisions

No edit summary
 
Line 30: Line 30:


=== Uploading to PyPi ===
=== Uploading to PyPi ===
The upload script expects that your machine/vm will have the same username as your Mozilla LDAP. If you aren't sure how to check this, open a new terminal and type:
<pre>echo "Machine username is: $(whoami)"</pre>


If the machine username is not the same as your Mozilla LDAP, we recommend you to either create a new username with your Mozilla LDAP username or change '''$(whoami)''' inside the script to be equal to your LDAP username.
First ensure your repository is up-to-date.


If your repository is up-to-date and your machine user is the same with your LDAP, all you have to do now is run the following command:
The upload script needs to use your LDAP username to upload. If your machine user is the same as your LDAP, all you have to do is run the following command:
<pre>./publish_package_our_pypi.sh <path/to/file1> <path/to/file2> ...</pre>
<pre>./publish_package_our_pypi.sh <path/to/file1> <path/to/file2> ...</pre>
If your machine user is different than your LDAP, you can set it with the $USER environment variable:
<pre>USER=<ldap username> ./publish_package_our_pypi.sh <path/to/file1> <path/to/file2> ...</pre>


The script will practically copy the file to relengwebadmin and move it where the files are located for pypi internal (/mnt/netapp/relengwebadmin/pypi/pub) then will change the rights and upload the file to  
The script will practically copy the file to relengwebadmin and move it where the files are located for pypi internal (/mnt/netapp/relengwebadmin/pypi/pub) then will change the rights and upload the file to  
Line 43: Line 44:
If everything worked fine, you should now have a link that looks like this:
If everything worked fine, you should now have a link that looks like this:
'''http://pypi.pub.build.mozilla.org/pub/FILE-NAME-HERE'''
'''http://pypi.pub.build.mozilla.org/pub/FILE-NAME-HERE'''


== See also ==
== See also ==
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1286278 bug 1286278]
* [https://bugzilla.mozilla.org/show_bug.cgi?id=1286278 bug 1286278]
Confirmed users
656

edits