Séparation de pa11y et lighthouse

This commit is contained in:
2020-08-10 15:03:40 +02:00
parent b2f0a6c182
commit 7f2ef25102
9 changed files with 134 additions and 14 deletions

View File

@ -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
View 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}", ".")
}
}