Instead of overwriting the install.log, let's append the output,
to make sure we capture all its output during our deployments.
Change-Id: I104694573cb5d94e33772df01d3d693539b188b5
> root@repoapi2:/usr/share/repoapi# source /var/lib/repoapi/venv_prod/bin/activate
> root@repoapi2:/usr/share/repoapi# export DJANGO_SETTINGS_MODULE=repoapi.settings.prod
Generate new apikey values, db is not changed!! This is just in order to
produce a apikey.json file:
> root@repoapi2:/usr/share/repoapi# ./manage.py apikey generate
> key:AsAPINOl.D7pq6PRT4hjpnb13LIMmjjafqoUJN8JN prefix:AsAPINOl hashed_key:pbkdf2_sha256$260000$EqQMpCFxh4Bk6nWMApv3PA$+8ZbfG+MXpBSOrXmc33fgBZZ7rUI4ywInOfUry+SKec=
Validate if a hash and key matches:
> root@repoapi2:/usr/share/repoapi# ./manage.py apikey verify --key AsAPINOl.D7pq6PRT4hjpnb13LIMmjjafqoUJN8JN --value 'pbkdf2_sha256$260000$EqQMpCFxh4Bk6nWMApv3PA$+8ZbfG+MXpBSOrXmc33fgBZZ7rUI4ywInOfUry+SKec='
Generate a hash from key:
> root@repoapi2:/usr/share/repoapi# ./manage.py apikey hash --value AsAPINOl.D7pq6PRT4hjpnb13LIMmjjafqoUJN8JN
pbkdf2_sha256$260000$i2AeV5mIwaKKAcisHZHTl4$ZvxWMfFJSXfkbf6SDUG2Ilv0MOtXq/Cy0PG6NNA48po=
Change-Id: I06bfe2f4e8cf08d3d75066cecf7e3fbf4c39680d
The python binary is gone, and use and support python3 instead.
Fixes:
| Setting up repoapi (0.4.6+0~20230705093550.1012+bookworm~1.gbp7c23af) ...
| /var/lib/dpkg/info/repoapi.postinst: 21: python: not found
| dpkg: error processing package repoapi (--configure):
| installed repoapi package post-installation script subprocess returned error exit status 127
Change-Id: I54c02826da75fb2a01ee307aeab850978034c9da
Automate the process of cleaning up the Gerrit info we keep.
We query Gerrit server and check if review is merged or abandoned.
If so, we remove data from database and query Jenkins to remove
the related PPA.
Ideally this should not be needed but it seems there are some
cases/scenarios that we don't manage properly.
* will be executed each 15th day of the month at 7:30
* add timezone info to Gerrit fixtures to reduce warning
Change-Id: Ic5ddc3b646532257bd7747443a6fdead4ff28544
* add dry-run option
checks gerrit review status and if merged, will trigger removal
of PPA if necessary
NOTE: this will not trigger removal of projects from PPA, just
removal of full PPA if no reviews are left
Change-Id: Iddebc80a92615d99ff8cd2f643ea49b5bfc106d6
gerrit URL needs a/ as prefix for authenticate access
https: //gerrit-review.googlesource.com/Documentation/rest-api.html#authentication
remove info from db that is not in gerrit
Change-Id: Icb49e4244fb058db0bb87ff27e7c8d8fe55c94d7
in order to be able to detect not cleaned PPA, lets keep
a mofified field to track last time a package was added
to the repository
Change-Id: I7f5d58cbc28d9c9ef54d90b69850fbedb80e4379
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
> [2022-12-16 06:07:01,563: ERROR/ForkPoolWorker-3] Task buildinfo.tasks.parse_buildinfo[bdf0ea9f-5b13-4d08-b23b-aa2ff3a61c40] raised unexpected: DataError('smallint out of range\n')
* define datetime field instead of timestamp, that would be filled
with the processed value of timestamp
Change-Id: Id6c9dac31b5ad9e32890e399c16ff6d9bad06746
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
It will allow richer output on dev
https://www.structlog.org/en/stable/development.html
* call structlog.configure as last step in env settings.
We are changing LOGGING there
Change-Id: I2fc7bed3561062e5e6ead3d62dc009f815856b2a