Make site stageable

This commit is contained in:
2021-09-20 16:36:28 +02:00
parent cb24db143d
commit 909b1e5f0e
3 changed files with 19 additions and 12 deletions
+11 -10
View File
@@ -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 <source></source> 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
+6
View File
@@ -37,6 +37,12 @@
<distribution>repo</distribution>
</license>
</licenses>
<distributionManagement>
<site>
<id>${project.artifactId}-site</id>
<url>${project.baseUri}</url>
</site>
</distributionManagement>
<!-- ##################################################################### -->
<!-- Dependencies -->
+2 -2
View File
@@ -6,8 +6,8 @@
<bannerLeft>
<name>${project.name}</name>
<src>${gitlab.url}/-/raw/master/graphics/logo_with_word_96.png</src>
<href>${gitlab.url}</href>
<src>https://gitlab.stud.idi.ntnu.no/it1901/groups-2021/gr2141/gr2141/-/raw/master/graphics/logo_with_word_96.png</src>
<href>https://gitlab.stud.idi.ntnu.no/it1901/groups-2021/gr2141/gr2141</href>
</bannerLeft>
<skin>