Created
November 27, 2021 23:35
-
-
Save kuang-da/1246132aea97771c61462d465da1ea7e to your computer and use it in GitHub Desktop.
[gitlab-ci]
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
default: | |
image: 'maven:3.8.1-openjdk-11' | |
variables: | |
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true" | |
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end" | |
DOCKER_IMAGE_TO_SCAN: hello-webapp:latest | |
# Cache the Maven repository so that each job does not have to download it. | |
cache: | |
key: mavenrepo | |
paths: | |
- ./.m2/repository/ | |
stages: | |
- build | |
# Run tests. | |
test: | |
stage: build | |
script: | |
- 'mvn $MAVEN_CLI_OPTS install' | |
tags: | |
- CHUZHI_JOB_RUNNER | |
# Checkstyle source code standard review. | |
#checkstyle: | |
# stage: build | |
# script: | |
# - 'mvn $MAVEN_CLI_OPTS -Pcicdprofile checkstyle:check' | |
# tags: | |
# - CHUZHI_JOB_RUNNER | |
# PMD code quality analysis. | |
#pmd: | |
# stage: build | |
# script: | |
# - 'mvn $MAVEN_CLI_OPTS -Pcicdprofile pmd:check' | |
# SpotBugs code quality analysis. | |
#spotbugs: | |
# stage: build | |
# script: | |
# - 'mvn $MAVEN_CLI_OPTS -Pcicdprofile spotbugs:check' | |
# Test code coverage analysis. | |
#code-coverage: | |
# stage: build | |
# script: | |
# - 'mvn $MAVEN_CLI_OPTS -P-Pcicdprofile install' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment