Skip to content

Conversation

@matthauck
Copy link
Contributor

@matthauck matthauck commented Jun 24, 2016

@matthauck
Copy link
Contributor Author

ping. Any chance this might get merged in?

@matthauck
Copy link
Contributor Author

Hello? Is this plugin still active?

@afalko
Copy link

afalko commented Sep 29, 2016

Not sure how to vote this one up, but we'd love to have this as well.

@jglick
Copy link
Member

jglick commented Oct 11, 2016

I will take a look when I have a moment.

@jglick jglick changed the title Add binding for SSH private keys [JENKINS-28399] Add binding for SSH private keys Oct 11, 2016
@jglick
Copy link
Member

jglick commented Oct 11, 2016

JENKINS-28399 I suppose. Note that the usual alternative is to use the SSH Agent plugin so that the key is not actually used directly.

@thomasgl-orange
Copy link
Contributor

Maybe this could/should be implemented in the jenkinsci/ssh-credentials-plugin instead? From discussion in #22, my understanding was that it would be better to implement new bindings directly in the plugins which provide the credentials types, inverting the dependency (that's what I ended up proposing in jenkinsci/docker-commons-plugin#54 for Docker client certificates).
@jglick: could you confirm/infirm?

@matthauck
Copy link
Contributor Author

fwiw, I did not want to use the ssh agent plugin because of its extra installation burden (dependency on tomcat native libraries and needing to install BouncyCastle as a security provider). Having direct access to the key turned out to be easier.

Not sure about where this should live. Seems like putting the ssh key binding into the "binding" plugin seemed like the best place to me. I'll leave that decision up to the maintainer as to where it should live.

@jglick
Copy link
Member

jglick commented Oct 11, 2016

Maybe this could/should be implemented in the jenkinsci/ssh-credentials-plugin instead?

No strong preference I guess. Generally “domain-specific” bindings should live in the plugin defining that Credentials type. OTOH SSH credentials are very widely used and considered close to fundamental.

JENKINS-19508 is really the right solution IMO, but that is not available now.

@stephenc any particular opinion?

