Skip to content

Commit

Permalink
Merge remote-tracking branch 'stelligent/master'
Browse files Browse the repository at this point in the history
* fixed compatibility issue with Ruby Runtime Plugin
* version 0.12 of the Ruby Runtime Plugin is no longer deprecated
* support for the older versions of the Rbenv Plugin is deprecated

[FIXES JENKINS-39193]
[FIXES JENKINS-39807]
  • Loading branch information
daspilker committed Jan 15, 2017
2 parents f909b55 + b6ab912 commit a459927
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 13 deletions.
16 changes: 13 additions & 3 deletions docs/Home.md
Expand Up @@ -31,6 +31,16 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
([#981](https://github.com/jenkinsci/job-dsl-plugin/pull/981))
* Show more available method signatures in embedded API viewer
([#982](https://github.com/jenkinsci/job-dsl-plugin/pull/982))
* Fixed compatibility issue with [Ruby Runtime Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin)
([JENKINS-39193](https://issues.jenkins-ci.org/browse/JENKINS-39193),
[JENKINS-39807](https://issues.jenkins-ci.org/browse/JENKINS-39807))
* Version 0.12 of the [Ruby Runtime Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin) is no
longer deprecated since 0.13 has several issues
([JENKINS-37353](https://issues.jenkins-ci.org/browse/JENKINS-37353),
[JENKINS-37771](https://issues.jenkins-ci.org/browse/JENKINS-37771),
[JENKINS-38145](https://issues.jenkins-ci.org/browse/JENKINS-38145))
* Support for the older versions of the [Rbenv Plugin](https://wiki.jenkins-ci.org/display/JENKINS/rbenv+plugin) is
deprecated, see [Migration](Migration#migrating-to-157)
* 1.56 (January 06 2016)
* Fixed support for
[Config File Provider Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Config+File+Provider+Plugin)
Expand All @@ -40,7 +50,7 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
* Enhanced support for the [SSH Agent Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin)
([#980](https://github.com/jenkinsci/job-dsl-plugin/pull/980))
* Support for the older versions of the
[SSH Agent Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin),
[SSH Agent Plugin](https://wiki.jenkins-ci.org/display/JENKINS/SSH+Agent+Plugin) is deprecated,
see [Migration](Migration#migrating-to-156)
* 1.55 (January 03 2016)
* Updated optional
Expand Down Expand Up @@ -84,8 +94,8 @@ Browse the Jenkins issue tracker to see any [open issues](https://issues.jenkins
[Delivery Pipeline Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Delivery+Pipeline+Plugin) is deprecated, see
[Migration](Migration#migrating-to-154)
* Support for the older versions of the
[GitHub Branch Source Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Branch+Source+Plugin)
[Migration](Migration#migrating-to-154)
[GitHub Branch Source Plugin](https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Branch+Source+Plugin) is deprecated,
see [Migration](Migration#migrating-to-154)
* The class `javaposse.jobdsl.plugin.JobDslPlugin` is deprecated, see [Migration](Migration#migrating-to-154)
* Removed most things that have been deprecated in 1.47, see [Migration](Migration#migrating-to-147)
* Removed anything that has been deprecated in 1.48, see [Migration](Migration#migrating-to-148)
Expand Down
9 changes: 8 additions & 1 deletion docs/Migration.md
@@ -1,3 +1,10 @@
## Migrating to 1.57

### Rbenv

Support for versions older than 0.0.17 of the [Rbenv Plugin](https://wiki.jenkins-ci.org/display/JENKINS/rbenv+plugin)
is [[deprecated|Deprecation-Policy]] and will be removed.

## Migrating to 1.56

### SSH Agent
Expand Down Expand Up @@ -252,7 +259,7 @@ Support for versions older than 0.6 of the [RVM Plugin](https://wiki.jenkins-ci.

### Ruby Runtime

Support for versions older than 0.13 of the
Support for versions older than 0.12 of the
[Ruby Runtime Plugin](https://wiki.jenkins-ci.org/display/JENKINS/Ruby+Runtime+Plugin) is
[[deprecated|Deprecation-Policy]] and will be removed.

Expand Down
Expand Up @@ -57,6 +57,8 @@ class WrapperContext extends AbstractExtensibleContext {
@RequiresPlugin(id = 'ruby-runtime')
])
void rbenv(String rubyVersion, @DslContext(RbenvContext) Closure rbenvClosure = null) {
jobManagement.logPluginDeprecationWarning('rbenv', '0.0.17')

RbenvContext rbenvContext = new RbenvContext()
ContextHelper.executeInContext(rbenvClosure, rbenvContext)

Expand Down Expand Up @@ -107,9 +109,9 @@ class WrapperContext extends AbstractExtensibleContext {
}

private String getRubyWrapperClass() {
jobManagement.logPluginDeprecationWarning('ruby-runtime', '0.13')
jobManagement.logPluginDeprecationWarning('ruby-runtime', '0.12')

jobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.13') ? 'Jenkins::Tasks::BuildWrapperProxy' :
jobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.10') ? 'Jenkins::Tasks::BuildWrapperProxy' :
'Jenkins::Plugin::Proxies::BuildWrapper'
}

Expand Down
Expand Up @@ -48,7 +48,7 @@ class WrapperContextSpec extends Specification {

def 'add rbenv-controlled ruby version with'() {
setup:
mockJobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.13') >> true
mockJobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.10') >> true

when:
context.rbenv('2.1.2')
Expand Down Expand Up @@ -91,10 +91,14 @@ class WrapperContextSpec extends Specification {
}
1 * mockJobManagement.requirePlugin('rbenv')
1 * mockJobManagement.requirePlugin('ruby-runtime')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.13')
1 * mockJobManagement.logPluginDeprecationWarning('rbenv', '0.0.17')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.12')
}

def 'add rbenv-controlled ruby version with older runtime'() {
setup:
mockJobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.10') >> false

when:
context.rbenv('2.1.2')

Expand Down Expand Up @@ -136,7 +140,8 @@ class WrapperContextSpec extends Specification {
}
1 * mockJobManagement.requirePlugin('rbenv')
1 * mockJobManagement.requirePlugin('ruby-runtime')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.13')
1 * mockJobManagement.logPluginDeprecationWarning('rbenv', '0.0.17')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.12')
}

def 'add rbenv-controlled override defaults'() {
Expand Down Expand Up @@ -165,12 +170,12 @@ class WrapperContextSpec extends Specification {
}
1 * mockJobManagement.requirePlugin('rbenv')
1 * mockJobManagement.requirePlugin('ruby-runtime')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.13')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.12')
}

def 'add rvm-controlled ruby version'() {
setup:
mockJobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.13') >> true
mockJobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.10') >> true

when:
context.rvm('ruby-1.9.3')
Expand All @@ -182,10 +187,13 @@ class WrapperContextSpec extends Specification {
1 * mockJobManagement.requirePlugin('rvm')
1 * mockJobManagement.requirePlugin('ruby-runtime')
1 * mockJobManagement.logPluginDeprecationWarning('rvm', '0.6')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.13')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.12')
}

def 'add rvm-controlled ruby version with older runtime'() {
setup:
mockJobManagement.isMinimumPluginVersionInstalled('ruby-runtime', '0.10') >> false

when:
context.rvm('ruby-1.9.3')

Expand All @@ -196,7 +204,7 @@ class WrapperContextSpec extends Specification {
1 * mockJobManagement.requirePlugin('rvm')
1 * mockJobManagement.requirePlugin('ruby-runtime')
1 * mockJobManagement.logPluginDeprecationWarning('rvm', '0.6')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.13')
1 * mockJobManagement.logPluginDeprecationWarning('ruby-runtime', '0.12')
}

def 'default timeout works'() {
Expand Down

0 comments on commit a459927

Please sign in to comment.