Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ALFREDAPI-548-split [Add] Alfresco V23.1 & V23.2 support #221

Merged
merged 28 commits into from
Aug 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
9e82f58
ALFREDAPI-548-split [Add] Alfresco V23.1 & V23.2 support
codingBenVdS Jun 19, 2024
e9d8b66
ALFREDAPI-548-split [Update] ci build to work on JDK 17
codingBenVdS Jun 19, 2024
23569be
ALFREDAPI-548-split [Test] removing integration-tests from build
codingBenVdS Jun 19, 2024
8db96ff
ALFREDAPI-548-split [Fix] gradle build
codingBenVdS Jun 20, 2024
ff92d85
ALFREDAPI-548 [Update] Fixed docker compose and being able to run int…
codingBenVdS Jun 21, 2024
3755e30
ALFREDAPI-548-split [Update]
codingBenVdS Jul 9, 2024
0a85ac0
ALFREDAPI-548-split [Update]
codingBenVdS Jul 9, 2024
3c42755
ALFREDAPI-548-split [Fix] Integrationtest build
codingBenVdS Jul 9, 2024
a7c6734
ALFREDAPI-548-split [Update] Loading in beans via overving and constr…
codingBenVdS Jul 10, 2024
29eef55
ALFREDAPI-548-split [Add] Tomcat context.xml file that initialises th…
codingBenVdS Jul 15, 2024
299aec7
ALFREDAPI-548 [CLEANUP] clean old comments and bad code.
codingBenVdS Jul 15, 2024
7b9f64e
ALFREDAPI-548 [Update] Remove old comments and logging.
codingBenVdS Jul 17, 2024
c0b0ff8
ALFREDAPI-548 [Update] README & Changelog
codingBenVdS Jul 18, 2024
5e3e447
ALFREDAPI-548 [Fix] Bulk webscript tests
codingBenVdS Jul 18, 2024
b489d68
ALFREDAPI-548 [Fix] CheckoutChackingTest.java
codingBenVdS Jul 19, 2024
e2f6d9c
ALFREDAPI-548 [update] apix-impl build.gradle
codingBenVdS Jul 19, 2024
f968002
ALFREDAPI-548 [Cleanup] Version to 6.0.0
codingBenVdS Jul 19, 2024
8fef0c7
ALFREDAPI-548 Removed javax jaxb
todorinskiz Jul 24, 2024
ec01b84
ALFREDAPI-548 [Add] Runtime-error for Tomcat Context.xml
codingBenVdS Jul 26, 2024
20c2481
ALFREDAPI-548 [Update] Alfresco V23.2 SOLR:2.0.8.2 to 2.0.9.1
codingBenVdS Jul 26, 2024
a7bb68f
ALFREDAPI-548 [Update] jaxb-api issues
codingBenVdS Jul 29, 2024
98fd5bd
ALFREDAPI-548 [Update] Fix CI build
codingBenVdS Aug 5, 2024
b5e1f4b
ALFREDAPI-548 [Reformat]
codingBenVdS Aug 6, 2024
014b98c
ALFREDAPI-548 [Reformat]
codingBenVdS Aug 6, 2024
f7f385b
ALFREDAPI-548 [Update] Update docker-alfresco plugin
codingBenVdS Aug 7, 2024
c9951fc
ALFREDAPI-548 [Cleanup] gradle build
codingBenVdS Aug 7, 2024
9d1a40c
ALFREDAPI-548 [Removed] tomcat context.xml check
codingBenVdS Aug 8, 2024
9010ddb
ALFREDAPI-548 [Update] default_value to fix composeDown
codingBenVdS Aug 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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/gradle-build-action@v2.4.2
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/gradle-build-action@v2.4.2
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/action-junit-report@v3.7.6
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)
codingBenVdS marked this conversation as resolved.
Show resolved Hide resolved
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
codingBenVdS marked this conversation as resolved.
Show resolved Hide resolved

* [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.
codingBenVdS marked this conversation as resolved.
Show resolved Hide resolved
* 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
codingBenVdS marked this conversation as resolved.
Show resolved Hide resolved
```

#### 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)
codingBenVdS marked this conversation as resolved.
Show resolved Hide resolved
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
Loading