Séparation de pa11y et lighthouse
This commit is contained in:
@ -104,7 +104,6 @@ def buildDockerImage() {
|
||||
def resourceFiles = [
|
||||
'com/cadoles/lighthouse/Dockerfile',
|
||||
'com/cadoles/lighthouse/config.js.tmpl',
|
||||
'com/cadoles/lighthouse/patty.json.tmpl',
|
||||
'com/cadoles/lighthouse/run-audit.sh'
|
||||
];
|
||||
|
||||
|
23
vars/pa11y.groovy
Normal file
23
vars/pa11y.groovy
Normal file
@ -0,0 +1,23 @@
|
||||
def audit(url: String) {
|
||||
|
||||
}
|
||||
|
||||
def buildDockerImage() {
|
||||
dir ('.pa11y') {
|
||||
def resourceFiles = [
|
||||
'com/cadoles/pa11y/Dockerfile',
|
||||
'com/cadoles/pa11y/patty.json.tmpl',
|
||||
'com/cadoles/pa11y/run-audit.sh'
|
||||
];
|
||||
|
||||
for (res in resourceFiles) {
|
||||
def fileContent = libraryResource res
|
||||
def fileName = res.substring(res.lastIndexOf("/")+1)
|
||||
writeFile file:fileName, text:fileContent
|
||||
}
|
||||
|
||||
def safeJobName = URLDecoder.decode(env.JOB_NAME).toLowerCase().replace('/', '-').replace(' ', '-')
|
||||
def imageTag = "${safeJobName}-${env.BUILD_ID}"
|
||||
return docker.build("pa11y:${imageTag}", ".")
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user