fix(lighthouse): change audit export path and config

This commit is contained in:
2026-01-12 12:25:35 +01:00
parent fa8e84514a
commit 952c75127a
2 changed files with 9 additions and 5 deletions

11
Jenkinsfile vendored
View File

@@ -18,13 +18,16 @@ pipeline {
}
stage('Lighthouse Audit') {
steps {
// Create volumes but no run
// Create volumes but no run with safety
sh "docker rm -f audit-tmp lighthouse-audit || true"
sh "docker compose --profile audit create lighthouse-audit"
// Extract astro data from image to tmp-dist
sh "docker create --name audit-tmp portfolio:${env.APP_VERSION}"
sh "mkdir -p ./tmp-dist"
sh "docker cp audit-tmp:/usr/share/caddy/. ./tmp-dist"
sh "docker rm -f audit-tmp"
// Inject data from tmp-dist and config to audit container
sh "docker cp ./tmp-dist/. lighthouse-audit:/app/dist/"
@@ -37,8 +40,8 @@ pipeline {
sh "mkdir -p ./.lighthouseci"
sh "docker cp lighthouse-audit:/app/.lighthouseci/. ./.lighthouseci/"
// Clean temp
sh "docker rm lighthouse-audit"
// Clean
sh "docker rm -f lighthouse-audit"
sh "rm -rf ./tmp-dist"
}
}
@@ -68,7 +71,7 @@ pipeline {
alwaysLinkToLastBuild: true,
keepAll: false,
reportDir: '.lighthouseci',
reportFiles: 'index.html',
reportFiles: '*.html',
reportName: 'Lighthouse Report'
])
echo "Clean unused image"