Commit Graph

787 Commits

Author SHA1 Message Date
Kevin Fenzi
07c894ea21 pkgs: drop recursive call to facl setting
In a0046b5b4b there was a bunch of fixes for ansible lint to the
distgit/pagure roles.

However, it seems like a
recursive: true
was added to the facl call, when it wasn't present before.

I noticed this when my playbook run on pkgs was running for several
hours. ;(

I don't think there's any reason to run this recursively,
as permissions should inherit from the top level one and have always
worked without it.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2025-05-29 15:28:21 -07:00
Michal Konecny
3abba00b2a [distgit] Enable commit ACLs for admin tokens
To enable retirement of rawhide branch for EPEL only packages (see
https://pagure.io/fedora-infra/toddlers/issue/151 for more info) I need
to enable `commit` ACL on dist-git (see
https://docs.pagure.org/pagure/usage/http_push.html for more info).
2025-05-12 12:29:02 +00:00
Michal Konecny
3d9bc5b494 [distgit] Fix the patch
The patch provided originally was made against the latest pagure code,
but we are not on the latest dev version. So I created the patch
directly for the source file deployed on src.stg.fedoraproject.org.
2025-04-30 15:09:25 +02:00
Michal Konecny
561d6b540d [distgit] Fix typo
Even with the CI this typo wasn't found till execution of the playbook.
2025-04-30 14:48:02 +02:00
Michal Konecny
5b0120cea9 [dist-git] Fix for api call token
There is a local fix on src.fedoraproject.org that is missing on
src.stg.fedoraproject.org. I provided the fix in
https://pagure.io/pagure/pull-request/5525 and this commit is adding it
as patch to ansible, so the change is permanent.
2025-04-30 12:36:11 +00:00
Michal Konecny
a0046b5b4b [distgit] Fixing ansible lint errors
This commit is fixing ansible lint errors for distgit role.

It also introduces two new addition to skip list as the structure of our
ansible repository doesn't adhere to ansible standards.

The errors that will be now skipped are:
- role-name[path] - we have plenty of roles that have sub-roles inside
  them and we need to access them
- var-naming[no-role-prefix] - variables for roles are not usually
  prefixed correctly in our repository and forcing people to change that
  will introduce more issues than what it solves
2025-04-30 10:07:35 +00:00
Aurélien Bompard
d884a0f8ba Use the combined RabbitMQ CA cert in the clients
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2025-04-11 15:15:45 +02:00
Michal Konecny
6b0a66cb37 [fedora-messaging] Adding topic_prefix back
Removing the topic_prefix from fedora messaging config files was a bit
premature. So let's put them back in place.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-14 12:40:12 +01:00
Diego Herrera
3602ac8f97 Change new parameter to work as a flag
Signed-off-by: Diego Herrera <dherrera@redhat.com>
2025-02-14 02:28:50 -03:00
Diego Herrera
45d4c31ebd Add branchingfrom argument for epel purposes, rawhide still default
Signed-off-by: Diego Herrera <dherrera@redhat.com>
2025-02-14 01:46:13 -03:00
Michal Konecny
6428f8f772 Sunset github2fedmsg and fedmsg
This commit is removing all the fedmsg related stuff from ansible
repository.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-13 10:08:51 +00:00
Michal Konecny
2ec055db6f Use first uppercase letter for all handlers
This will unify all the handlers to use first uppercase letter for
ansible-lint to stop complaining.

I went through all `notify:` occurrences and fixed them by running
```
set TEXT "text_to_replace"; set REPLACEMENT "replacement_text"; git grep
-rlz "$TEXT" . | xargs -0 sed -i "s/$TEXT/$REPLACEMENT/g"
```

Then I went through all the changes and removed the ones that wasn't
expected to be changed.

Fixes https://pagure.io/fedora-infrastructure/issue/12391

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2025-02-10 20:31:49 +00:00
Ryan Lerch
47c68f478d ansiblelint fixes - fqcn[action-core] - template to ansible.builtin.template
Replaces references to template: with ansible.builtin.template

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:30:29 +10:00
Ryan Lerch
25391e95b7 ansiblelint fixes - fqcn[action-core] - package to ansible.builtin.package
Replaces many references to  package: with ansible.builtin.package

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:28:00 +10:00
Ryan Lerch
462176464b ansiblelint fixes-- fqcn[action-core] - command to ansible.builtin.command
Replaces many references to  command: with ansible.builtin.command

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 11:26:47 +10:00
Ryan Lerch
6a3816dfdc ansiblelint fixes-- fqcn[action-core] - copy to ansible.builtin.copy
Replaces many references to 'copy' with ansible.builtin.copy

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:43:31 +10:00
Ryan Lerch
62952df107 ansiblelint fixes-- fqcn[action-core] - file to ansible.builtin.file
Replaces many references to  file: with ansible.builtin.file

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-15 10:41:52 +10:00
Ryan Lerch
691adee6ee Fix name[casing] ansible-lint issues
fix 1900 failures of the following case issue:

`name[casing]: All names should start with an uppercase letter.`

Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2025-01-14 20:20:07 +10:00
Aurélien Bompard
183f4ff7a4 Distgit: missing dependency
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-11 11:51:03 +01:00
Aurélien Bompard
311f9c009a Use OIDC in Dist-Git
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-12-11 11:33:38 +01:00
Ryan Lerch
89f6f1fc32 Fix majority of remaining yamllint warnings and errors
Signed-off-by: Ryan Lerch <rlerch@redhat.com>
2024-11-28 17:31:45 +10:00
Aurélien Bompard
0fc0a819fa Distgit: fix the staging test in the client_secrets file
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-11-14 09:09:12 +01:00
Aurélien Bompard
8400c340ff Distgit: fix the client_id in the client_secrets file
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-11-14 09:05:06 +01:00
Aurélien Bompard
134cfc522f Distgit: deploy the client_secrets file
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-11-14 08:49:23 +01:00
Aurélien Bompard
fcad3efdfd Dist-Git: adjust for OIDC changes
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-11-14 08:02:08 +01:00
Aurélien Bompard
901c843706 Prepare dist-git for OIDC
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2024-11-13 09:53:50 +01:00
Diego Herrera
706b176c41 pagure-distgit config: Add blacklist check for EPEL minor branches
Signed-off-by: Diego Herrera <dherrera@redhat.com>
2024-10-31 20:12:15 +00:00
Lenka Segura
c7b8abd284 Add group_modify into ACLS dist
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-10-09 11:38:56 +02:00
Lenka Segura
43a8132ec2 distgit: Add group_modify ACL to distgit token
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-10-02 11:20:15 +02:00
Kevin Fenzi
c4024c4aa4 pdc: fare thee well!
This commit retires pdc from ansible.
The website should get redirected to a wiki page about the retirement.
If for some reason we need to bring things back, the vm's will still
have their disks and xml saved off so we can bring it back.
Would need to revert this, run proxy playbooks and do a little cleanup
on the redirect, then bring the vm's back up.
Hopefully we don't have to.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-08-02 13:39:15 -07:00
Nils Philippsen
48f4990dd9 Fix typos
Signed-off-by: Nils Philippsen <nils@redhat.com>
2024-07-01 13:34:48 +00:00
Nils Philippsen
205e2c9ed5 distgit/pagure: Set git directories as safe
This was fixed previously for pagure.io in the context of
paguremirroring. Turns out, it affects all kinds of git operations, so
document and move accordingly.

Fixes: releng#12181
Fixes: fedora-infrastructure#12010

Signed-off-by: Nils Philippsen <nils@redhat.com>
2024-06-27 11:21:19 +02:00
Nils Philippsen
0adf0869a6 distgit/pagure: Appease yamllint
Signed-off-by: Nils Philippsen <nils@redhat.com>
2024-06-27 11:21:07 +02:00
Michal Konecny
38ca9f6f73 [distgit/pagure] Set ACL for newly created files in /var/log/pagure
Fix for https://pagure.io/fedora-infrastructure/issue/11957 was introduced to
pagure role, but it wasn't added to dist-git role as well. Let's fix that.

Signed-off-by: Michal Konecny <mkonecny@redhat.com>
2024-06-04 10:40:45 +02:00
Kevin Fenzi
a3977e7038 releng: retired-packages: also supress popd output
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-10 09:37:07 -07:00
Kevin Fenzi
9fecd9fd7c distgit / retired-packages: make cron job quieter
Right now the cron job is mailing out something like:

/tmp/releng.HEQKVAc ~
Cloning into 'releng'...
~

Hopefully this will make it not send that email unless there's an error.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-05-06 09:12:10 -07:00
Lenka Segura
f137bbb0f1 Remove pagure-sync-bugzilla.py.js script
The script is not referenced anywhere and the sync is now done by
distgit_bugzilla_sync toddler.

Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-04-24 16:24:12 +00:00
Kevin Fenzi
7d7f8c51ad pagure: roll out pull request acl update to prod
See: https://pagure.io/fedora-infra/ansible/pull-request/1825

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-04-02 11:15:07 -07:00
Kevin Fenzi
b7294036cc pagure / dist-git: add staging conditional for testing
Signed-off-by: Kevin Fenzi <kevin@scrye.com>
2024-03-27 15:33:46 -07:00
Maja Massarini
5e046c04a6 pagure: add descriptions for new available pull_request acls
Related with commit 1efcf8a90b
We need to update the acls table with their descriptions.

pagure/cli/admin.py update-acls

The above command can update the table and it looks for descriptions in the ACLS config variable.
2024-03-27 22:12:32 +00:00
Lenka Segura
be15763f0f Change permissions on the retired_packages cron
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-03-04 09:02:58 +00:00
Lenka Segura
41ee09672d [distgit] Add MAILTO and remove the git repo after running script
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-02-29 11:08:06 +01:00
Lenka Segura
ae1f7adc8a [distgit] Fix the cron job: clone into temp dir
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-02-24 22:14:34 +00:00
Maja Massarini
1efcf8a90b Add pr update and rebase acls to user tokens
Packit needs this ACLs to be able to update PRs it has already created.
We are implementing this feature:
https://github.com/packit/packit/issues/2182

Packit needs this ACLs just in distgit.
2024-02-21 09:51:29 +01:00
Lenka Segura
8a3c70cf14 Remove stg condition for running retired-packages script on pkgs01
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-02-19 15:16:06 +01:00
Lenka Segura
f9d29c7b4b Add BODHI_URL to pagure config
Part of an initiative to remove PDC calls.
Active branches are now checked from a call to bodhi, not to pdc.
Needed for the check in distgit - avoid pushing to EOL branches

Signed-off-by: Lenka Segura <lsegura@redhat.com>
2024-01-10 12:32:02 +01:00
Aurélien Bompard
64da337e67 Use fedora-messaging-git-hook on dist-git
Signed-off-by: Aurélien Bompard <aurelien@bompard.org>
2023-12-04 17:58:49 +01:00
amedvede
e88add7dd1 distgit: added CSP headers for staging
Signed-off-by: amedvede <amedvede@redhat.com>
2023-11-23 10:54:07 +01:00
Lenka Segura
1ec305ee0b releng: Schedule a cron job to retrieve retired packages nightly
Signed-off-by: Lenka Segura <lsegura@redhat.com>
2023-11-21 08:56:50 +00:00
amedvede
3fe6717504 feat: added bodhi to csp headers of distgit
Signed-off-by: amedvede <amedvede@redhat.com>
2023-11-20 10:14:04 +01:00