{"action":"created","issue":{"url":"https://api.github.com/repos/jazzband/django-hosts/issues/47","labels_url":"https://api.github.com/repos/jazzband/django-hosts/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/jazzband/django-hosts/issues/47/comments","events_url":"https://api.github.com/repos/jazzband/django-hosts/issues/47/events","html_url":"https://github.com/jazzband/django-hosts/issues/47","id":122365201,"number":47,"title":"Adjust travis configuration to make the deployment to PyPI happen only once per build","user":{"login":"bak1an","id":242988,"avatar_url":"https://avatars.githubusercontent.com/u/242988?v=3","gravatar_id":"","url":"https://api.github.com/users/bak1an","html_url":"https://github.com/bak1an","followers_url":"https://api.github.com/users/bak1an/followers","following_url":"https://api.github.com/users/bak1an/following{/other_user}","gists_url":"https://api.github.com/users/bak1an/gists{/gist_id}","starred_url":"https://api.github.com/users/bak1an/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bak1an/subscriptions","organizations_url":"https://api.github.com/users/bak1an/orgs","repos_url":"https://api.github.com/users/bak1an/repos","events_url":"https://api.github.com/users/bak1an/events{/privacy}","received_events_url":"https://api.github.com/users/bak1an/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-12-15T21:00:57Z","updated_at":"2015-12-15T21:16:20Z","closed_at":"2015-12-15T21:12:00Z","body":"At the moment every build in matrix (for tagged commits of course) attempts to do the deployment.\r\n\r\nExample:\r\nhttps://travis-ci.org/jazzband/django-hosts/builds/96972410\r\n\r\nAs we can see `#101.1` has deployed the release to PyPI, while other six builds in the matrix failed to do so with:\r\n```\r\nUploading distributions to https://pypi.python.org/pypi\r\nUploading django_hosts-1.3-py2.py3-none-any.whl\r\nHTTPError: 400 Client Error: A file named \"django_hosts-1.3-py2.py3-none-any.whl\" already exists for  django-hosts-1.3. To fix problems with that file you should create a new release. for url: https://pypi.python.org/pypi\r\n```\r\n\r\nThis seems to be easy to fix using [conditional releases](https://docs.travis-ci.com/user/deployment/#Conditional-Releases-with-on%3A). We just need to select one tox env that will be responsible for deploying.\r\n\r\nMore accurate solution would be to deploy only when all builds are finished. However, I have not found the solution for this yet.\r\n\r\nThe similar procedure can be done for other repositories under jazzband."},"comment":{"url":"https://api.github.com/repos/jazzband/django-hosts/issues/comments/164898763","html_url":"https://github.com/jazzband/django-hosts/issues/47#issuecomment-164898763","issue_url":"https://api.github.com/repos/jazzband/django-hosts/issues/47","id":164898763,"user":{"login":"jezdez","id":1610,"avatar_url":"https://avatars.githubusercontent.com/u/1610?v=3","gravatar_id":"","url":"https://api.github.com/users/jezdez","html_url":"https://github.com/jezdez","followers_url":"https://api.github.com/users/jezdez/followers","following_url":"https://api.github.com/users/jezdez/following{/other_user}","gists_url":"https://api.github.com/users/jezdez/gists{/gist_id}","starred_url":"https://api.github.com/users/jezdez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jezdez/subscriptions","organizations_url":"https://api.github.com/users/jezdez/orgs","repos_url":"https://api.github.com/users/jezdez/repos","events_url":"https://api.github.com/users/jezdez/events{/privacy}","received_events_url":"https://api.github.com/users/jezdez/received_events","type":"User","site_admin":false},"created_at":"2015-12-15T21:16:20Z","updated_at":"2015-12-15T21:16:20Z","body":"Sadly this seems to be a side effect of the way we use tox on Travis-CI and I'm not sure if they would ever add a \"all-passed\" condition since the conditions are evaluated per environment."}}