-
Notifications
You must be signed in to change notification settings - Fork 6
/
Jenkinsfile
37 lines (32 loc) · 945 Bytes
/
Jenkinsfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#!groovy
@Library("ace@master") _
ace([dockerSet: false]) {
stage('Lint') {
def groovylintImage = 'abletonag/groovylint'
def groovylintVersion = 'latest'
def groovylintOpts = "--entrypoint=''"
docker.image("${groovylintImage}:${groovylintVersion}").inside(groovylintOpts) {
sh '''
python3 /opt/run_codenarc.py -- \
-report=console \
-includes="**/*.groovy"
'''
}
publishHTML(target: [
allowMissing: false,
alwaysLinkToLastBuild: true,
keepAll: true,
reportDir: '',
reportFiles: 'codenarc-output.html,groovylint-errors.html',
reportName: 'Groovy Lint Results',
reportTitles: ''
])
}
stage('Test') {
def groovyContainer = 'groovy:alpine'
def groovyOpts = ["--entrypoint=''"]
aceContainerWrapper(groovyContainer, groovyOpts, [:]) {
sh 'groovy -classpath src/:vars/:test/ test/AllTestsRunner.groovy'
}
}
}