When working on Debian/forky support, adding release-trunk-forky to
config/trunk.yml failed in Jenkins' repos-scripts-config-check with:
| + curl --fail -X POST --data-binary @config/trunk.yml -H 'Content-type: application/yaml' https://repoapi.mgm.sipwise.com/config/check/
| % Total % Received % Xferd Average Speed Time Time Time Current
| Dload Upload Total Spent Left Speed
|
| 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
| 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
| 100 6725 0 0 100 6725 0 45930 --:--:-- --:--:-- --:--:-- 45748
| curl: (22) The requested URL returned error: 406
Initially it was unclear what was actually going on. Only after adding
some logging to /usr/share/repoapi/build/views.py, restarting
uwsgi.service on and then looking at /var/log/uwsgi/app/repoapi.log
revealed the underlying build.exceptions.NoUniqueTrunk exception.
Provide according details in the logs.log, but while at it, provide
further information also to the requester, so when invoking curl with
the --fail-with-body option (available in curl 7.76.0+), we get further
information about the actual problem:
% curl --fail-with-body -X POST --data-binary @trunk.yml -H 'Content-type: application/yaml' https://repoapi.mgm.sipwise.com/config/check/
curl: (22) The requested URL returned error: 406
{"error": "NoUniqueTrunk()", "type": "NoUniqueTrunk"}
Change-Id: I206591f14867ff35b2b5f90678ae53196a2fb043
We have a fixed value in config but for repoapi-dev it's just 1.
When doing tests, now that we have two slaves it's convenient to
be able to change that at will.
That could help too if we want to increase/decrease in the middle
of a already triggered build
Change-Id: I3c154ae2e3a754f995deb856e7b9b85ca1148107
In order to allow to keep information of failed builds. Before
we had to remove the info from a failed build in order to trigger
another full build.
Change-Id: I7cfcbedecdfed81951391fcdd84bb5be3c1b9e24
> if not br.last().done:
> logger.info(f"release:{release} is already building")
> > raise PreviousBuildNotDone(msg)
> E UnboundLocalError: cannot access local variable 'msg' where it is not associated with a value
Change-Id: I4b50fc8f328c24e6bec5ef940d5d7f4d4732e89b
mrX.X.X merges will not trigger a build, so -repos job will never
happen with eventtype 'change-merged'
now -gerrit job sends the proper values of branch and ppa so
we can detect the scenario and clean the ppa
* move common regex definitions to repoapi.utils
Change-Id: I2b6afd0a7dea0fe07f47ba76bd6f9c2fa88e85ce
In order to support building the next supported release using the special
branch <distribution>/master if exists. Jenkins job <project>-get-code
will detect the missing branch and fallback to master if necessary
Change-Id: I798b5b1653e52e9cb4b91e9aca18cf7ec6a0916a
* /build/release-trunk-{version}/ DELETE
when we trigger the deletion of the repository, we should remove the
non-finised instance of it, so we can later create another one
Change-Id: Ie7e96aebfbe719dee4a9c6e1da25be08e6a38ab7
* We want to split build releases from hotfix perms
* create dev and devops groups and assign desired permissions.
These groups will match LDAP groups.
* create permissions using hack stolen from
https://stackoverflow.com/questions/29296757/django-data-migrate-permissions
Change-Id: I1b82ebf13aa3cba05e4733e4bef186fbbb52bb13
* don't add '^' twice for api urls
* don't add format_suffix for gerrit/refresh
* add missing format parameter for API views
Change-Id: I2c8cef000c0aec3524302cc5c5a7a201f9cf90d1
When refreshing list of projects, remove every info related to
any old project
We had this scenario when releasing mr10.5, ngcp-cve-scanner was
wrongly added as a project and we couldn't resume the build until
I removed the related info
Change-Id: I58ee97f3256bb63a0a07a6ed606ede0c233cfb84
* trunk-weekly as a normal release, with its own
config file. The idea is to convert eventually
trunk-* too
* match for relase-trunk-* doesn't work anymore
Change-Id: I4967ccc3b5ac47dbebdf6da16d404710fc72da49
* don't allow to trigger more than one build for instance of
release-trunk-* or mrX.Y
* autoupdate pre-commit config
Change-Id: I7183b8645155ca017e9796664d2570e88a29c44e
* calling build from API was always unauthorized
* drfapikey only supports Django until 1.10 version
* https://florimondmanca.github.io/djangorestframework-api-key/
supports modern Python and Django versions
- remove useless BUILD_KEY_AUTH preference, it's True always
Change-Id: I5521b07532dba12abea52982d376eb83293f6a38