Closed legoktm closed 6 months ago
Per Kunal's suggestion I'm going to try to help get this over the finish line. I'll start with this one:
reprepro-update-tor should be moved to securedrop or securedrop-apt-test
I think securedrop-apt-test
makes the most sense here, given that this is where the artifacts are committed.
If I understand the previous work that led to https://github.com/freedomofpress/securedrop-apt-test/pull/216 correctly, I should be able to re-use secrets.PUSH_TOKEN
to run a schedule-triggered job that performs the commit if needed. I'll take a stab at that, but please chime in if I'm missing something.
Yep, that should work. That job also creates/comments on an issue in the server repo, so you'll probably want to check that the token has that permission as well.
OK, I was able to create a test issue (in a private repo) via a dedicated PAT (issues read/write + code read + metadata read were all required for gh
to work). No other method (e.g. GITHUB_TOKEN + permissions
) seemed to work for cross-repo stuff. I don't see a way to have a PAT have different permissions for different repos (make issues in securedrop
, push code in securedrop-apt-test
), so I think we may have to switch tokens for those operations.
I'll continue to test with the private sandbox repo next week, pointers always appreciated :)
I think having two separate PATs will be fine, we already have one named PUSH_TOKEN
so another one named ISSUE_TOKEN
or w/e seems fine.
Also have a clean-old-packages job in securedrop-yum-test
Planning out the next steps:
securedrop-workstation
, while cleaning them up will live in securedrop-yum-test
, similar to https://github.com/freedomofpress/securedrop-apt-test/blob/main/.github/workflows/cleanup.yml for securedrop-apt-test
securedrop-yum-test
main
is branch-protected, we'll again need to generate a PAT, which we'll call PUSH_TOKEN
for consistency.securedrop-builder
to remove the CircleCI cleanup code. This also removes the need for scripts/clean-old-packages
to remain in this repository. An RPM-only version of the script will be migrated to securedrop-yum-test
.Starting to poke, but will get on it (and maybe the build/push portion) more tomorrow, as always please don't hesitate to chime in if I'm misunderstanding anything :)
Take the opportunity to split up what's done into the respective repositories: