Skip to content
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

Adding an manual release job that applies to release branches publishing maven releases #2057

Merged

Conversation

yue9944882
Copy link
Member

Signed-off-by: yue9944882 291271447@qq.com

@brendandburns i also clarified the usage of the release job in the doc.

Screen Shot 2021-12-31 at 4 17 00 PM 1

#2056 is an example of the generated commits by the job. as the next step, we can cherry-pick this release job to the recent release branches and send a release 11.0.4 for #2041

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 31, 2021
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 31, 2021
uses: actions/checkout@v2
- name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a way that we could use a more official github action for this? I'm a little worried about GPG key exfiltration from a random github action that could get compromised.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendandburns i didnt find an official action for importing the gpg keys, i tried importing via command lines but it's failing on missing tty device or sth. https://github.com/crazy-max/ghaction-import-gpg this action seems actively maintained and accumulated a few followers. we can switch to official if there is one in the future, what do you think?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know. I think I'm super paranoid about supply chain security these days, and handing our signing keys over to a GH action that could get compromised seems like a bad idea.

I will ping the GH people that I know and see if there is a better option. If not we'll see what we can do.

Apologies for the delay!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you look at this GH Action here:

https://github.com/microsoft/gctoolkit/actions/runs/1604755958/workflow#L32

It appears that you can use the export GPG_TTY=$(tty) line to setup the tty correctly
https://github.com/microsoft/gctoolkit/actions/runs/1604755958/workflow#L42

Let me know if that doesn't work. The Microsoft/GitHub Java folks claim it should work.

Thanks!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@brendandburns removed the third-party gpg action. alongside export GPG_TTY=$(tty) i also added --pinentry-mode loopback --passphrase *** to make the --edit-key works. the setup-java action works by editing the settings.xml profile on the worker node but it doesn't directly set up gpg for us.

and in our case, we need to do some additional work editing the key's trust level b/c the key is currently expired. am new to the gpg key renewing process so i stick to the expired key in the release job. we can renew one as a follow-up in the future, after that our release job can be simplified further.

@brendandburns
Copy link
Contributor

One comment about the GPG key handling....

@yue9944882 yue9944882 force-pushed the gh-action-release-job branch 2 times, most recently from 9aef5a7 to 50682a6 Compare January 5, 2022 05:59
Signed-off-by: yue9944882 <291271447@qq.com>
@yue9944882 yue9944882 force-pushed the gh-action-release-job branch from 50682a6 to 3693326 Compare January 5, 2022 06:09
@brendandburns
Copy link
Contributor

Thanks! You can just extend the expiration date for the key, I think, see for example:

https://superuser.com/questions/813421/can-you-extend-the-expiration-date-of-an-already-expired-gpg-key

@brendandburns
Copy link
Contributor

/lgtm
/approve

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Jan 5, 2022
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: brendandburns, yue9944882

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [brendandburns,yue9944882]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants