Skip to content

Commit

Permalink
dropme
Browse files Browse the repository at this point in the history
  • Loading branch information
nre-ableton committed Nov 1, 2023
1 parent 120598c commit 1c4aec7
Showing 1 changed file with 2 additions and 69 deletions.
71 changes: 2 additions & 69 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,75 +31,8 @@ devToolsProject.run(
String gitHash = sh(returnStdout: true, script: 'git rev-parse --short HEAD').trim()
data['image'] = docker.build("abletonag/groovylint:${gitHash}")
},
test: { data ->
data.venv.inside {
parallel(
black: { sh 'black --check .' },
groovydoc: { data['docs'] = groovydoc.generate() },
'groovylint docker': {
// Use the Docker image created in the Build stage above. This ensures that the
// we are checking our own Groovy code with the same library and image which
// would be published to production.
groovylint.check(
includesPattern: './Jenkinsfile,**/*.groovy',
groovylintImage: data['image'],
)
},
'groovylint native': {
// Run groovylint using the system Python. This is not a recommended use-case
// for Jenkins CI installations, but is often more useful for developers running
// groovylint locally.
sh "python3 run_codenarc.py --resources ${env.WORKSPACE}/resources" +
" --groovy-home ${pwd()}/groovy-${data.groovy3Version}" +
' -- -includes="./Jenkinsfile,**/*.groovy,**/*.gradle"'
sh "python3 run_codenarc.py --resources ${env.WORKSPACE}/resources" +
" --groovy-home ${pwd()}/groovy-${data.groovy4Version} --groovy4" +
' -- -includes="./Jenkinsfile,**/*.groovy,**/*.gradle"'
},
hadolint: {
docker.image('hadolint/hadolint:v2.9.3-debian').inside {
sh 'hadolint Dockerfile'
}
},
pytest: {
withEnv([
'GROOVY_HOME=test',
'CODENARC_VERSION=test',
'GMETRICS_VERSION=test',
'SLF4J_VERSION=test',
]) {
try {
sh 'python -m pytest --junit-xml=results.xml'
} finally {
junit 'results.xml'
}
}
},
ruff: { sh 'ruff check --verbose .' },
'SLF4J version check': {
Set slf4jVersions = []
readMavenPom(file: 'pom.xml').dependencies.findAll { dependency ->
return dependency.artifactId.startsWith('slf4j')
}.each { dependency ->
slf4jVersions.add(dependency.version)
}

switch (slf4jVersions.size()) {
case 0:
error 'Could not find SLF4J libraries in pom.xml file'
break
case 1:
echo 'All SLF4J versions match'
break
default:
error 'pom.xml file contains mismatched SLF4J library versions'
break
}
},
)
}
},
publish: { data -> jupiter.publishDocs("${data['docs']}/", 'Ableton/groovylint') },
forceDeploy: true,
deploy: { data ->
String lastTag = sh(
returnStdout: true, script: 'git describe --tags --abbrev=0'
Expand Down Expand Up @@ -144,7 +77,7 @@ devToolsProject.run(
)
}
}
version.forwardMinorBranch(versionNumber)
// version.forwardMinorBranch(versionNumber)
},
)
},
Expand Down

0 comments on commit 1c4aec7

Please sign in to comment.