makes HTML reports from failed gradle tasks directly accessible via gw alias + grep
This commit is contained in:
parent
af90fefd49
commit
4ec26108fa
17
.aliases
17
.aliases
@ -1,4 +1,19 @@
|
|||||||
alias gw='./gradlew'
|
gradleWrapper () {
|
||||||
|
if [ ! -f gradlew ]; then
|
||||||
|
echo "No 'gradlew' found. Maybe you are not in the root dir of a gradle project?"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
TEMPFILE=$(mktemp /tmp/gw.XXXXXX)
|
||||||
|
./gradlew "$@" | tee $TEMPFILE
|
||||||
|
|
||||||
|
echo
|
||||||
|
grep "Report:" $TEMPFILE
|
||||||
|
rm $TEMPFILE
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
alias gw=gradleWrapper
|
||||||
alias pg-sql-run='docker run --name hsadmin-ng-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:13.7-bullseye'
|
alias pg-sql-run='docker run --name hsadmin-ng-postgres -e POSTGRES_PASSWORD=password -p 5432:5432 -d postgres:13.7-bullseye'
|
||||||
alias pg-sql-stop='docker stop hsadmin-ng-postgres'
|
alias pg-sql-stop='docker stop hsadmin-ng-postgres'
|
||||||
alias pg-sql-start='docker container start hsadmin-ng-postgres'
|
alias pg-sql-start='docker container start hsadmin-ng-postgres'
|
||||||
|
@ -168,7 +168,7 @@ dependencyCheck {
|
|||||||
failBuildOnCVSS = 7
|
failBuildOnCVSS = 7
|
||||||
}
|
}
|
||||||
project.tasks.check.dependsOn(dependencyCheckAnalyze)
|
project.tasks.check.dependsOn(dependencyCheckAnalyze)
|
||||||
project.tasks.dependencyCheckAnalyze.doFirst { // doLast is not executed on exception, thus when we need it
|
project.tasks.dependencyCheckAnalyze.doFirst { // Why not doLast? See README.md!
|
||||||
println "OWASP Dependency Security Report: file:///${project.rootDir}/build/reports/dependency-check-report.html"
|
println "OWASP Dependency Security Report: file:///${project.rootDir}/build/reports/dependency-check-report.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -196,12 +196,11 @@ jacocoTestReport {
|
|||||||
classDirectories.setFrom(files(classDirectories.files.collect {
|
classDirectories.setFrom(files(classDirectories.files.collect {
|
||||||
fileTree(dir: it, exclude: [
|
fileTree(dir: it, exclude: [
|
||||||
"net/hostsharing/hsadminng/**/generated/**/*.class",
|
"net/hostsharing/hsadminng/**/generated/**/*.class",
|
||||||
"net/hostsharing/hsadminng/PingController.class",
|
|
||||||
"net/hostsharing/hsadminng/hs/hscustomer/HsadminNgApplication.class"
|
"net/hostsharing/hsadminng/hs/hscustomer/HsadminNgApplication.class"
|
||||||
])
|
])
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
doLast {
|
doFirst { // Why not doLast? See README.md!
|
||||||
println "HTML Jacoco Test Code Coverage Report: file://${reports.html.outputLocation.get()}/index.html"
|
println "HTML Jacoco Test Code Coverage Report: file://${reports.html.outputLocation.get()}/index.html"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +275,7 @@ pitest {
|
|||||||
timestampedReports = false
|
timestampedReports = false
|
||||||
}
|
}
|
||||||
project.tasks.check.dependsOn(project.tasks.pitest)
|
project.tasks.check.dependsOn(project.tasks.pitest)
|
||||||
project.tasks.pitest.doLast {
|
project.tasks.pitest.doFirst { // Why not doLast? See README.md!
|
||||||
println "PiTest Mutation Report: file:///${project.rootDir}/build/reports/pitest/index.html"
|
println "PiTest Mutation Report: file:///${project.rootDir}/build/reports/pitest/index.html"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user