I have a Django project set up with Jenkins. One of my apps has the literal name api
. When I go to view the coverage report for this app, I am taken to a URL with the suffix /cobertura/api/
. Because this URL ends with the string api
, Jenkins interprets this as API access to the URL /cobertura/
instead of the api
page of the coverage report.
How can I deal with this? I don't use the Jenkins API at all, so disabling it entirely would be an acceptable solution.
I added the following to the end of my Jenkins build script:
cp reports/coverage.xml reports/coverage2.xml
sed 's/ name=\"api\"/ name=\"api_\"/' reports/coverage2.xml > reports/coverage.xml
This rewrites the coverage report before Jenkins processes it, changing the api
name to api_
. Since only the name
XML attribute is affected and not filename
, the coverage report itself works normally.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.