This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit c78c56f3 authored by Michael Breu's avatar Michael Breu :speech_balloon:
Browse files

Merge branch 'do_not_hide_pipline_failure' into 'development'

Improve pipeline

See merge request sharing/codeability-sharing-platform!95
parents f8857474 0fc12af1
Branches
2 merge requests!105Preparing März Release,!95Improve pipeline
......@@ -5,21 +5,61 @@ cache:
paths:
- .maven/
stages:
- check
- lint
- build
- test
- analyze
- package
- release
- deploy
before_script:
- export NG_CLI_ANALYTICS="false"
- export MAVEN_USER_HOME=`pwd`/.maven
nohttp:
stage: check
pmd:
stage: lint
cache: {}
allow_failure: true
when: always
before_script:
- 'export VERSION="6.40.0"'
- 'wget "https://github.com/pmd/pmd/releases/download/pmd_releases%2F$VERSION/pmd-bin-$VERSION.zip"'
- 'jar -xf "pmd-bin-$VERSION.zip"'
- 'chmod u+x "pmd-bin-$VERSION/bin/run.sh"'
script:
- '"pmd-bin-$VERSION/bin/run.sh" pmd -d src/main/java -f textcolor -R pmd_rules.xml 2>&1 | tee pmd.log'
needs: []
artifacts:
when: on_failure
paths:
- pmd.log
checkstyle:
stage: lint
script:
- ./mvnw -ntp checkstyle:check -Dmaven.repo.local=$MAVEN_USER_HOME
needs: []
prettier:
stage: lint
cache: {}
script:
- npm install
- npm run prettier:check
allow_failure: true
needs: []
eslint:
stage: lint
cache: {}
script:
- npm install
# eslint exits 0 on warnings, this is a workaround to exit 1 when warnings are present.
- 'npm run lint | tee lint.log'
- "! grep -qE '✖ [0-9]+ problem' lint.log"
allow_failure: true
needs: []
maven-compile:
stage: build
......@@ -30,18 +70,16 @@ maven-compile:
- target/classes/
- target/generated-sources/
expire_in: 1 day
needs: []
maven-test:
# DinD service is required for Testcontainers
services:
- docker:20-dind
variables:
# Instruct Testcontainers to use the daemon of DinD.
DOCKER_HOST: 'tcp://docker:2375'
DOCKER_TLS_CERTDIR: ''
# before_script:
# - docker info
stage: test
script:
- ./mvnw -ntp test -P-webapp -Dmaven.repo.local=$MAVEN_USER_HOME -Dspring.profiles.active=testcontainers || FAILED=true
......@@ -55,23 +93,27 @@ maven-test:
- target/surefire-reports
- target/failsafe-reports
- target/site
when: always
expire_in: 30 day
allow_failure: true
needs: []
frontend-test:
stage: test
cache: {}
script:
- npm install
- npm test || FAILED=true
- ls -Rl target/test-results
- npm test
artifacts:
reports:
junit: target/test-results/TESTS-results-jest.xml
paths:
- target/test-results
- target/jacoco
when: always
expire_in: 1 day
allow_failure: true
needs: []
sonar-analyze:
stage: analyze
......
<?xml version="1.0"?>
<ruleset name="Custom Rules"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>
Rules for the PMD linter
</description>
<rule ref="category/java/bestpractices.xml">
<exclude name="GuardLogStatement"/>
<exclude name="UseVarargs"/>
</rule>
<rule ref="category/java/codestyle.xml">
<exclude name="AtLeastOneConstructor"/>
<exclude name="OnlyOneReturn"/>
<exclude name="ShortClassName"/>
<exclude name="UselessParentheses"/>
<!-- does not work properly with annotation imports -->
<exclude name="UnnecessaryImport"/>
<!-- should be included, removed to find other lints -->
<exclude name="MethodArgumentCouldBeFinal"/>
<exclude name="LocalVariableCouldBeFinal"/>
<exclude name="FieldNamingConventions"/>
<exclude name="ShortVariable"/>
<exclude name="LongVariable"/>
<exclude name="UseUnderscoresInNumericLiterals"/>
<exclude name="CommentDefaultAccessModifier"/>
<exclude name="BooleanGetMethodName"/>
</rule>
<rule ref="category/java/design.xml">
<exclude name="LawOfDemeter"/>
<exclude name="DataClass"/>
<exclude name="ExcessiveImports"/>
<!-- seems to be broken in its default config -->
<exclude name="LoosePackageCoupling"/>
</rule>
<rule ref="category/java/documentation.xml">
<exclude name="CommentSize"/>
<exclude name="CommentRequired"/>
<exclude name="UncommentedEmptyConstructor"/>
</rule>
<rule ref="category/java/errorprone.xml">
<exclude name="BeanMembersShouldSerialize"/>
<exclude name="AvoidLiteralsInIfCondition"/>
</rule>
<rule ref="category/java/multithreading.xml"></rule>
<rule ref="category/java/performance.xml">
<exclude name="RedundantFieldInitializer"/>
<exclude name="TooFewBranchesForASwitchStatement"/>
<exclude name="AvoidInstantiatingObjectsInLoops"/>
<exclude name="AvoidFileStream"/>
</rule>
<rule ref="category/java/security.xml"></rule>
</ruleset>
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment