bi-ido-flight-log-public/.gitlab-ci.yml

63 lines
1.4 KiB
YAML
Raw Normal View History

2022-10-02 21:23:03 +00:00
stages:
2023-10-31 16:03:51 +00:00
- package
2022-10-02 21:23:03 +00:00
- compile
- test
- build
variables:
MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository"
cache:
paths:
- .m2/repository/
- "**/target/"
2023-10-31 16:03:51 +00:00
container:
stage: package
image: $CI_REGISTRY/ict/images/alpine/ci:latest
variables:
BUILDAH_ISOLATION: chroot
2023-10-31 16:06:16 +00:00
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
2023-10-31 16:03:51 +00:00
before_script:
- apk add buildah fuse-overlayfs
- buildah login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
- buildah info
script:
- buildah build --tag $IMAGE_TAG -f Dockerfile
- buildah push $IMAGE_TAG
2022-10-02 21:23:03 +00:00
compile:
stage: compile
2023-10-10 15:44:20 +00:00
image: maven:3.8.6-openjdk-18
2022-10-02 21:23:03 +00:00
script:
2023-10-10 15:44:20 +00:00
- ./mvnw clean compile
2022-10-02 21:23:03 +00:00
test:
stage: test
2023-10-10 15:44:20 +00:00
image: markhobson/maven-chrome:jdk-18
2022-10-02 21:23:03 +00:00
script:
2023-10-10 15:44:20 +00:00
- ./mvnw test
artifacts:
name: "Surefire test reports from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
expire_in: 1 day
reports:
junit:
- "**/target/surefire-reports/TEST-*.xml"
2022-10-02 21:23:03 +00:00
2023-10-17 14:53:29 +00:00
check:
stage: build
image: markhobson/maven-chrome:jdk-18
script:
- ./mvnw clean compile dependency-check:aggregate
2023-10-17 14:53:29 +00:00
- ./mvnw sonar:sonar -Dsonar.projectKey=$SONAR_PROJECT -Dsonar.projectName=$SONAR_PROJECT -Dsonar.host.url=$SONAR_URL -Dsonar.token=$SONAR_TOKEN
2022-10-02 21:23:03 +00:00
build:
stage: build
2023-10-10 15:44:20 +00:00
image: maven:3.8.6-openjdk-18
2022-10-02 21:23:03 +00:00
script:
2023-10-10 15:44:20 +00:00
- ./mvnw package -DskipTests
artifacts:
name: "Maven artifacts from $CI_PROJECT_NAME on $CI_COMMIT_REF_SLUG"
paths:
- "**/target/*.jar"