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

Merge master Release-6.0.0 into release #225

Merged
merged 41 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
dbca8bc
ALFREDAPI-552 update swagger spec to be oa2 compliant
RVanhuysseXenit Jul 10, 2024
4e17d28
ALFREDAPI-552 update changelog
RVanhuysseXenit Jul 10, 2024
5c8ccc3
ALFREDAPI-552 update changelog
RVanhuysseXenit Jul 10, 2024
8de5e28
ALFREDAPI-552 add auto publishing of docs
RVanhuysseXenit Jul 10, 2024
d2751f5
ALFREDAPI-522 only allow website-publish on master or release branche…
RVanhuysseXenit Jul 31, 2024
2f6e832
ALFREDAPI-552 update docker gradle plugin
RVanhuysseXenit Aug 7, 2024
564e4aa
Merge pull request #222 from xenit-eu/ALFREDAPI-552
WimCrols Aug 8, 2024
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
ce330f1
Merge pull request #221 from xenit-eu/ALFREDAPI-548-split
codingBenVdS Aug 12, 2024
d160a0a
ALFREDAPI-556 [Update] package name-change from 'eu.xenit.apix' to 'e…
codingBenVdS Aug 12, 2024
fba984d
ALFREDAPI-556 [Update] Changed all other apix references in the code …
codingBenVdS Aug 13, 2024
819766c
Merge pull request #223 from xenit-eu/ALFREDAPI-556
codingBenVdS Aug 13, 2024
3622f36
ALFREDAPI-560 [RELEASE] 6.0.0
codingBenVdS Aug 19, 2024
da3090b
Merge pull request #224 from xenit-eu/ALFREDAPI-560-release-6.0.0
codingBenVdS Aug 19, 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
  •  
  •  
  •  
24 changes: 12 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ env:
ORG_GRADLE_PROJECT_sonatype_password: ${{ secrets.SONATYPE_S01_PASSWORD }}
BRANCH_NAME: ${{ github.ref_name }}
jobs:
apix-interface:
alfred-api-interface:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
- 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 @@ -30,21 +30,21 @@ jobs:
- name: Build interface # Execute before integration testing to catch errors early
uses: gradle/[email protected]
with:
arguments: :apix-interface:build :apix-interface:javadoc
arguments: :alfred-api-interface:build :alfred-api-interface:javadoc
- name: Unit test REST API
uses: gradle/[email protected]
with:
arguments: --info :apix-rest-v1:test
arguments: --info :alfred-api-rest:test
- name: Publish
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}"
uses: gradle/[email protected]
with:
arguments: --info -PsigningKeyId=DF8285F0 :apix-interface:publish
arguments: --info -PsigningKeyId=DF8285F0 :alfred-api-interface:publish

