Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pushing artifacts to PyPI causes Travis CI build to fail #101

Open
maurizi opened this issue Apr 20, 2018 · 3 comments
Open

Pushing artifacts to PyPI causes Travis CI build to fail #101

maurizi opened this issue Apr 20, 2018 · 3 comments

Comments

@maurizi
Copy link
Contributor

maurizi commented Apr 20, 2018

When pushing tags, Travis CI automatically pushes a new release of the library to PyPI.
This is working correctly, but we are trying to push artifacts for every combination in our build matrix, which causes all builds in the matrix after the first to fail, since the release is already on PyPI.

We should restrict our deploy step to only run once, if possible. Travis CI build stages might be helpful here: https://docs.travis-ci.com/user/build-stages

This isn't actively harmful, since pushing artifacts to PyPI is the last step in the Travis CI test script, and we will separately test the master branch at the same time, but it would be nice to fix this.

@maurizi
Copy link
Contributor Author

maurizi commented Apr 20, 2018

@azavea/operations This may also be an issue for other Azavea Python libraries that are published to PyPI, I believe we've been using a similar Travis CI configuration on other libraries.

@hectcastro
Copy link
Contributor

This has been resolved in other libraries with the python or condition attribute of on under deploy:

deploy:
  provider: pypi
  user: azavea
  password:
    secure: ...
  distributions: sdist bdist_wheel
  on:
    tags: true
    python: "3.6"
    repo: azavea/...

If other environment variables are needed, then:

deploy:
  provider: pypi
  user: azavea
  password:
    secure: ...
  distributions: sdist bdist_wheel
  on:
    tags: true
    python: "3.6"
    condition: "$TEST = ..."
    repo: azavea/...

@jwalgran
Copy link
Member

I fixed this halfway as part of #112 but it looks like we need another environment variable check in addition to the Python version check, as Hector mentioned in the previous comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants