-
-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release of jenkins-contribution-*
GO applications fail: homebrew token not found
#4141
Comments
For reference, from #4017 (comment):
|
I tried it out the suggested method , expecting the GITHUB_TOKEN of Looking closely at the GitHub action used by
The only difference is that instead of loading the temporary token in HOMEBREW (obvious name IMHO), the designer of jenkins-version loads it in GITHUB-TOKEN. @lemeurherve maybe the used secrets name are a hint to what GH App to use (JENKINS_ADMIN_APP). I am restoring my original code. |
Any news about the planning of this issue @lemeurherve? I see that it is still in triage. This is blocking the transfer of the system and I have only 6 days left (and other issues to solve). If it can help, I can help you by explaining how it works (I implemented it with three applications) although I have only limited access to the jenkins-infra org. I believe that the application to install and configure in the two migrated application is JENKINS_ADMIN_APP. |
For info, the jenkins-infra team is doing triage every Tuesday during the weekly meeting (except for "level 1" support requests or production issue of course): this issue will be triaged later today and most probably be part of the upcoming milestone since worked already started. @jmMeessen Just to be sure (as I'm only starting to check this topic while preparing the weekly meeting): can you confirm the migrated repository is specifying the existing https://github.com/jenkins-infra/homebrew-tap (and not https://github.com/jenkins-infra/homebrew which does not exist)? Another point: I confirm that @jmMeessen said that a GH Application is required for the homebrew release to the tap as the Github Action |
Sorry for the unnecessary question about the delayed triage. I am not aware
of the internal organisation of the INFRA team (and I was led to think that
this was a normal "after sales service" of the migration ticket)
can you confirm the migrated repository is specifying the existing
https://github.com/jenkins-infra/homebrew-tap
I confirm and it was specifically asked during the migration on Friday. The
configuration has been adapted accordingly.
See
https://github.com/jenkins-infra/jenkins-contribution-extractor/blob/abe61e18870c4e05cfa8f92d79e7c980c48f12b3/.goreleaser.yml#L54
See
https://github.com/jenkins-infra/jenkins-contribution-aggregator/blob/113387c4baee59247bf49ae5cdffb667a4e57325/.goreleaser.yml#L55
/- Jmm
Le mar. 18 juin 2024 à 11:09, Damien Duportal ***@***.***> a
écrit :
… Any news about the planning of this issue @lemeurherve
<https://github.com/lemeurherve>? I see that it is still in triage. This
is blocking the transfer of the system and I have only 6 days left (and
other issues to solve).
If it can help, I can help you by explaining how it works (I implemented
it with three applications) although I have only limited access to the
jenkins-infra org. I believe that the application to install and configure
in the two migrated application is JENKINS_ADMIN_APP.
For info, the jenkins-infra team is doing triage every Tuesday during the
weekly meeting (except for "level 1" support requests or production issue
of course): this issue will be triaged later today and most probably be
part of the upcoming milestone since worked already started.
@jmMeessen <https://github.com/jmMeessen> Just to be sure (as I'm only
starting to check this topic while preparing the weekly meeting): can you
confirm the migrated repository is specifying the existing
https://github.com/jenkins-infra/homebrew-tap (and not
https://github.com/jenkins-infra/homebrew which does not exist)?
Another point: I confirm that @jmMeessen <https://github.com/jmMeessen>
said that a GH Application is required for the homebrew release to the tap
as the Github Action GITHUB_TOKEN is always scoped to the repository
where it runs. We need to set up one / reuse eventually existing one with
permissions to https://github.com/jenkins-infra/homebrew-tap and insert
the 2 credentials in the migrated repositories.
—
Reply to this email directly, view it on GitHub
<#4141 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABN3S7L57VTF2JMEWYTW5Q3ZH72LXAVCNFSM6AAAAABJKTS35GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZVGU4TKNBVG4>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
triaged: Related to #4017 , added to milestone, taken by @lemeurherve |
Did a quick check on the existing jenkins-infra/homebrew-tap repository. It was used by jenkins-infra/uc (now archived) and jenkins-infra/jenkins-version. I understand that the GitHub applications we used to use are old and were misunderstood (by us) in the past: the scoped both updatecli, homebrew tap, binary releases inside GHAs which is too vast. @lemeurherve a few pointers to unblock this issue quickly:
Note about goreleaser: as per https://goreleaser.com/ci/actions/#token-permissions, we can only provide one GH token to goreleaser. Since it manages publication in the repo where it runs (GH release binaries, tag pushing, etc.) AND homebrew-tap in another repository, it means we cannot have a GH application only for homebrew: its scope is wider for goreleaser. |
New "goreleaser in jenkins-infra" GitHub App created (App ID: 925062), with "Contents: Read & Write" permissions, installed on selected repositories (https://github.com/jenkins-infra/jenkins-version & https://github.com/jenkins-infra/jenkins-contribution-extractor). Tested this new GitHub App on jenkins-version (jenkins-infra/jenkins-version#201) with success: Opening a pull request on https://github.com/jenkins-infra/jenkins-contribution-extractor to use this new GitHub App credentials. |
Retrigered the last failed goreleaser job https://github.com/jenkins-infra/jenkins-contribution-extractor/actions/runs/9548130664, got the following error:
Currently looking at what's wrong. |
As I rerun the job, it used the same commit, thus it didn't include the new credentials. Created a new release to trigger goreleaser which worked as expected:
Closing this issue as resolved, thanks @dduportal for the help! |
Reopening until @jmMeessen can confirm (most probably Thursday) that it is good for him |
jenkins-ccontributor-*
GO applications fail: homebrew token not foundjenkins-contribution-*
GO applications fail: homebrew token not found
While doing this in pair we forgot to do the same than #4141 (comment) for the second Go repository https://github.com/jenkins-infra/jenkins-contribution-aggregator. Taking care of it. |
Installed the "goreleaser in jenkins-infra" GitHub App to https://github.com/jenkins-infra/jenkins-contribution-aggregator and opened jenkins-infra/jenkins-contribution-aggregator#40 to use its credentials. Also removed the remnant |
I confirm that (for both repositories)
This issue/task can be considered as completed. I thank all those who participated to make this possible. It was critical seen the severe time constrain we had to complete and stabilise the migration in the short time left. |
Thanks a lot to all the people that were involved in that migration. 🙏 |
Service(s)
GitHub
Summary
The GoReleaser based release process updates a repository (
jenkins-infra/homebrew
) to make the new release available via HomeBrew. With the migration of the tools from "jmMeessen" to "jenkins-infra" this process doesn't work anymore.The error message is
This process is handled by the "release" GitHub action. It sets up on-the-fly a token via a GitHub app to allow the GHA to update another repository in the Org (the "homebrew" repository) via a commit. In this case, the failure comes the local secrets to access the app are not set.
This is the code where the token is generated (release.yml#L19-24):
and this is how the token is retrieved and used in the release step (release.yml#L24-L31):
As far as I remember, the solution is to install an application that has update/commit access in jenkins-infra/homebrew repository and to add the APP_ID and the APP_PRIVKEY as secrets in the repository.
Reproduction steps
No response
The text was updated successfully, but these errors were encountered: