From 883362f496f634705dd347554699fd9f9200b5f4 Mon Sep 17 00:00:00 2001 From: Lucas Date: Mon, 12 Jan 2026 16:56:40 +0100 Subject: [PATCH] fix(jenkins): fix lighthouse audit launch in jenkinsfile --- Jenkinsfile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index fecf9c6..0fcbb6b 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,9 +21,9 @@ pipeline { // Create volumes but no run with safety sh "docker rm -f audit-tmp lighthouse-audit || true" - sh "docker compose --profile audit create lighthouse-audit" + sh "docker compose --profile audit create --no-build --remove-orphans lighthouse-audit" - // Extract astro data from image to tmp-dist + // Extract astro data from temp container to tmp-dist folder 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" @@ -32,9 +32,10 @@ pipeline { // Inject data from tmp-dist and config to audit container sh "docker cp ./tmp-dist/. lighthouse-audit:/app/dist/" sh "docker cp .lighthouserc.cjs lighthouse-audit:/app/dist/audit-config.cjs" + sh "rm -rf ./tmp-dist" // Now run - sh "docker compose --profile audit run lighthouse-audit" + sh "docker start -a lighthouse-audit" // Get reports sh "mkdir -p ./.lighthouseci" @@ -42,7 +43,6 @@ pipeline { // Clean sh "docker rm -f lighthouse-audit" - sh "rm -rf ./tmp-dist" } } stage('Deploy') {