Skip to content

Commit

Permalink
Merge pull request #221 from xenit-eu/ALFREDAPI-548-split
Browse files Browse the repository at this point in the history
ALFREDAPI-548-split [Add] Alfresco V23.1 & V23.2 support
  • Loading branch information
codingBenVdS authored Aug 12, 2024
2 parents 564e4aa + 9010ddb commit ce330f1
Show file tree
Hide file tree
Showing 305 changed files with 2,498 additions and 2,596 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: temurin
- name: Login to Docker
uses: docker/login-action@v2
Expand All @@ -34,7 +34,7 @@ jobs:
- name: Unit test REST API
uses: gradle/[email protected]
with:
arguments: --info :apix-rest-v1:test
arguments: --info :apix-rest:test
- name: Publish
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}"
uses: gradle/[email protected]
Expand All @@ -44,7 +44,7 @@ jobs:
apix-impl:
strategy:
matrix:
alfresco_version: [ 70, 71, 72, 73, 74 ]
alfresco_version: [ 231, 232 ]
fail-fast: false
runs-on: ubuntu-latest
steps:
Expand All @@ -53,7 +53,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 17
distribution: temurin
- name: Login to Docker
uses: docker/login-action@v2
Expand All @@ -67,7 +67,7 @@ jobs:
arguments: >-
--info
:apix-impl:apix-impl-${{ matrix.alfresco_version }}:test
:apix-integrationtests:alfresco:${{ matrix.alfresco_version }}:integrationTest
:apix-integrationtests-client:alfresco:${{ matrix.alfresco_version }}:integrationTest
- name: Publish Test Report
uses: mikepenz/[email protected]
if: success() || failure()
Expand Down
20 changes: 18 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Alfred API - Changelog


