mirror of
https://github.com/itplr-kosit/validator.git
synced 2026-05-25 08:55:04 +00:00
Restructure build process
This commit is contained in:
parent
d019642ba5
commit
a1300e0f6f
5 changed files with 88 additions and 101 deletions
149
.gitlab-ci.yml
149
.gitlab-ci.yml
|
|
@ -13,13 +13,27 @@ cache:
|
||||||
paths:
|
paths:
|
||||||
- .m2/repository
|
- .m2/repository
|
||||||
|
|
||||||
|
.java:
|
||||||
java-11:
|
|
||||||
stage: build
|
stage: build
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11
|
needs:
|
||||||
|
- job: java-11
|
||||||
|
artifacts: false
|
||||||
script:
|
script:
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
||||||
retry: 2
|
artifacts:
|
||||||
|
name: artifacts
|
||||||
|
when: on_failure
|
||||||
|
paths:
|
||||||
|
- target/*.jar
|
||||||
|
reports:
|
||||||
|
junit:
|
||||||
|
- target/surefire-reports/*.xml
|
||||||
|
- target/failsafe-reports/*.xml
|
||||||
|
|
||||||
|
java-11:
|
||||||
|
extends: .java
|
||||||
|
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11
|
||||||
|
needs: [ ]
|
||||||
artifacts:
|
artifacts:
|
||||||
name: java-11
|
name: java-11
|
||||||
paths:
|
paths:
|
||||||
|
|
@ -30,122 +44,43 @@ java-11:
|
||||||
- target/surefire-reports/*.xml
|
- target/surefire-reports/*.xml
|
||||||
- target/failsafe-reports/*.xml
|
- target/failsafe-reports/*.xml
|
||||||
|
|
||||||
java-11-openj9:
|
|
||||||
stage: build
|
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11-openj9
|
|
||||||
script:
|
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
|
||||||
retry: 2
|
|
||||||
artifacts:
|
|
||||||
name: java-11-openj9
|
|
||||||
paths:
|
|
||||||
- target/*.jar
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
java8:
|
java8:
|
||||||
stage: build
|
extends: .java
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-jdk-8
|
image: $CI_REGISTRY_IMAGE/maven:3-jdk-8
|
||||||
script:
|
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
java-11-openj9:
|
||||||
retry: 2
|
extends: .java
|
||||||
artifacts:
|
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11-openj9
|
||||||
name: java-8
|
|
||||||
paths:
|
|
||||||
- target/*.jar
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
java-8-openj9:
|
java-8-openj9:
|
||||||
stage: build
|
extends: .java
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-jdk-8-openj9
|
image: $CI_REGISTRY_IMAGE/maven:3-jdk-8-openj9
|
||||||
script:
|
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
|
||||||
retry: 2
|
|
||||||
artifacts:
|
|
||||||
name: java-8-open-j9
|
|
||||||
paths:
|
|
||||||
- target/*.jar
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
java-15:
|
java-15:
|
||||||
stage: build
|
extends: .java
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-15
|
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-15
|
||||||
script:
|
# script:
|
||||||
- microdnf install libcgroup-tools
|
# - microdnf install libcgroup-tools
|
||||||
- cgget -n --values-only --variable memory.limit_in_bytes /
|
# - cgget -n --values-only --variable memory.limit_in_bytes /
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
# - mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
||||||
retry: 2
|
|
||||||
artifacts:
|
|
||||||
when: on_failure
|
|
||||||
name: java-15
|
|
||||||
paths:
|
|
||||||
- target/*
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
java-16:
|
java-16:
|
||||||
stage: build
|
extends: .java
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-16
|
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-16
|
||||||
script:
|
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
|
||||||
retry: 2
|
|
||||||
artifacts:
|
|
||||||
when: on_failure
|
|
||||||
name: java-16
|
|
||||||
paths:
|
|
||||||
- target/*
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
java-17:
|
java-17:
|
||||||
stage: build
|
extends: .java
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-17
|
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-17
|
||||||
script:
|
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
|
||||||
retry: 2
|
|
||||||
artifacts:
|
|
||||||
when: on_failure
|
|
||||||
name: java-17
|
|
||||||
paths:
|
|
||||||
- target/*
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
java-18:
|
java-18:
|
||||||
stage: build
|
extends: .java
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-18
|
image: $CI_REGISTRY_IMAGE/maven:3-openjdk-18
|
||||||
script:
|
|
||||||
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP verify
|
|
||||||
retry: 2
|
|
||||||
artifacts:
|
|
||||||
when: on_failure
|
|
||||||
name: java-18
|
|
||||||
paths:
|
|
||||||
- target/*
|
|
||||||
reports:
|
|
||||||
junit:
|
|
||||||
- target/surefire-reports/*.xml
|
|
||||||
- target/failsafe-reports/*.xml
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11
|
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11
|
||||||
dependencies:
|
needs:
|
||||||
- java-11
|
- job: java-11
|
||||||
script:
|
script:
|
||||||
- export PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
|
- export PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
|
||||||
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}.zip -DgroupId=kosit -DartifactId=validator -Dclassifier="distribution" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
|
- mvn $MAVEN_CLI_OPTS deploy:deploy-file -Dfile=target/validationtool-${PROJECT_VERSION}.zip -DgroupId=kosit -DartifactId=validator -Dclassifier="distribution" -Dversion=${PROJECT_VERSION} -Dpackaging=zip -DrepositoryId="gitlab-maven" -Durl=https://projekte.kosit.org/api/v4/projects/7/packages/maven
|
||||||
|
|
@ -165,6 +100,20 @@ create-build-image:
|
||||||
script:
|
script:
|
||||||
- apk add bash
|
- apk add bash
|
||||||
- bash .mvn/createBuildImages.sh
|
- bash .mvn/createBuildImages.sh
|
||||||
when: manual
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||||
|
- changes:
|
||||||
|
- .mvn/createBuildImages.sh
|
||||||
|
|
||||||
|
owasp-check:
|
||||||
|
extends: .java
|
||||||
|
image: $CI_REGISTRY_IMAGE/maven:3-jdk-11
|
||||||
|
needs: [ ]
|
||||||
|
script:
|
||||||
|
- mvn $MAVEN_CLI_OPTS $BUILD_PROPS $CI_JOB_TIMESTAMP validate -Powasp-check
|
||||||
|
rules:
|
||||||
|
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||||
|
- changes:
|
||||||
|
- pom.xml
|
||||||
|
- owasp-suppressions.xml
|
||||||
|
|
||||||
|
|
|
||||||
3
.idea/compiler.xml
generated
3
.idea/compiler.xml
generated
|
|
@ -11,5 +11,8 @@
|
||||||
<module name="validationtool" />
|
<module name="validationtool" />
|
||||||
</profile>
|
</profile>
|
||||||
</annotationProcessing>
|
</annotationProcessing>
|
||||||
|
<bytecodeTargetLevel>
|
||||||
|
<module name="validator" target="1.8" />
|
||||||
|
</bytecodeTargetLevel>
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
|
||||||
TAGS=("3-openjdk-16" "3-jdk-11" "3-jdk-11-openj9" "3-jdk-8" "3-jdk-8-openj9" "3-openjdk-15" "3-openjdk-17", "3-openjdk-18")
|
TAGS=("3-openjdk-16" "3-jdk-11" "3-jdk-11-openj9" "3-jdk-8" "3-jdk-8-openj9" "3-openjdk-15" "3-openjdk-17", "3-openjdk-18", "3-eclipse-temurin-19")
|
||||||
|
|
||||||
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" "$CI_REGISTRY"
|
||||||
for i in "${TAGS[@]}"
|
for i in "${TAGS[@]}"
|
||||||
|
|
|
||||||
5
owasp-suppressions.xml
Normal file
5
owasp-suppressions.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<suppressions xmlns="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.3.xsd">
|
||||||
|
|
||||||
|
|
||||||
|
</suppressions>
|
||||||
30
pom.xml
30
pom.xml
|
|
@ -61,6 +61,7 @@
|
||||||
<version.jaxb>2.3.7</version.jaxb>
|
<version.jaxb>2.3.7</version.jaxb>
|
||||||
<version.lombok>1.18.24</version.lombok>
|
<version.lombok>1.18.24</version.lombok>
|
||||||
<version.mockito>4.8.1</version.mockito>
|
<version.mockito>4.8.1</version.mockito>
|
||||||
|
<version.owasp-dependency-check>7.2.0</version.owasp-dependency-check>
|
||||||
<version.rest-assured>5.2.0</version.rest-assured>
|
<version.rest-assured>5.2.0</version.rest-assured>
|
||||||
<version.saxon-he>11.4</version.saxon-he>
|
<version.saxon-he>11.4</version.saxon-he>
|
||||||
<version.slf4j>1.7.25</version.slf4j>
|
<version.slf4j>1.7.25</version.slf4j>
|
||||||
|
|
@ -591,6 +592,35 @@
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</profile>
|
</profile>
|
||||||
|
<profile>
|
||||||
|
<id>owasp-check</id>
|
||||||
|
<build>
|
||||||
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.owasp</groupId>
|
||||||
|
<artifactId>dependency-check-maven</artifactId>
|
||||||
|
<version>${version.owasp-dependency-check}</version>
|
||||||
|
<configuration>
|
||||||
|
<failBuildOnCVSS>0</failBuildOnCVSS>
|
||||||
|
<suppressionFiles>
|
||||||
|
<suppressionFile>${project.basedir}/owasp-suppressions.xml</suppressionFile>
|
||||||
|
</suppressionFiles>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<phase>
|
||||||
|
validate
|
||||||
|
</phase>
|
||||||
|
<goals>
|
||||||
|
<goal>check</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
|
</plugins>
|
||||||
|
</build>
|
||||||
|
</profile>
|
||||||
<profile>
|
<profile>
|
||||||
<id>format</id>
|
<id>format</id>
|
||||||
<activation><activeByDefault>false</activeByDefault></activation>
|
<activation><activeByDefault>false</activeByDefault></activation>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue