If the baseurl passed to jenkinsapi.jenkins.Jenkins contains consecutive slashes, two entries are returned for each job in the get_jobs method return. Every second job just has a URL for its name (I haven't examined the Job part of the results).
EXPECTED RESULTS
One copy of each job. From the example code below:
This was observed with both https (self-signed certificate, so ssl_verify was used) and over http. In both cases, baseurl includes a folder (in the example below, "gtest").
$ python -vvvv
import jenkinsapi.jenkins
j = jenkinsapi.jenkins.Jenkins('https://localhost:8443/job/gtest', 'snewell', <trimmed>, ssl_verify=False)
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
>>> for i in j.get_jobs():
... print(i)
...
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
('gtest-clang', <jenkinsapi.job.Job gtest-clang>)
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
('gtest-gcc', <jenkinsapi.job.Job gtest-gcc>)
>>> j = jenkinsapi.jenkins.Jenkins('https://localhost:8443//job/gtest', 'snewell', <trimmed>, ssl_verify=False)
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
>>> for i in j.get_jobs():
... print(i)
...
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
('gtest-clang', <jenkinsapi.job.Job gtest-clang>)
('https:/localhost:8443/gtest/gtest-clang', <jenkinsapi.job.Job gtest-clang>)
/usr/lib64/python3.6/site-packages/urllib3/connectionpool.py:858: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecureRequestWarning)
('gtest-gcc', <jenkinsapi.job.Job gtest-gcc>)
('https:/localhost:8443/gtest/gtest-gcc', <jenkinsapi.job.Job gtest-gcc>)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
ISSUE TYPE
Jenkinsapi VERSION
0.3.6
Jenkins VERSION
2.133 and 2.121.1
SUMMARY
If the baseurl passed to
jenkinsapi.jenkins.Jenkins
contains consecutive slashes, two entries are returned for each job in theget_jobs
method return. Every second job just has a URL for its name (I haven't examined theJob
part of the results).EXPECTED RESULTS
One copy of each job. From the example code below:
ACTUAL RESULTS
Multiple copies of each job. From the example code below:
USEFUL INFORMATION
This was observed with both https (self-signed certificate, so
ssl_verify
was used) and over http. In both cases,baseurl
includes a folder (in the example below, "gtest").