## 6.0.0 (2024-07-18)
From this version onward Dynamic Extensions for integration-testing is replaced by [remote-junit](https://github.com/ruediste/remote-junit)
as framework to reduce maintenance efforts.

A subproject with the name of `apix-integrationtests-server` has been added. (See README)
The artifact name of `apix-integrationtests` has been changed to `apix-integrationtests-client`.

Breaking changes:
* JDK11 --> JDK 17
* Library changes from Javax to Jakarta
* Tomcat V10.1: this comes with a breaking change in the dispatchservlet, blocking the MultiPart handling and blocks double forward slashes
* Fix has to be deployed from your tomcat image. You will have to update your META-INF/context.xml in tomcat. See subproject apix-docker.
* Dropped all support for older Alfresco version prior to V23.1 just as alfresco-mvc

* [ALFREDAPI-548](https://xenitsupport.jira.com/browse/ALFREDAPI-548): Support Alfresco V23.1 && V23.2, dropping V7.x

## 5.0.4 (Unreleased)

### Fixed
Expand All @@ -8,9 +25,8 @@
## 5.0.3 (2024-06-17)

### Fixed

* [ALFREDAPI-554](https://xenitsupport.jira.com/browse/ALFREDAPI-554): expose `apix-impl`
beans in main application context (to be used by other AMPs)
beans in main application context (to be used by other AMPs)

## 5.0.2 (2024-05-14)

Expand Down
23 changes: 14 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,17 @@ Full documentation can be found at the [project's documentation](https://docs.xe
### Project structure
* *apix-interface* builds the interface of Alfred API. This part is agnostic of the
Alfresco version used.
* *apix-rest-v1* builds the REST API of Alfred API.
* *apix-rest* builds the REST API of Alfred API.
* *apix-impl* builds the Java code for each version of Alfresco.
* *alfresco* builds the AMP for each Alfresco version that is the main deliverable for Alfred API. The AMP contains
the JARs of *apix-interface* and *apix-rest-v1*.
the JARs of *apix-interface* and *apix-rest*.
* *alfresco/xx* contains the correct properties for each Alfresco version.
* *apix-integrationtests* contains the integration tests for each Alfresco version.
* *apix-integrationtests-client* contains the integration tests for each Alfresco version.
* *apix-integrationtests-server* contains the Remote-JUnit runner for remote class loading.
* uses java serialization and HTTP for communication.
* We startup a CodeRunnerStandaloneServer, which starts a nanohttpd server, listening on a specific port (4578 by default)
* Using a static appicationContext to reach all necessary beans.
* SRC: https://github.com/ruediste/remote-junit

### How to

Expand All @@ -56,25 +61,25 @@ The following command starts up all docker containers required for an Alfresco r
```bash
./gradlew :apix-docker:docker-${VERSION}:composeUp --info
```
Where `VERSION` is e.g. `70`.
Where `VERSION` is e.g. `231`.


#### Run integration tests
```bash
./gradlew :apix-integrationtests:alfresco:${VERSION}:integrationTest
./gradlew :apix-integrationtests-client:alfresco:${VERSION}:integrationTest
```
Again, where `VERSION` is e.g. `70`.
Again, where `VERSION` is e.g. `231`.

However, this starts (and afterwards stops) docker containers. This includes starting an Alfresco container,
adding a startup time of several minutes. To circumvent this you also run the test on already running containers with
for example:
```bash
./gradlew -x composeUp -x composeDown :apix-integrationtests:alfresco:74:integrationTest -Pprotocol=http -Phost=localhost -Pport=8074
./gradlew -x composeUp -x composeDown :apix-integrationtests-client:alfresco:231:integrationTest -Pprotocol=http -Phost=localhost -Pport=8074
```

If you only want to run specific tests, you can specify this on the Gradle invocation with a pattern. For example:
```bash
./gradlew :apix-integrationtests:alfresco:74:integrationTest -x composeDown --tests C*ServiceTest
./gradlew :apix-integrationtests-client:alfresco:231:integrationTest -x composeDown --tests ContentServiceTestJavaApi.TestContentUrlExists
```

#### Run integration tests under debugger
Expand All @@ -85,4 +90,4 @@ portmapping `8000:8000`. This file does not get loaded when running in CI.
3. Run the integration tests (see section above).
4. Wait until the container is started and healthy, then attach the debugger.

Again, where `VERSION` is e.g. `70`.
Again, where `VERSION` is e.g. `231`.
8 changes: 8 additions & 0 deletions alfresco/231/overrides.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
description = "Xenit Alfred API implementation Alfresco 23.1.0"

ext {
alfresco_version = "23.1.0"
alfresco_min_version = "23.1.0"
//Not setting alfresco_max_version here to make it easier to test on next Alfresco version (only for latest version)
alfresco_max_version = "23.1.99"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
description = "Xenit Alfred API implementation Alfresco 7.4"
description = "Xenit Alfred API implementation Alfresco 23.2"

ext {
alfresco_version = '7.4.0'
alfresco_min_version = alfresco_version.substring(0, 3) + ".0"
alfresco_version = '23.2.0'
alfresco_min_version = "23.2.0"
//Not setting alfresco_max_version here to make it easier to test on next Alfresco version (only for latest version)
alfresco_max_version = null // explicit null to overwrite properties from other projects
}
7 changes: 0 additions & 7 deletions alfresco/70/overrides.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions alfresco/71/overrides.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions alfresco/72/overrides.gradle

This file was deleted.

7 changes: 0 additions & 7 deletions alfresco/73/overrides.gradle

This file was deleted.

6 changes: 3 additions & 3 deletions alfresco/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ subprojects {
it.put("module.id", "alfred-api-${project.name}")
it.put("module.title", "alfred-api-${project.name}")
it.put("module.description",
"Xenit Alfred API implementation Alfresco ${alfresco_version.substring(0, 3)}")
"Xenit Alfred API implementation Alfresco ${alfresco_version}")
it.put("module.version", project.version)
it.put("module.repo.version.min", project.alfresco_min_version)
if(project.hasProperty("alfresco_max_version")
if (project.hasProperty("alfresco_max_version")
&& project.alfresco_max_version != null) {
it.put("module.repo.version.max", project.alfresco_max_version)
}
Expand All @@ -33,7 +33,7 @@ subprojects {
dependencies {
implementation(project(":apix-impl"))
implementation(project(":apix-impl:apix-impl-${project.name}"))
implementation(project(":apix-rest-v1"))
implementation(project(":apix-rest"))
}

publishing {
Expand Down
6 changes: 3 additions & 3 deletions apix-docker/70/build.gradle → apix-docker/231/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dependencies {
baseAlfrescoWar platform("org.alfresco:acs-packaging:7.0.1.9")
baseAlfrescoWar platform("org.alfresco:acs-packaging:23.1.0")
baseAlfrescoWar 'org.alfresco:content-services@war'
}

dockerAlfresco {
baseImage = 'private.docker.xenit.eu/alfresco-enterprise/alfresco-repository-enterprise:7.0.1.9'
}
baseImage = 'private.docker.xenit.eu/alfresco-enterprise/alfresco-repository-enterprise:23.1.0.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- DEBUG=true
- SHARE_HOST=alfresco-share
alfresco-share:
image: hub.xenit.eu/public/alfresco-share-community:7.1
image: docker.io/xenit/alfresco-share-community:23.1.0.1
ports:
- 8090:8080
environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ version: '2'

services:
alfresco-core:
image: ${DOCKER_IMAGE}
image: ${DOCKER_IMAGE:-image_not_set}
ports:
- "${DOCKER_IP}:8080:8080"
- "4578:4578" # coderunner-server
volumes:
- alfresco:/opt/alfresco/alf_data
restart: unless-stopped
Expand All @@ -13,17 +14,18 @@ services:
- TERM=xterm
- GLOBAL_messaging.broker.url=failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true
- GLOBAL_localTransform.core-aio.url=http://transform-core-aio:8090/

solr:
image: private.docker.xenit.eu/alfresco-enterprise/alfresco-solr6:2.0.3
image: private.docker.xenit.eu/alfresco-enterprise/alfresco-solr6:2.0.8.2
volumes:
- solr:/opt/alfresco/alf_data
restart: unless-stopped
environment:
- ALFRESCO_HOST=alfresco-core

postgresql:
image: docker.io/xenit/postgres
image: postgres:15
ports:
- 5433:5432
volumes:
- postgres:/var/lib/postgresql/data
environment:
Expand All @@ -33,16 +35,16 @@ services:
restart: unless-stopped

activemq:
image: alfresco/alfresco-activemq:5.16.1
image: alfresco/alfresco-activemq:5.17.1-jre17-rockylinux8
mem_limit: 1g

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.5.0
image: alfresco/alfresco-transform-core-aio:5.0.0
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ACTIVEMQ_URL: "nio://activemq:61616"

volumes:
alfresco:
solr:
postgres:
postgres:
6 changes: 3 additions & 3 deletions apix-docker/71/build.gradle → apix-docker/232/build.gradle
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
dependencies {
baseAlfrescoWar platform("org.alfresco:acs-packaging:7.1.0.6")
baseAlfrescoWar platform("org.alfresco:acs-packaging:23.2.0")
baseAlfrescoWar 'org.alfresco:content-services@war'
}

dockerAlfresco {
baseImage = 'private.docker.xenit.eu/alfresco-enterprise/alfresco-repository-enterprise:7.1.0.6'
}
baseImage = 'private.docker.xenit.eu/alfresco-enterprise/alfresco-repository-enterprise:23.2.0.1'
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- DEBUG=true
- SHARE_HOST=alfresco-share
alfresco-share:
image: docker.io/xenit/alfresco-share-community:7.4
image: docker.io/xenit/alfresco-share-community:23.2.0
ports:
- 8090:8080
environment:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ version: '2'

services:
alfresco-core:
image: ${DOCKER_IMAGE}
image: ${DOCKER_IMAGE:-image_not_set}
ports:
- "${DOCKER_IP}:8080:8080"
- "4578:4578" # coderunner-server
volumes:
- alfresco:/opt/alfresco/alf_data
restart: unless-stopped
Expand All @@ -13,17 +14,16 @@ services:
- TERM=xterm
- GLOBAL_messaging.broker.url=failover:(nio://activemq:61616)?timeout=3000&jms.useCompression=true
- GLOBAL_localTransform.core-aio.url=http://transform-core-aio:8090/

solr:
image: private.docker.xenit.eu/alfresco-enterprise/alfresco-solr6:2.0.8.2
image: private.docker.xenit.eu/alfresco-enterprise/alfresco-solr6:2.0.9.1
volumes:
- solr:/opt/alfresco/alf_data
restart: unless-stopped
environment:
- ALFRESCO_HOST=alfresco-core

postgresql:
image: docker.io/xenit/postgres
image: postgres:15
volumes:
- postgres:/var/lib/postgresql/data
environment:
Expand All @@ -33,16 +33,16 @@ services:
restart: unless-stopped

activemq:
image: alfresco/alfresco-activemq:5.16.1
image: alfresco/alfresco-activemq:5.17.1-jre17-rockylinux8
mem_limit: 1g

transform-core-aio:
image: alfresco/alfresco-transform-core-aio:2.5.0
image: alfresco/alfresco-transform-core-aio:5.1.0
environment:
JAVA_OPTS: " -Xms256m -Xmx512m"
ACTIVEMQ_URL: "nio://activemq:61616"

volumes:
alfresco:
solr:
postgres:
postgres:
16 changes: 0 additions & 16 deletions apix-docker/70/debug-extension.docker-compose.yml

This file was deleted.

Loading

0 comments on commit ce330f1

Please sign in to comment.