Skip to content

Commit 584b2a4

Browse files
committed
deprecated support for older versions of SSH Agent plugin
1 parent dc862e3 commit 584b2a4

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

docs/Home.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
3434
([#978](https://github.com/jenkinsci/job-dsl-plugin/pull/978))
3535
* Enhanced support for the [SSH Agent Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin)
3636
([#980](https://github.com/jenkinsci/job-dsl-plugin/pull/980))
37+
* Support for the older versions of the
38+
[SSH Agent Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin),
39+
see [Migration](Migration#migrating-to-156)
3740
* 1.55 (January 03 2016)
3841
* Updated optional
3942
[Config File Provider Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin) dependency to

docs/Migration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
## Migrating to 1.56
2+
3+
### SSH Agent
4+
5+
Support for versions older than 1.5 of the
6+
[SSH Agent Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin) is [[deprecated|Deprecation-Policy]]
7+
and will be removed.
8+
19
## Migrating to 1.55
210

311
### ScriptRequest

job-dsl-core/src/main/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContext.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,7 @@ class WrapperContext extends AbstractExtensibleContext {
186186
*/
187187
@RequiresPlugin(id = 'ssh-agent')
188188
void sshAgent(String credentials) {
189+
jobManagement.logPluginDeprecationWarning('ssh-agent', '1.5')
189190
Preconditions.checkNotNull(credentials, 'credentials must not be null')
190191

191192
wrapperNodes << new NodeBuilder().'com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper' {

job-dsl-core/src/test/groovy/javaposse/jobdsl/dsl/helpers/wrapper/WrapperContextSpec.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -399,6 +399,7 @@ class WrapperContextSpec extends Specification {
399399
context.wrapperNodes[0].name() == 'com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper'
400400
context.wrapperNodes[0].user[0].value() == 'acme'
401401
1 * mockJobManagement.requirePlugin('ssh-agent')
402+
1 * mockJobManagement.logPluginDeprecationWarning('ssh-agent', '1.5')
402403
}
403404

404405
def 'sshAgent with multiple credentials'() {

0 commit comments

Comments
 (0)