Skip to content

Commit

Permalink
Merged in task/dspace-cris-2023_02_x/DSC-2205 (pull request DSpace#3507)
Browse files Browse the repository at this point in the history
[DSC-2205] Pipeline improvements and pom cleanup

Approved-by: Giuseppe Digilio
  • Loading branch information
vins01-4science authored and atarix83 committed Feb 26, 2025
2 parents 15b2c48 + a9e5087 commit 6319cf3
Show file tree
Hide file tree
Showing 14 changed files with 159 additions and 113 deletions.
127 changes: 58 additions & 69 deletions bitbucket-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,140 +9,129 @@ definitions:
&setEnv export MAVEN_OPTS="-Xmx4096M" &&
export MAVEN_ARGS="-Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS"
steps:
- step: &install
runs-on: self.hosted
name: Install
size: 1x
clone:
depth: 2
caches:
- gradle
- gradlewrapper
- maven
script:
- *setEnv
- mvn install -T 1C -B -P-assembly,pipeline $MAVEN_ARGS
artifacts:
- target/local-repo/**
- dspace-server-webapp/target/**
- dspace-api/target/**
- dspace-services/target/**
- dspace-oai/target/**

- step: &unit-test-code-checks
runs-on: self.hosted
name: unit-test-code-checks
size: 4x
size: 2x
caches:
- gradle
- gradlewrapper
- maven
script:
- *setEnv
- mvn -T 1C install -B -P-assembly -Dtest.argLine=-Xmx4096M -Pcoverage-report -DskipUnitTests=false -Pdspace-rest $MAVEN_ARGS
- cp -rf target/local-repo/** ~/.m2/repository/
- mvn -T 1C test -B -pl dspace-api,dspace-server-webapp,dspace-services,dspace-oai -P-assembly -nsu -Dmaven.main.skip -DuseIncrementalCompilation=false -Dtest.argLine=-Xmx4096M -DskipUnitTests=false $MAVEN_ARGS
artifacts:
- dspace-api/target/surefire-reports/*-output.txt
- dspace-iiif/target/surefire-reports/*-output.txt
- dspace-oai/target/surefire-reports/*-output.txt
- dspace-rdf/target/surefire-reports/*-output.txt
- dspace-rest/target/surefire-reports/*-output.txt
- dspace-server-webapp/target/surefire-reports/*-output.txt
- dspace-services/target/surefire-reports/*-output.txt
- dspace-sword/target/surefire-reports/*-output.txt
- dspace-swordv2/target/surefire-reports/*-output.txt
- dspace-oai/target/surefire-reports/*-output.txt
- dspace-api/target/failsafe-reports/*-output.txt
- dspace-iiif/target/failsafe-reports/*-output.txt
- dspace-oai/target/failsafe-reports/*-output.txt
- dspace-rdf/target/failsafe-reports/*-output.txt
- dspace-rest/target/failsafe-reports/*-output.txt
- dspace-server-webapp/target/failsafe-reports/*-output.txt
- dspace-services/target/failsafe-reports/*-output.txt
- dspace-sword/target/failsafe-reports/*-output.txt
- dspace-swordv2/target/failsafe-reports/*-output.txt
- dspace-oai/target/failsafe-reports/*-output.txt

- step: &integration-tests
- step: &integration-tests-dspace-api
runs-on: self.hosted
name: integration-tests
size: 4x
name: integration-tests-dspace-api
size: 1x
caches:
- gradle
- gradlewrapper
- maven
script:
- *setEnv
#- ./dspace-api/src/test/data/dspaceFolder/bin/install_grobid.sh
- mvn -T 1C clean install -Dmaven.test.skip=true -DskipUnitTests=true -Pdspace-rest -DskipITs=true -DskipIntegrationTests=true -P !assembly -B $MAVEN_ARGS
- mvn test -pl dspace-iiif,dspace-oai,dspace-rdf,dspace-rest,dspace-server-webapp,dspace-services,dspace-sword,dspace-swordv2 -Dmaven.test.skip=false -DskipUnitTests=false -Pdspace-rest -DskipITs=false -Pdspace-rest -DskipIntegrationTests=false -B -Dsurefire.rerunFailingTestsCount=2 -Dtest.argLine=-Xmx4096M -DfailIfNoTests=false -Dtest=*IT,!Abstract*,!ItemImportIT,!GenericAuthorizationFeatureIT,!ItemRestRepositoryIT,!LeftTiltedRelationshipRestRepositoryIT,!RelationshipRestRepositoryIT,!StatisticsRestRepositoryIT,!WorkspaceItemRestRepositoryIT,!DiscoveryRestControllerIT,!PatchMetadataIT,!RightTiltedRelationshipRestRepositoryIT $MAVEN_ARGS
- cp -rf target/local-repo/** ~/.m2/repository/
- mvn verify -pl dspace-api -nsu -Dmaven.main.skip -DuseIncrementalCompilation=true -DskipUnitTests=true -DskipIntegrationTests=false -B -Dsurefire.rerunFailingTestsCount=2 -Dtest.argLine=-Xmx4096M $MAVEN_ARGS
artifacts:
- dspace-iiif/target/surefire-reports/*-output.txt
- dspace-oai/target/surefire-reports/*-output.txt
- dspace-rdf/target/surefire-reports/*-output.txt
- dspace-rest/target/surefire-reports/*-output.txt
- dspace-server-webapp/target/surefire-reports/*-output.txt
- dspace-services/target/surefire-reports/*-output.txt
- dspace-sword/target/surefire-reports/*-output.txt
- dspace-swordv2/target/surefire-reports/*-output.txt
- dspace-iiif/target/failsafe-reports/*-output.txt
- dspace-oai/target/failsafe-reports/*-output.txt
- dspace-rdf/target/failsafe-reports/*-output.txt
- dspace-rest/target/failsafe-reports/*-output.txt
- dspace-server-webapp/target/failsafe-reports/*-output.txt
- dspace-services/target/failsafe-reports/*-output.txt
- dspace-sword/target/failsafe-reports/*-output.txt
- dspace-swordv2/target/failsafe-reports/*-output.txt
- dspace-api/target/surefire-reports/*-output.txt
- dspace-api/target/failsafe-reports/*-output.txt

- step: &integration-tests-slow
- step: &integration-tests-with-test-jars
runs-on: self.hosted
name: integration-tests-slow
size: 4x
name: integration-tests-with-test-jars
size: 1x
caches:
- gradle
- gradlewrapper
- maven
script:
- *setEnv
#- ./dspace-api/src/test/data/dspaceFolder/bin/install_grobid.sh
- mvn -T 1C clean install -Dmaven.test.skip=true -DskipUnitTests=true -Pdspace-rest -DskipITs=true -DskipIntegrationTests=true -P !assembly -B $MAVEN_ARGS
- mvn test -Dmaven.test.skip=false -DskipUnitTests=false -Pdspace-rest -DskipITs=false -Pdspace-rest -DskipIntegrationTests=false -B -Dsurefire.rerunFailingTestsCount=2 -Dtest.argLine=-Xmx4096M -DfailIfNoTests=false -Dtest=ItemImportIT,GenericAuthorizationFeatureIT,ItemRestRepositoryIT,LeftTiltedRelationshipRestRepositoryIT,RelationshipRestRepositoryIT,StatisticsRestRepositoryIT,WorkspaceItemRestRepositoryIT,DiscoveryRestControllerIT,PatchMetadataIT,RightTiltedRelationshipRestRepositoryIT $MAVEN_ARGS
- cp -rf target/local-repo/** ~/.m2/repository/
- mvn verify -pl dspace-server-webapp -nsu -Dmaven.main.skip -DuseIncrementalCompilation=true -Dit.test=*IT,\!GenericAuthorizationFeatureIT,\!WorkspaceItemRestRepositoryIT,\!ItemImportIT,\!ItemRestRepositoryIT,\!LeftTiltedRelationshipRestRepositoryIT,\!RelationshipRestRepositoryIT,\!StatisticsRestRepositoryIT,\!DiscoveryRestControllerIT,\!PatchMetadataIT,\!VersionRestRepositoryIT,\!CollectionRestRepositoryIT,\!DiscoveryScopeBasedRestControllerIT,\!BrowsesResourceControllerIT,\!BitstreamRestRepositoryIT,\!RightTiltedRelationshipRestRepositoryIT,\!ResearcherProfileRestRepositoryIT,\!StatisticsRestSearchByCategoryRepositoryIT,\!TaskRestRepositoriesIT -DskipUnitTests=true -DskipIntegrationTests=false -B -Dsurefire.rerunFailingTestsCount=2 -Dtest.argLine=-Xmx4096M $MAVEN_ARGS
artifacts:
- dspace-iiif/target/surefire-reports/*-output.txt
- dspace-oai/target/surefire-reports/*-output.txt
- dspace-rdf/target/surefire-reports/*-output.txt
- dspace-rest/target/surefire-reports/*-output.txt
- dspace-server-webapp/target/surefire-reports/*-output.txt
- dspace-services/target/surefire-reports/*-output.txt
- dspace-sword/target/surefire-reports/*-output.txt
- dspace-swordv2/target/surefire-reports/*-output.txt
- dspace-iiif/target/failsafe-reports/*-output.txt
- dspace-oai/target/failsafe-reports/*-output.txt
- dspace-rdf/target/failsafe-reports/*-output.txt
- dspace-rest/target/failsafe-reports/*-output.txt
- dspace-server-webapp/target/failsafe-reports/*-output.txt
- dspace-services/target/failsafe-reports/*-output.txt
- dspace-sword/target/failsafe-reports/*-output.txt
- dspace-swordv2/target/failsafe-reports/*-output.txt

- step: &integration-tests-dspace-api
- step: &integration-tests-slow
runs-on: self.hosted
name: integration-tests-dspace-api
size: 4x
name: integration-tests-slow
size: 1x
caches:
- gradle
- gradlewrapper
- maven
script:
- *setEnv
- mvn -T 1C clean install license:check -Dmaven.test.skip=true -Dmaven.test.skip=true -DskipUnitTests=true -Pdspace-rest -DskipITs=true -DskipIntegrationTests=true -P !assembly -B $MAVEN_ARGS
- mvn verify -pl dspace-api -Dmaven.test.skip=false -DskipUnitTests=true -Pdspace-rest -DskipITs=false -Pdspace-rest -DskipIntegrationTests=false -P !assembly -B -Dsurefire.rerunFailingTestsCount=2 -Dtest.argLine=-Xmx4096M $MAVEN_ARGS
- cp -rf target/local-repo/** ~/.m2/repository/
- mvn verify -pl dspace-server-webapp -nsu -Dmaven.main.skip -Dit.test=GenericAuthorizationFeatureIT,WorkspaceItemRestRepositoryIT,ItemImportIT,ItemRestRepositoryIT,LeftTiltedRelationshipRestRepositoryIT,RelationshipRestRepositoryIT,StatisticsRestRepositoryIT,DiscoveryRestControllerIT,PatchMetadataIT,VersionRestRepositoryIT,CollectionRestRepositoryIT,DiscoveryScopeBasedRestControllerIT,BrowsesResourceControllerIT,BitstreamRestRepositoryIT,RightTiltedRelationshipRestRepositoryIT,ResearcherProfileRestRepositoryIT,StatisticsRestSearchByCategoryRepositoryIT,TaskRestRepositoriesIT -DskipUnitTests=true -DskipIntegrationTests=false -B -Dsurefire.rerunFailingTestsCount=2 -Dtest.argLine=-Xmx4096M $MAVEN_ARGS
artifacts:
- dspace-api/target/surefire-reports/*-output.txt
- dspace-api/target/failsafe-reports/*-output.txt
- dspace-server-webapp/target/surefire-reports/*-output.txt
- dspace-server-webapp/target/failsafe-reports/*-output.txt

pipelines:
branches:
'dspace-cris-7':
- step: *install
- parallel: &parallel-pipeline
- step: *unit-test-code-checks
- step: *integration-tests
- step: *integration-tests-with-test-jars
- step: *integration-tests-slow
- step: *integration-tests-dspace-api
'dspace-cris-2023_02_x':
- step: *install
- parallel: *parallel-pipeline
'prod/**':
- step: *install
- parallel: *parallel-pipeline

pull-requests:
'**':
- step: *install
- parallel:
- step: *unit-test-code-checks
- step: *integration-tests
- step: *integration-tests-with-test-jars
- step: *integration-tests-slow
- step: *integration-tests-dspace-api
custom:
integration:
- step: *integration-tests
integration-slow:
- step: *integration-tests-slow
install:
- step: *install
integration-tests-with-test-jars:
- step: *integration-tests-with-test-jars
integration-dspace-api:
- step: *integration-tests-dspace-api
integration-tests-slow:
- step: *integration-tests-slow
unit:
- step: *unit-test-code-checks

1 change: 0 additions & 1 deletion dspace-api/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-api</artifactId>
<name>DSpace Kernel :: API and Implementation</name>
<description>DSpace core data model and service APIs.</description>
Expand Down
1 change: 0 additions & 1 deletion dspace-iiif/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-iiif</artifactId>
<packaging>jar</packaging>
<name>DSpace IIIF</name>
Expand Down
1 change: 0 additions & 1 deletion dspace-rdf/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-rdf</artifactId>
<packaging>jar</packaging>
<name>DSpace RDF</name>
Expand Down
1 change: 0 additions & 1 deletion dspace-rest/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-rest</artifactId>
<packaging>war</packaging>
<version>cris-2023.02.07-SNAPSHOT</version>
Expand Down
21 changes: 20 additions & 1 deletion dspace-server-webapp/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-server-webapp</artifactId>
<name>DSpace Server Webapp</name>
<description>
Expand Down Expand Up @@ -317,6 +316,26 @@
</dependencies>
</profile>

<!--
Builds Audio Video addon for DSpace
-->
<profile>
<id>addon-video</id>
<activation>
<property>
<name>audiovideo.on</name>
</property>
</activation>
<dependencies>
<dependency>
<groupId>it.4science.dspace</groupId>
<artifactId>addon-video-api</artifactId>
<version>${addon-video.version}</version>
<type>jar</type>
</dependency>
</dependencies>
</profile>

<profile>
<id>addon-document-viewer</id>
<activation>
Expand Down
1 change: 0 additions & 1 deletion dspace-services/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-services</artifactId>
<packaging>jar</packaging>
<name>DSpace Services Framework :: API and Implementation</name>
Expand Down
1 change: 0 additions & 1 deletion dspace-sword/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-sword</artifactId>
<packaging>jar</packaging>
<name>DSpace SWORD</name>
Expand Down
1 change: 0 additions & 1 deletion dspace-swordv2/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace-swordv2</artifactId>
<packaging>jar</packaging>
<name>DSpace SWORD v2</name>
Expand Down
1 change: 0 additions & 1 deletion dspace/modules/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.dspace</groupId>
<artifactId>modules</artifactId>
<packaging>pom</packaging>

Expand Down
1 change: 0 additions & 1 deletion dspace/modules/server-boot/pom.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>server-boot</artifactId>
<name>DSpace Server Webapp:: Executable JAR</name>

Expand Down
36 changes: 15 additions & 21 deletions dspace/modules/server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<id>unpack-additions</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
Expand All @@ -41,6 +41,20 @@
<excludes>META-INF/**</excludes>
</configuration>
</execution>
<execution>
<id>unpack-webapp</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<includeGroupIds>org.dspace</includeGroupIds>
<includeArtifactIds>dspace-server-webapp</includeArtifactIds>
<includes>**/static/**,**/*.properties</includes>
<outputDirectory>${project.build.directory}/additions</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
Expand All @@ -67,26 +81,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeScope>runtime</includeScope>
<includeGroupIds>org.dspace</includeGroupIds>
<includeArtifactIds>dspace-server-webapp</includeArtifactIds>
<includes>**/static/**,**/*.properties</includes>
<outputDirectory>${project.build.directory}/additions</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!-- This plugin allows us to run a Groovy script in our Maven POM
(see: https://groovy.github.io/gmaven/groovy-maven-plugin/execute.html )
We are generating a OS-agnostic version (agnostic.build.dir) of
Expand Down
1 change: 0 additions & 1 deletion dspace/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>org.dspace</groupId>
<artifactId>dspace</artifactId>
<name>DSpace Assembly and Configuration</name>
<packaging>pom</packaging>
Expand Down
Loading

0 comments on commit 6319cf3

Please sign in to comment.