return new FilePath(workspace.getChannel(), workspace.act(new FilePath.FileCallable<String>() {
@Override
public String invoke(File dir, VirtualChannel channel) throws IOException, InterruptedException {
File f = File.createTempFile(prefix, suffix);
Copy link
Member

@jglick jglick Oct 11, 2016

Choose a reason for hiding this comment

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

This will not work with Image.inside from docker-workflow. It is necessary to use the standard “temp workspace”. See FileBinding and #25.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍


@Override
public void checkRoles(RoleChecker checker) throws SecurityException {
// no op
Copy link
Member

Choose a reason for hiding this comment

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

No. Extend MasterToSlaveFileCallable instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

}

@Override public Set<String> variables() {
return new HashSet<String>(Arrays.asList(keyFileVariable, usernameVariable, passphraseVariable));
Copy link
Member

Choose a reason for hiding this comment

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

tip: ImmutableSet.of

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

}

@Override public void unbind(Run<?, ?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
new FilePath(workspace.getChannel(), this.filePath).delete();
Copy link
Member

Choose a reason for hiding this comment

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

workspace.child(filePath)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public TemporaryFolder tmp = new TemporaryFolder();

private static class DummyPrivateKey extends BaseCredentials implements SSHUserPrivateKey, Serializable {
Copy link
Member

Choose a reason for hiding this comment

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

Should be unnecessary; use a normal BasicSSHUserPrivateKey.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was going to do that originally but got hung on all the other stuff necessary to construct one (like PrivateKeySource), and seemed easier to just create a simple implementation of the interface here. Are you okay maybe with leaving this as is?

Copy link
Member

Choose a reason for hiding this comment

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

Up to you. BasicSSHUserPrivateKey would probably be easier.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

would prefer to keep as-is if it's okay with you.


@Test public void configRoundTrip() throws Exception {
story.addStep(new Statement() {
@SuppressWarnings("rawtypes")
Copy link
Member

Choose a reason for hiding this comment

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

Collections.<TheType>singletonList

WorkflowRun b = p.getBuildByNumber(1);
assertNotNull(b);
SemaphoreStep.success("basics/1", null);
while (b.isBuilding()) { // TODO 1.607+ use waitForCompletion
Copy link
Member

Choose a reason for hiding this comment

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

Use story.j.waitForCompletion. Jenkins dependency irrelevant.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

👍

@naphthalene
Copy link

Is this dead in the water? I'm trying to figure out how to inject SSH creds into a kubernetes jnlp slave. I think I'm stuck with using a custom image with a key baked in.

@matthauck
Copy link
Contributor Author

Sorry, by the time the review came in I had ditched this workflow for something else and have been distracted since. I can get this back up to date and address the review feedback.

@naphthalene
Copy link

No problem! I've got a workaround going.

@matthauck
Copy link
Contributor Author

just rebased from master. will update per review feedback.

@stephenc
Copy link
Member

stephenc commented Mar 2, 2017

@jglick I think this plugin is the correct place given that JENKINS-19508 has not been implemented (ssh-credentials being slightly more generic than this)

<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ssh-credentials</artifactId>
<version>1.11</version>
Copy link
Member

Choose a reason for hiding this comment

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

I would just make it a mandatory dep, as we do for plain-credentials: ssh-credentials does no harm if unused.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

okay. was trying to be less aggressive here. can change this if you like.

/*
* The MIT License
*
* Copyright 2013 jglick.
Copy link
Member

Choose a reason for hiding this comment

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

Really? :-)


@Override public MultiEnvironment bind(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener) throws IOException, InterruptedException {
SSHUserPrivateKey sshKey = getCredentials(build);
FilePath keyFile = tempDir(workspace).child("ssh-key-" + keyFileVariable);
Copy link
Member

Choose a reason for hiding this comment

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

Better to use the new API in #25 when ready.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i see you reverted that PR. Do you want to wait until that api is ready?

Copy link
Member

Choose a reason for hiding this comment

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

Yes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. Please ping me then when it is ready and I can update this PR.

public final String usernameVariable;
public final String passphraseVariable;

@DataBoundConstructor public SSHUserPrivateKeyBinding(String keyFileVariable, String passphraseVariable, String usernameVariable, String credentialsId) {
Copy link
Member

Choose a reason for hiding this comment

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

Since passphraseVariable and usernameVariable are not necessarily required, better to make these @CheckForNull properties with @DataBoundSetter.

/*
* The MIT License
*
* Copyright 2015 Jesse Glick.
Copy link
Member

Choose a reason for hiding this comment

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

?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

hah. was copy-pasting from other tests probably. i'll take that out.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can I just leave out this copyright?

WorkflowJob p = story.j.jenkins.createProject(WorkflowJob.class, "p");
p.setDefinition(new CpsFlowDefinition(""
+ "node {\n"
+ " withCredentials([[$class: 'SSHUserPrivateKeyBinding', keyFileVariable: 'THEKEY', passphraseVariable: 'THEPASS', usernameVariable: 'THEUSER', credentialsId: '" + credentialsId + "']]) {\n"
Copy link
Member

Choose a reason for hiding this comment

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

Add a @Symbol.

@Rule public RestartableJenkinsRule story = new RestartableJenkinsRule();
@Rule public TemporaryFolder tmp = new TemporaryFolder();

private static class DummyPrivateKey extends BaseCredentials implements SSHUserPrivateKey, Serializable {
Copy link
Member

Choose a reason for hiding this comment

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

Up to you. BasicSSHUserPrivateKey would probably be easier.

@tutipeti
Copy link

Hey, any chance to merge this soon? Would be much appreciated :)

@matthauck
Copy link
Contributor Author

It's already been another month since #25 was opened and closed. Not seeing any open PRs on that either. It seems strange to me to hold up this PR (which other people than myself clearly have interest in) for a new API that isn't there yet, and it is a little frustrating how long this PR has dragged on.

If you guys think this is a worthwhile feature to add, and if the current implementation here is correct, then why not just merge in this PR now and change to use the new API when it is done?

@jglick
Copy link
Member

jglick commented Jun 13, 2017

#36 now.

}

@DataBoundSetter
@CheckForNull
Copy link
Member

Choose a reason for hiding this comment

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

This annotation is meaningless on a method returning void! Did you mean to place it on the getter?

}

@DataBoundSetter
@CheckForNull
Copy link
Member

Choose a reason for hiding this comment

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

ditto

UnbindableDir keyDir = UnbindableDir.create(workspace);
FilePath keyFile = keyDir.getDirPath().child("ssh-key-" + keyFileVariable);

StringWriter stringWriter = new StringWriter();
Copy link
Member

Choose a reason for hiding this comment

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

Simpler to use FilePath.write().

@@ -0,0 +1,9 @@
<div>
Copies the SSH key file given in the credentials to a temporary location, then sets a variable to that location.
(The file is deleted when the build completes.) Also sets variables for the SSH key's username and passphrase.
Copy link
Member

Choose a reason for hiding this comment

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

Nice to create help-passphraseVariable.html giving specifics, such as that two parameters are optional. Can also add doCheck* methods to the descriptor guiding the user to fill in keyFileVariable but allowing the others to remain blank.

@jglick
Copy link
Member

jglick commented Jun 22, 2017

After I get #42 to pass and merge it, you will need to merge with master to resolve conflicts and get the new CI builder running the tests on both Linux and Windows.

@jglick
Copy link
Member

jglick commented Jun 23, 2017

Done, please merge.

@naphthalene
Copy link

Thank you for pushing this through!!

Copy link
Member

@jglick jglick left a comment

Choose a reason for hiding this comment

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

Some test failures caught by CI.

+ "node {\n"
+ " withCredentials([sshUserPrivateKey(keyFileVariable: 'THEKEY', passphraseVariable: 'THEPASS', usernameVariable: 'THEUSER', credentialsId: '" + credentialsId + "')]) {\n"
+ " semaphore 'basics'\n"
+ " sh '''\n"
Copy link
Member

Choose a reason for hiding this comment

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

+ "node {\n"
+ " withCredentials([sshUserPrivateKey(keyFileVariable: 'THEKEY', credentialsId: '" + credentialsId + "')]) {\n"
+ " semaphore 'basics'\n"
+ " sh '''\n"
Copy link
Member

Choose a reason for hiding this comment

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

p.setDefinition(new CpsFlowDefinition(""
+ "node {\n"
+ " withCredentials([sshUserPrivateKey(keyFileVariable: 'THEKEY', credentialsId: '" + credentialsId + "')]) {\n"
+ " semaphore 'basics'\n"
Copy link
Member

Choose a reason for hiding this comment

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

Misleading semaphore name BTW; could use a more generic name (they are not shared between tests).

+ " withCredentials([sshUserPrivateKey(keyFileVariable: 'THEKEY', credentialsId: '" + credentialsId + "')]) {\n"
+ " semaphore 'basics'\n"
+ " sh '''\n"
+ " set +x\n"
Copy link
Member

Choose a reason for hiding this comment

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

not actually necessary

+ " withCredentials([sshUserPrivateKey(keyFileVariable: 'THEKEY', passphraseVariable: 'THEPASS', usernameVariable: 'THEUSER', credentialsId: '" + credentialsId + "')]) {\n"
+ " semaphore 'basics'\n"
+ " sh '''\n"
+ " set +x\n"
Copy link
Member

Choose a reason for hiding this comment

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

not actually necessary

@matthauck
Copy link
Contributor Author

yeah, the test were written originally w/ only linux in mind....

@jglick
Copy link
Member

jglick commented Jun 30, 2017

Need to either update them to run on Windows, or at a minimum

assumeFalse(Functions.isWindows()); // TODO provide a Windows equivalent

@matthauck
Copy link
Contributor Author

sorry. been really busy at work. getting around to this now.

@matthauck
Copy link
Contributor Author

woot! build passed! 🎉

@jglick jglick merged commit b141c6f into jenkinsci:master Aug 8, 2017
@matthauck matthauck deleted the ssh-key-creds branch August 8, 2017 18:17
@ghost
Copy link

ghost commented Aug 11, 2017

How would you access this using withCredentials?

e.g: withCredentials([ssh-priv-key(credentialsId: '41341dc3-59fb-47c8-aa31-9d9931ee7c1c', variable: 'SSH-KEY')])

@matthauck
Copy link
Contributor Author

Please see test for example usage: https://github.com/jenkinsci/credentials-binding-plugin/blob/master/src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyTest.java#L154

@fpelz
Copy link

fpelz commented Sep 11, 2017

How can I use this inside a Wrapper, like I would do for usernamePassword.

 wrappers { 
    credentialsBinding {
        // here the values from jenkins credentials are available as env. vars. 
        usernamePassword('CF_EMAIL', 'CF_PASSWORD', 'cf-dev-credential')

        // Similarly would like to put the path for the key and passphrase
        ssh('MY_KEY_PATH', 'MY_KEY_USER', 'MY_KEY_PASSPHRASE', 'my-key-id-jenkins-credentials')
   }
}

Is it possible with latest version?

@sgalaviz
Copy link

sgalaviz commented Sep 20, 2017

Hello,

I try the usage example (https://github.com/jenkinsci/credentials-binding-plugin/blob/master/src/test/java/org/jenkinsci/plugins/credentialsbinding/impl/SSHUserPrivateKeyTest.java#L154) as follow:

node {
	key = 'mykey'
	stage('Obtención de credenciales') {
		withCredentials([sshUserPrivateKey(keyFileVariable: 'THEKEY',
			passphraseVariable: 'THEPASS',
			usernameVariable: 'THEUSER', credentialsId: key)])
		{
			sh 'echo THEUSER=[$THEUSER] THEKEY=[$THEKEY] THEPASS=[$THEPASS]'
		}
	}
}

But didn't work because:

java.lang.NoSuchMethodError: No such DSL method 'sshUserPrivateKey' found among steps

Any advice is appreciated

@mbarzare
Copy link

mbarzare commented Oct 9, 2017

I am using Jenkins 2.80 with a username / private key in my credentials. I am attempting to use the Credentials Binding Plugin v. 1.13 to retrieve the credentials with the sshUserPrivateKey binding and inject the results into a successive build step. My key does not have a passphrase. The following exception is what is being output in my build. Can anyone let me know if this is supported yet? My Google searches have not been promising. :(

java.lang.NullPointerException
	at hudson.EnvVars.override(EnvVars.java:132)
	at org.jenkinsci.plugins.credentialsbinding.impl.BindingStep$Overrider.expand(BindingStep.java:146)
	at org.jenkinsci.plugins.workflow.steps.EnvironmentExpander.getEffectiveEnvironment(EnvironmentExpander.java:122)
	at org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:66)
	at org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:258)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:203)
	at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:150)
	at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:108)
	at sun.reflect.GeneratedMethodAccessor284.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
	at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213)
	at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022)
	at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:42)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:155)
	at org.kohsuke.groovy.sandbox.GroovyInterceptor.onMethodCall(GroovyInterceptor.java:23)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SandboxInterceptor.onMethodCall(SandboxInterceptor.java:133)
	at org.kohsuke.groovy.sandbox.impl.Checker$1.call(Checker.java:153)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:157)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
	at org.kohsuke.groovy.sandbox.impl.Checker.checkedCall(Checker.java:127)
	at com.cloudbees.groovy.cps.sandbox.SandboxInvoker.methodCall(SandboxInvoker.java:17)
	at WorkflowScript.run(WorkflowScript:20)
	at ___cps.transform___(Native Method)
	at com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:57)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:109)
	at com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:82)
	at sun.reflect.GeneratedMethodAccessor233.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)
	at com.cloudbees.groovy.cps.impl.ConstantBlock.eval(ConstantBlock.java:21)
	at com.cloudbees.groovy.cps.Next.step(Next.java:83)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:174)
	at com.cloudbees.groovy.cps.Continuable$1.call(Continuable.java:163)
	at org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:122)
	at org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:261)
	at com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:163)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.access$001(SandboxContinuable.java:19)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:35)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable$1.call(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.GroovySandbox.runInSandbox(GroovySandbox.java:108)
	at org.jenkinsci.plugins.workflow.cps.SandboxContinuable.run0(SandboxContinuable.java:32)
	at org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:174)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:330)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$100(CpsThreadGroup.java:82)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:242)
	at org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:230)
	at org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:64)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:112)
	at jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE

@mbarzare
Copy link

mbarzare commented Oct 12, 2017

I should note that I finally discovered what I was doing wrong. To retrieve my key, I did the following in my Jenkinsfile:

withCredentials([sshUserPrivateKey(keyFileVariable: 'KEY', credentialsId: 'GITHUB_PRIVATE_KEY')]) 
{
sh 'echo GITHUB_KEY=$KEY'
}

Hope this helps someone else.

@harmanbirdi
Copy link

@mbarzare - I am trying to provide the "SSH User Private Key" that I have created globally to a promoted job. While it lets me create a "Credentials Parameter" and select "SSH Username with Private Key", and set its default value to my Global credential, when I echo it, I just see the UUID for the credentials.

How can I extract the username, and the private key from it? I have used the "SSH User Private Key" binding in the main Build section, but I need to access the same credentials to use in Promotions.

I am not sure how to use the UUID in a shell script to extract the credentials from the UUID.

Any help would be appreciated? Thanks.

@matthauck
Copy link
Contributor Author

i think this github issue is becoming a support forum -- can we lock this issue maybe?

@kormotodor
Copy link

Sorry but is this documentation still correct according to this feature?

@jglick
Copy link
Member

jglick commented Jun 6, 2019

@kormotodor job-dsl hard-codes some things rather than using extension points plus @Symbol, so I would not expect it to have complete coverage.

@kormotodor
Copy link

@jglick So you mean, that it is impossible to call method "sshUserPrivateKey" from "credentialsBinding" plugin in dsl script on groovy for freestyle job? I expected exactly that behavior like when i use

job('example') {
    wrappers {
        credentialsBinding {
            file('KEYSTORE', 'keystore.jks')
        }
    }
}

just like in documentation is described.

@jglick
Copy link
Member

jglick commented Jun 7, 2019

@kormotodor I do not know, I do not maintain the job-dsl plugin. Please use a support forum for questions, or if you believe you have found a bug, file it under job-dsl-plugin in JIRA.

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

Successfully merging this pull request may close these issues.