apix-impl:
alfred-api-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 @@ -66,8 +66,8 @@ jobs:
with:
arguments: >-
--info
:apix-impl:apix-impl-${{ matrix.alfresco_version }}:test
:apix-integrationtests:alfresco:${{ matrix.alfresco_version }}:integrationTest
:alfred-api-impl:alfred-api-impl-${{ matrix.alfresco_version }}:test
:alfred-api-integrationtests-client:alfresco:${{ matrix.alfresco_version }}:integrationTest
- name: Publish Test Report
uses: mikepenz/[email protected]
if: success() || failure()
Expand All @@ -77,9 +77,9 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
detailed_summary: true
- name: Publish
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}"
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}
uses: gradle/[email protected]
with:
arguments: >-
--info -PsigningKeyId=DF8285F0
:alfresco:${{ matrix.alfresco_version }}:publish
:alfresco:${{ matrix.alfresco_version }}:publish
51 changes: 51 additions & 0 deletions .github/workflows/website-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: 'Publish website'
on:
workflow_dispatch:
env:
BRANCH_NAME: ${{ github.ref_name }}
ALFRESCO_NEXUS_USERNAME: ${{ secrets.ALFRESCO_NEXUS_USERNAME }}
ALFRESCO_NEXUS_PASSWORD: ${{ secrets.ALFRESCO_NEXUS_PASSWORD }}
jobs:
alfred-api-docs:
if: ${{ startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/release') }}
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v4
- name: Login to Docker
uses: docker/login-action@v2
with:
registry: private.docker.xenit.eu
username: ${{ secrets.CLOUDSMITH_USER }}
password: ${{ secrets.CLOUDSMITH_APIKEY }}
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build website
run: ./gradlew :docs:buildWebsiteScript --info
- name: Upload website artifact
if: success()
uses: actions/upload-artifact@v3
with:
name: website-alfred-api.tar.gz
path: /home/runner/work/alfred-api/docs/build/website-*.tar.gz
retention-days: 2
- name: Write ssh key to file
env:
RAW_KEY: ${{ secrets.A2_HOSTING_SSH_KEY }}
run: |
mkdir -p /home/runner/.ssh/
echo "$RAW_KEY" > /home/runner/.ssh/a2hostingKey
chmod 600 /home/runner/.ssh/a2hostingKey
- name: Deploy tar to webhost
env:
GRADLE_OPTS: >-
-Dorg.gradle.project.webHostAddress=nl1-ts102.a2hosting.com
-Dorg.gradle.project.webHostPort=7822
-Dorg.gradle.project.webHostUser=xeniteu
-Dorg.gradle.project.webHostSshKey=/home/runner/.ssh/a2hostingKey
run: ./gradlew :docs:deployWebsiteToWebHost --info
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Generated version file
apix-impl/src/main/java/eu/xenit/apix/Version.java
alfred-api-impl/src/main/java/eu/xenit/alfred/api/Version.java

target/
*.iml
Expand Down
26 changes: 24 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,33 @@
# Alfred API - Changelog

## 5.0.3 (2024-06-17)

## 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 `alfred-api-integrationtests-server` has been added. (See README)
The artifact name of `alfred-api-integrationtests` has been changed to `alfred-api-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 alfred-api-docker.
* Dropped all support for older Alfresco version prior to V23.1 just as alfresco-mvc
* **All package names have been updated from `eu.xenit.apix` to `eu.xenit.alfred.api`.**
* **All class names have been updated from `apix-...` to `alfred.api-...`.**

* [ALFREDAPI-548](https://xenitsupport.jira.com/browse/ALFREDAPI-548): Support Alfresco V23.1 && V23.2, dropping V7.x
* [ALFREDAPI-556](https://xenitsupport.jira.com/browse/ALFREDAPI-556): Change apix package-names to `eu.xenit.alfred.api`.

### Fixed
* [ALFREDAPI-552](https://xenitsupport.jira.com/browse/ALFREDAPI-552) Make swagger spec Open Api v2 compliant

## 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
31 changes: 18 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,50 +39,55 @@ Full documentation can be found at the [project's documentation](https://docs.xe
* Follow our [coding styleguide and other active procedures](https://xenitsupport.jira.com/wiki/spaces/XEN/pages/624558081/XeniT+Enhancement+Proposals+XEP).

### Project structure
* *apix-interface* builds the interface of Alfred API. This part is agnostic of the
* *alfred-api-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-impl* builds the Java code for each version of Alfresco.
* *alfred-api-rest* builds the REST API of Alfred API.
* *alfred-api-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 *alfred-api-interface* and *alfred-api-rest*.
* *alfresco/xx* contains the correct properties for each Alfresco version.
* *apix-integrationtests* contains the integration tests for each Alfresco version.
* *alfred-api-integrationtests-client* contains the integration tests for each Alfresco version.
* *alfred-api-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

#### Run

The following command starts up all docker containers required for an Alfresco running Alfred API.
```bash
./gradlew :apix-docker:docker-${VERSION}:composeUp --info
./gradlew :alfred-api-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 :alfred-api-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 :alfred-api-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 :alfred-api-integrationtests-client:alfresco:231:integrationTest -x composeDown --tests ContentServiceTestJavaApi.TestContentUrlExists
```

#### Run integration tests under debugger
1. Debugging settings are already added by `apix-docker/${VERSION}/debug-extension.docker-compose.yml`, including a
1. Debugging settings are already added by `alfred-api-docker/${VERSION}/debug-extension.docker-compose.yml`, including a
portmapping `8000:8000`. This file does not get loaded when running in CI.
2. Prepare your remote debugger in IntelliJ and set breakpoints where you want in your tests
(or Alfred API code).
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`.
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:
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:
Loading
Loading