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

[stage-vote-release-plugin] signingKey instead of secretKeyRingFile #68

Open
juherr opened this issue May 18, 2023 · 5 comments
Open

[stage-vote-release-plugin] signingKey instead of secretKeyRingFile #68

juherr opened this issue May 18, 2023 · 5 comments

Comments

@juherr
Copy link

juherr commented May 18, 2023

Hi,

Because the GPG export can have some issues when a passphrase is needed in CI, we want to use "in-memory ascii-armored keys" and provide -Psigning.signingKey option instead of the default -Psigning.secretKeyRingFile option.

Is it possible?

@vlsi
Copy link
Owner

vlsi commented May 18, 2023

That is doable if you post-configure the signing plugin.

For instance, something like

plugins.withId("signing") {
    configure<SigningExtension> {
        useInMemoryPgpKeys(.., ...)
    }
}

I guess you could add it to https://github.com/testng-team/testng/blob/master/build-logic/publishing/src/main/kotlin/testng.maven-publish.gradle.kts or create testng.signing.gradle.kts and "include" it into testng.maven-publish.gradle.kts with id("testng.signing").

WDYT?

@juherr
Copy link
Author

juherr commented May 18, 2023

That sounds great. I will try that and keep you in touch.

Maybe you should add a documention section for the next users.

@juherr
Copy link
Author

juherr commented May 18, 2023

It worked like a charm, thanks! testng-team/testng@c7e289b

For my understanding, is it possible to replace plugins.withId("signing") { ... } by signing { ... }?

@vlsi
Copy link
Owner

vlsi commented Jun 24, 2023

For my understanding, is it possible to replace plugins.withId("signing") { ... } by signing { ... }?

That depends. If you have plugins { signing } at the beginning of the build.gradle.kts, then you could just use signing { ... }.

The meaning is:

plugins.withId("signing") { ... } -- execute action when signing plugin is added to a project. If singing plugin is never applied, then the action is not executed.

signing { ... } -- configures signing configuration. Apparently, it expects that signing plugin should be already applied (e.g. with plugins { signing }) otherwise it would fail.

@juherr
Copy link
Author

juherr commented Jun 29, 2023

Ok, clear. Thanks for the explanations!
Ping @krmahadevan fyi

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants