Last active
August 11, 2022 19:40
-
-
Save jaydubb12/d58175e7cdec30f5dd5c9e9d66beead7 to your computer and use it in GitHub Desktop.
PIpeline that will build a maven project and run static analysis for all pull requests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Build and perform static analysis | |
# Env tools - Maven 3.8.5 && Java 18 | |
image: maven:3.8.5-openjdk-18-slim | |
pipelines: | |
pull-requests: # trigger event is a new || updated PR | |
'**': #this runs as default for any branch not elsewhere defined | |
- step: | |
name: Build front end & perform static analysis | |
caches: | |
- maven | |
script: | |
# runs build for frontend-ui module and backend services | |
- echo "Checking Maven / Java versions" | |
- mvn -v | |
- mvn install -Pstatic-analysis | |
after-script: | |
# Collect checkstyle results, if any, and convert to Bitbucket Code Insights. | |
- pipe: atlassian/checkstyle-report:0.3.1 | |
variables: | |
CHECKSTYLE_RESULT_PATTERN: '.*/target/checkstyle-result.xml$' | |
REPORT_FAIL_SEVERITY: 'warn' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment