Skip to content

Commit

Permalink
Support multivalue attributes/constants in pipeline2ATX (#38)
Browse files Browse the repository at this point in the history
  • Loading branch information
ErikRehmTT authored Sep 13, 2024
1 parent c592f50 commit 548ff30
Show file tree
Hide file tree
Showing 13 changed files with 83 additions and 74 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,29 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Lint Code Base
uses: github/super-linter@v3.17.0 # https://github.com/github/super-linter/issues/2253#issuecomment-998982152
env:
DEFAULT_BRANCH: main
VALIDATE_GROOVY: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

test:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
uses: actions/checkout@v4
- run: git switch -C "testcontainers"
- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
java-version: 17
- name: Cache Gradle packages
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/sync-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK 11
uses: actions/setup-java@v1
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 11
distribution: temurin
java-version: 17

- name: Run Documentation with Gradle
run: |
Expand Down
68 changes: 41 additions & 27 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ plugins {
group 'de.tracetronic.jenkins'
description 'This is a shared library to extend Jenkins pipelines and to keep code DRY.'

sourceCompatibility = 11
targetCompatibility = 11
sourceCompatibility = 17
targetCompatibility = 17

sourceSets {
main {
Expand All @@ -36,31 +36,44 @@ sourceSets {
}

repositories {
jcenter()
mavenCentral()
maven {
url 'https://repo.jenkins-ci.org/releases/'
url 'https://repo.jenkins-ci.org/public/'
}
}

dependencies {
compile 'org.codehaus.groovy:groovy-all:2.5.6'
compile 'org.jenkins-ci.main:jenkins-core:2.361.4'
compile 'org.jenkins-ci.plugins.workflow:workflow-api:1208.v0cc7c6e0da_9e@jar'
compile 'org.jenkins-ci.plugins.workflow:workflow-support:839.v35e2736cfd5c@jar'
compile 'org.jenkins-ci.plugins.pipeline-stage-view:pipeline-rest-api:2.32@jar'
compile 'com.cloudbees:groovy-cps:3659.v582dc37621d8@jar'

testCompile 'com.lesfurets:jenkins-pipeline-unit:1.16'
testCompile 'org.testcontainers:spock:1.15.3'
testCompile 'org.hamcrest:hamcrest-core:2.2@jar'
testCompile 'org.jenkins-ci.main:jenkins-war:2.361.4'
testCompile 'org.jenkins-ci.main:jenkins-test-harness:1954.v2e3fd5465b_a_6'
testCompile 'org.jenkins-ci.plugins:structs:324.va_f5d6774f3a_d@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-cps:3659.v582dc37621d8@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-job:1292.v27d8cc3e2602@jar'
testCompile 'org.jenkins-ci.plugins.workflow:workflow-step-api:639.v6eca_cd8c04a_a_@jar'
testCompile 'org.powermock:powermock-core:2.0.9'
testCompile 'org.spockframework:spock-core:1.3-groovy-2.5'
implementation 'org.codehaus.groovy:groovy-all:2.5.23'
implementation 'org.jenkins-ci.main:jenkins-core:2.426.3'
implementation 'org.jenkins-ci.plugins.workflow:workflow-api:1291.v51fd2a_625da_7@jar'
implementation 'org.jenkins-ci.plugins.workflow:workflow-support:839.v35e2736cfd5c@jar'
implementation 'org.jenkins-ci.plugins.pipeline-stage-view:pipeline-rest-api:2.34@jar'
implementation 'com.cloudbees:groovy-cps:3659.v582dc37621d8@jar'

testImplementation 'com.lesfurets:jenkins-pipeline-unit:1.22'
testImplementation('org.testcontainers:spock:1.15.3'){
exclude group: 'org.spockframework', module: 'spock-core'
}
testImplementation 'org.hamcrest:hamcrest-core:2.2@jar'
testImplementation 'org.jenkins-ci.main:jenkins-war:2.426.3'
testImplementation 'org.jenkins-ci.main:jenkins-test-harness:2112.ve584e0edc63b_'
testImplementation 'org.jenkins-ci.plugins:structs:337.v1b_04ea_4df7c8@jar'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-cps:3894.3896.vca_2c931e7935@jar'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-job:1385.vb_58b_86ea_fff1@jar'
testImplementation 'org.jenkins-ci.plugins.workflow:workflow-step-api:657.v03b_e8115821b_@jar'
testImplementation 'org.powermock:powermock-core:2.0.9'
testImplementation 'org.spockframework:spock-core:1.3-groovy-2.5'
}

configurations.configureEach {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
if (details.requested.group == 'com.google.guava' && details.requested.name == 'guava') {
/* org.jenkins-ci.main:jenkins-core:2.426.3 use com.google.guava:guava:32.1.1-jre
* which has dependency issues https://github.com/google/guava/issues/6657
*/
details.useVersion '33.2.0-jre'
}
}
}

test {
Expand Down Expand Up @@ -99,6 +112,7 @@ task postGroovyDoc(type: Copy) {
from "${project.docsDir}/groovydoc"
into 'docs'
filter { line -> line.replaceAll('DefaultPackage', 'vars') }
dependsOn groovydoc
}

task deleteOldDocs(type: Delete) {
Expand All @@ -113,17 +127,17 @@ task documentation(type: GradleBuild) {
idea {
project {
vcs = 'Git'
jdkName = '11'
languageLevel = '11'
jdkName = '17'
languageLevel = '17'
}
module {
jdkName = '11'
languageLevel = new IdeaLanguageLevel('11')
jdkName = '17'
languageLevel = new IdeaLanguageLevel('17')
downloadJavadoc = true
downloadSources = true
}
}

wrapper {
gradleVersion = '6.8'
gradleVersion = '8.9'
}
6 changes: 1 addition & 5 deletions docs/vars/cmd.html
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,7 @@ <h3>Inherited Methods Summary</h3>

<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.Script</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.GroovyObjectSupport</code></td>
<td class="colLast"><code>groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#run(), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#wait(long), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
</table>
</ul>
Expand Down
6 changes: 1 addition & 5 deletions docs/vars/log.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,7 @@ <h3>Inherited Methods Summary</h3>

<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.Script</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.GroovyObjectSupport</code></td>
<td class="colLast"><code>groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#run(), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#wait(long), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
</table>
</ul>
Expand Down
6 changes: 1 addition & 5 deletions docs/vars/maven.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,11 +205,7 @@ <h3>Inherited Methods Summary</h3>

<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.Script</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.GroovyObjectSupport</code></td>
<td class="colLast"><code>groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#run(), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#wait(long), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
</table>
</ul>
Expand Down
6 changes: 1 addition & 5 deletions docs/vars/pipeline2ATX.html
Original file line number Diff line number Diff line change
Expand Up @@ -298,11 +298,7 @@ <h3>Inherited Methods Summary</h3>

<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.Script</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#run(), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>class groovy.lang.GroovyObjectSupport</code></td>
<td class="colLast"><code>groovy.lang.GroovyObjectSupport#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#getMetaClass(), groovy.lang.GroovyObjectSupport#setMetaClass(groovy.lang.MetaClass), groovy.lang.GroovyObjectSupport#getProperty(java.lang.String), groovy.lang.GroovyObjectSupport#setProperty(java.lang.String, java.lang.Object), groovy.lang.GroovyObjectSupport#wait(long), groovy.lang.GroovyObjectSupport#wait(long, int), groovy.lang.GroovyObjectSupport#wait(), groovy.lang.GroovyObjectSupport#equals(java.lang.Object), groovy.lang.GroovyObjectSupport#toString(), groovy.lang.GroovyObjectSupport#hashCode(), groovy.lang.GroovyObjectSupport#getClass(), groovy.lang.GroovyObjectSupport#notify(), groovy.lang.GroovyObjectSupport#notifyAll()</code></td>
<td class="colLast"><code>groovy.lang.Script#getBinding(), groovy.lang.Script#setBinding(groovy.lang.Binding), groovy.lang.Script#println(java.lang.Object), groovy.lang.Script#println(), groovy.lang.Script#run(), groovy.lang.Script#run(java.io.File, [Ljava.lang.String;), groovy.lang.Script#getProperty(java.lang.String), groovy.lang.Script#printf(java.lang.String, [Ljava.lang.Object;), groovy.lang.Script#printf(java.lang.String, java.lang.Object), groovy.lang.Script#setProperty(java.lang.String, java.lang.Object), groovy.lang.Script#print(java.lang.Object), groovy.lang.Script#evaluate(java.io.File), groovy.lang.Script#evaluate(java.lang.String), groovy.lang.Script#invokeMethod(java.lang.String, java.lang.Object), groovy.lang.Script#getMetaClass(), groovy.lang.Script#setMetaClass(groovy.lang.MetaClass), groovy.lang.Script#wait(long, int), groovy.lang.Script#wait(), groovy.lang.Script#wait(long), groovy.lang.Script#equals(java.lang.Object), groovy.lang.Script#toString(), groovy.lang.Script#hashCode(), groovy.lang.Script#getClass(), groovy.lang.Script#notify(), groovy.lang.Script#notifyAll()</code></td>
</tr>
</table>
</ul>
Expand Down
Loading

0 comments on commit 548ff30

Please sign in to comment.