diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5bff3f996f9e62d7bef664cc3efab6a006cf3448..4cd1d02ef9e8d727f6dd90feeecd3aa37641fa05 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -21,10 +21,9 @@ variables: include: - project: 'dariah-de/gitlab-templates' ref: 'main' - file: '/templates/.java.gitlab-ci.yml' - - project: 'dariah-de/gitlab-templates' - ref: 'main' - file: '/templates/.deps.gitlab-ci.yml' + file: + - '/templates/.java.gitlab-ci.yml' + - '/templates/SBOM-Upload.gitlab-ci.yml' # Stages... stages: @@ -45,7 +44,7 @@ cache: ### # Update POM and CHANGELOG RELEASE files, TAG a new RELEASE version! -Seantic Versioning: +prepare-release: stage: prepare rules: # Only run if branch "main" AND commit title IS NOT "1.2.3" (main commit with tag) AND DOES NOT START WITH "Prepare next development iteration" (main commit with new version) @@ -55,7 +54,7 @@ Seantic Versioning: - .prepare-semantic-release # Get the project version from main POM file and store it to artifact. -Get POM version: +get-pom-version: stage: prepare only: - develop @@ -64,7 +63,7 @@ Get POM version: - .get-pom-version-to-env # Build, validate, and package all the feature branches -Validate Java: +validate-java: image: maven:3.8.3-jdk-8 stage: test except: @@ -81,33 +80,19 @@ Validate Java: # Build and deploy all JARs to GWDG Nexus (develop -> SNAPSHOT and tags -> RELEASE)! # NOTE mvn deploy triggers BOM creation! -Build and deploy JARs: +build-and-deploy-jars: image: maven:3.8.3-jdk-8 stage: build only: - develop - tags script: - - mvn $MAVEN_OPTS $MAVEN_CLI_OPTS $MAVEN_DEPLOY_OPTS -U clean validate deploy + - mvn $MAVEN_OPTS $MAVEN_CLI_OPTS $MAVEN_DEPLOY_OPTS -U clean validate deploy -Psbom + - cp target/bom.json . artifacts: paths: - - ./target/bom.json + - ./bom.json reports: # Declare the JUnit reports (recursive pattern for multi-module projects) junit: - "**/target/*-reports/TEST-*.xml" - -# Upload bom.json to deps.sub.uni-goettingen.de -Upload DARIAH-DE-COMMON BOM: - stage: deploy - only: - - develop - - tags - variables: - X_API_KEY: ${DEPS_UPLOAD_TOKEN} - AUTO_CREATE_PROJECT: "true" - PROJECT_NAME: "dariah-de-common" - PROJECT_VERSION: ${PVERSION} - BOM_LOCATION: "./target/bom.json" - extends: - - .upload-bom-to-deps diff --git a/cli-tools/src/main/java/info/textgrid/middleware/TriggerDHPrescaleJob.java b/cli-tools/src/main/java/info/textgrid/middleware/TriggerDHPrescaleJob.java index dc412e5238a7237f082748aa019bbc69b2cc1566..ba9726ae5a0b55f7dfa932c77bad50cd404bf3da 100644 --- a/cli-tools/src/main/java/info/textgrid/middleware/TriggerDHPrescaleJob.java +++ b/cli-tools/src/main/java/info/textgrid/middleware/TriggerDHPrescaleJob.java @@ -188,7 +188,7 @@ public class TriggerDHPrescaleJob extends DHCrudIndexClient implements Callable< con.setRequestMethod("GET"); int responseCode = con.getResponseCode(); - if (responseCode == HttpURLConnection.HTTP_OK) { // success + if (responseCode == HttpURLConnection.HTTP_OK) { System.out.println("[" + count + "/" + hits.totalHits + "] --> " + uri + " (" + format + ") / last modified: " + dateFormat.format(lastModified) + " - tgcrud recache: OK"); } else { diff --git a/pom.xml b/pom.xml index 62624b74d8b13d5519be8b5d05c5703a88453ad4..a8ffab596daf4d375d87c9a9b9a059062d9d47d8 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,7 @@ 11.7.0 - 4.0.5 + 4.0.6 1.24 1.4.18 @@ -171,22 +171,31 @@ all,-missing - - org.cyclonedx - cyclonedx-maven-plugin - ${cyclonedx-maven-plugin.version} - - - package - - makeAggregateBom - - - - - JSON - - + + + sbom + + + + org.cyclonedx + cyclonedx-maven-plugin + ${cyclonedx-maven-plugin.version} + + + package + + makeAggregateBom + + + + + JSON + + + + + +