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

Build number included string occured error. #62

Closed
JayChanggithub opened this issue Sep 15, 2022 · 5 comments · Fixed by #63
Closed

Build number included string occured error. #62

JayChanggithub opened this issue Sep 15, 2022 · 5 comments · Fixed by #63

Comments

@JayChanggithub
Copy link

Hi Support,

i got error from smoke-test_1 | File "/usr/local/lib/python3.10/site-packages/api4jenkins/job.py", line 159, in get_build smoke-test_1 | if int(number) == int(item['number']): smoke-test_1 | ValueError: invalid literal for int() with base 10: '1521-sit02-master' Because our build number included string. Have anything possible to fix?

File "/usr/local/lib/python3.10/site-packages/api4jenkins/job.py", line 159, in get_build smoke-test_1 | if int(number) == int(item['number']):

remove int transition? thanks

Screen Shot 2022-09-15 at 16 35 17

@joelee2012
Copy link
Owner

1521-sit02-master is display name of build, open the build in browser and you will see real build number in address bar.

@JayChanggithub
Copy link
Author

have anything object can got exactly number? Thanks.

@JayChanggithub
Copy link
Author

Hi fix issue by buildno attribute. Thanks.

@joelee2012 joelee2012 linked a pull request Sep 16, 2022 that will close this issue
@joelee2012
Copy link
Owner

@JayChanggithub this PR will enable job.get_build to return build by display name

@JayChanggithub
Copy link
Author

Thanks @joelee2012. Got it

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

Successfully merging a pull request may close this issue.

2 participants