feat(ci): add automated Lighthouse audit pipeline #2
9
Jenkinsfile
vendored
9
Jenkinsfile
vendored
@@ -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"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user