diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 93b0f12..08d5471 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,7 +9,7 @@ include: variables: SECURE_LOG_LEVEL: "debug" SAST_JAVA_VERSION: 11 - + # This will suppress any download for dependencies and plugins or upload messages which would clutter the console log. # `showDateTime` will show the passed time in milliseconds. You need to specify `--batch-mode` to make this work. MAVEN_OPTS: " \ @@ -83,12 +83,15 @@ report: - "apt update" - "apt install -y openjfx" - "cd flashy" + # Replace link for jacoco to point within the staging folder - "sed -i 's/\\.\\.\\/\\.\\.\\/report\\/target\\/site\\/jacoco-aggregate\\/index.html/jacoco-aggregate\\/index.html/' src/site/site.xml" - - 'mvn clean test $MAVEN_CLI_OPTS site' + - 'mvn clean test $MAVEN_CLI_OPTS site site:stage' + # Move real jacoco-aggregate to site + - 'rm -r staging/jacoco-aggregate' + - 'mv flashy/report/target/site/jacoco-aggregate staging/' artifacts: paths: - - flashy/target/site - - flashy/report/target/site/jacoco-aggregate + - flashy/target/staging process-coverage: stage: report-data-extraction @@ -97,23 +100,21 @@ process-coverage: script: - 'cd flashy' # convert report from jacoco to cobertura - - 'python /opt/cover2cover.py report/target/site/jacoco-aggregate/jacoco.xml src/main/java > target/site/cobertura.xml' + - 'python /opt/cover2cover.py report/target/site/jacoco-aggregate/jacoco.xml src/main/java > target/staging/cobertura.xml' # read the tag and prepend the path to every filename attribute - - 'python /opt/source2filename.py target/site/cobertura.xml' + - 'python /opt/source2filename.py target/staging/cobertura.xml' - 'cat report/target/site/jacoco-aggregate/index.html' coverage: '/Total.*?([0-9]{1,3})%/' artifacts: reports: - cobertura: flashy/target/site/cobertura.xml + cobertura: flashy/target/staging/cobertura.xml pages: stage: deploy needs: [report] script: - 'mkdir public' - - 'mv flashy/target/site/* public/' - - 'rm -r public/jacoco-aggregate' - - 'mv flashy/report/target/site/jacoco-aggregate public/' + - 'mv flashy/target/staging/* public/' artifacts: paths: - public diff --git a/flashy/pom.xml b/flashy/pom.xml index c587038..e06f1ed 100644 --- a/flashy/pom.xml +++ b/flashy/pom.xml @@ -37,6 +37,12 @@ repo + + + ${project.artifactId}-site + ${project.baseUri} + + diff --git a/flashy/src/site/site.xml b/flashy/src/site/site.xml index a8b42c1..dc4b8d7 100644 --- a/flashy/src/site/site.xml +++ b/flashy/src/site/site.xml @@ -6,8 +6,8 @@ ${project.name} - ${gitlab.url}/-/raw/master/graphics/logo_with_word_96.png - ${gitlab.url} + https://gitlab.stud.idi.ntnu.no/it1901/groups-2021/gr2141/gr2141/-/raw/master/graphics/logo_with_word_96.png + https://gitlab.stud.idi.ntnu.no/it1901/groups-2021/gr2141/gr2141