| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Separate build matrix into 3 stages - verify-tag, test, and deploy - verify-tag compares the kubernetes.__version__ to $TRAVIS_TAG. Only runs on pushed tags - test runs the actual tests - deploy deploys the package to pypi. Only runs on pushed tags
|
Travis doesn't seem to have picked this up, which I assume implies a major mistake on my end edit: The script started with [ which made travis interpret it as a list |
Sorry, something went wrong.
|
@fabianvf Thank you for splitting the stages out. I was working on it on the side. :) |
Sorry, something went wrong.
| - stage: verify-tag | ||
| python: 3.7 | ||
| script: | | ||
| [ "v$(python -c 'import kubernetes ; print(kubernetes.__version__)')" == "${TRAVIS_TAG}" ] |
There was a problem hiding this comment.
We could also put in a check to make sure that the TRAVIS_TAG obeys semver
Sorry, something went wrong.
There was a problem hiding this comment.
I was going to say that. This would, in turn, ensure that the version that we put in constants.py is also validated.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
| python: 3.7 | ||
| script: > | ||
| [ "v$(python -c 'import kubernetes ; print(kubernetes.__version__)')" == "${TRAVIS_TAG}" ] && | ||
| [[ "${TRAVIS_TAG}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+(([ab]|dev|rc)[0-9]+)?$ ]] |
There was a problem hiding this comment.
👍
Sorry, something went wrong.
|
/lgtm |
Sorry, something went wrong.
|
/approve |
Sorry, something went wrong.
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: fabianvf, yliaog The full list of commands accepted by this bot can be found here. The pull request process is described here Details Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing /approve in a comment |
Sorry, something went wrong.
|
@roycaihw would you mind doing another test with these changes, just to make sure it all works in the travis environment? Tested it out locally but you never know |
Sorry, something went wrong.
|
@fabianvf I checked out the latest revision of the config: https://github.com/kubernetes-client/python/commits/travis-pypi-experiment and tagged a new release verify-tag failed with ModuleNotFoundError: No module named 'urllib3': |
Sorry, something went wrong.
|
I think this is due to the package not being installed in the environment or some other dependency issue. When I ran it locally in a fresh virtual environment based on 3.7, it gave me this $ mkvirtualenv --python=/usr/bin/python3.7 py37-temp
Running virtualenv with interpreter /usr/bin/python3.7
Already using interpreter /usr/bin/python3.7
Using base prefix '/usr'
New python executable in /home/nabarun/.envs/py37-temp/bin/python3.7
Also creating executable in /home/nabarun/.envs/py37-temp/bin/python
Installing setuptools, pip, wheel...
done.
virtualenvwrapper.user_scripts creating /home/nabarun/.envs/py37-temp/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/nabarun/.envs/py37-temp/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/nabarun/.envs/py37-temp/bin/preactivate
virtualenvwrapper.user_scripts creating /home/nabarun/.envs/py37-temp/bin/postactivate
virtualenvwrapper.user_scripts creating /home/nabarun/.envs/py37-temp/bin/get_env_details
$ python -c 'import kubernetes ; print(kubernetes.__version__)'
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/nabarun/c/kubernetes/kubernetes-client/python/kubernetes/__init__.py", line 19, in <module>
import kubernetes.client
File "/home/nabarun/c/kubernetes/kubernetes-client/python/kubernetes/client/__init__.py", line 20, in <module>
from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi
File "/home/nabarun/c/kubernetes/kubernetes-client/python/kubernetes/client/api/__init__.py", line 6, in <module>
from kubernetes.client.api.admissionregistration_api import AdmissionregistrationApi
File "/home/nabarun/c/kubernetes/kubernetes-client/python/kubernetes/client/api/admissionregistration_api.py", line 18, in <module>
import six
ModuleNotFoundError: No module named 'six'Getting the client version from scripts/constants.py is better since it does not depend on any other thing and kubernetes.__version__ is generated from scripts/constants.CLIENT_VERSION itself. $ python -c 'from scripts.constants import CLIENT_VERSION; print(CLIENT_VERSION)'
11.0.0-snapshot |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Separate build matrix into 3 stages - verify-tag, test, and deploy
runs on pushed tags