Skip to content

Commit

Permalink
Merge branch 'refs/heads/master' into feature/ACS-9045
Browse files Browse the repository at this point in the history
# Conflicts:
#	pom.xml
  • Loading branch information
kmagdziarz committed Dec 17, 2024
2 parents 506dc3b + 430b0d1 commit e819fdb
Show file tree
Hide file tree
Showing 36 changed files with 247 additions and 278 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/master_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ env:
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60
BASE_BUILD_NUMBER: 10000
# Release version has to start with real version (23.2.0-....) for the docker image to build successfully.
RELEASE_VERSION: 25.1.0-A.3
DEVELOPMENT_VERSION: 25.1.0-A.4-SNAPSHOT
RELEASE_VERSION: 25.1.0-A.4
DEVELOPMENT_VERSION: 25.1.0-A.5-SNAPSHOT

jobs:
run_ci:
Expand Down
2 changes: 1 addition & 1 deletion dev/dev-acs-amps-overlay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-tomcat-env</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dev/dev-repo-amps-overlay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-tomcat-env</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<build>
Expand Down
2 changes: 1 addition & 1 deletion dev/dev-share-amps-overlay/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-tomcat-env</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<build>
Expand Down
2 changes: 1 addition & 1 deletion dev/dev-tomcat/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-tomcat-env</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion dev/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion distribution-ags/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion distribution-share/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<!-- To replace in share-config-custom.xml -->
Expand Down
2 changes: 1 addition & 1 deletion distribution/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<dependencies>
Expand Down
2 changes: 1 addition & 1 deletion docker-alfresco/ags/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-services-docker</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>
<properties>
<image.name>alfresco/alfresco-governance-repository-enterprise</image.name>
Expand Down
2 changes: 1 addition & 1 deletion docker-alfresco/aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-services-docker</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion docker-alfresco/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion docker-share/ags/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>share-docker</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion docker-share/aws/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>share-docker</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion docker-share/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
10 changes: 5 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,26 @@
<artifactId>acs-packaging</artifactId>
<packaging>pom</packaging>
<name>Alfresco Content Services Packaging</name>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>

<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-enterprise-repo</artifactId>
<relativePath>../alfresco-enterprise-repo/pom.xml</relativePath>
<version>25.1.0.11-SNAPSHOT</version>
<version>25.1.0.15</version>
</parent>

<properties>
<dependency.alfresco-enterprise-repo.version>25.1.0.11-SNAPSHOT</dependency.alfresco-enterprise-repo.version>
<dependency.alfresco-enterprise-share.version>25.1.0.15-SNAPSHOT</dependency.alfresco-enterprise-share.version>
<dependency.alfresco-enterprise-repo.version>25.1.0.15</dependency.alfresco-enterprise-repo.version>
<dependency.alfresco-enterprise-share.version>25.1.0.14</dependency.alfresco-enterprise-share.version>

<alfresco.rm-enterprise-rest-api-explorer.version>3.0.2</alfresco.rm-enterprise-rest-api-explorer.version>

<alfresco.s3connector.version>6.1.1</alfresco.s3connector.version>
<alfresco.azure-connector.version>5.0.3</alfresco.azure-connector.version>
<alfresco.salesforce-connector.version>3.2.0</alfresco.salesforce-connector.version>
<alfresco.outlook.version>2.9.0</alfresco.outlook.version>
<alfresco.desktop-sync.version>5.1.0</alfresco.desktop-sync.version>
<alfresco.desktop-sync.version>5.2.0-A1</alfresco.desktop-sync.version>
<alfresco.ais.version>3.1.7</alfresco.ais.version>
<alfresco.hxinsight-connector.version>1.0.1</alfresco.hxinsight-connector.version>

Expand Down
2 changes: 1 addition & 1 deletion tests/environment/.env
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ MSSQL_TAG=2019-CU28-ubuntu-20.04
ORACLE_TAG=19.3.0-ee
ACTIVEMQ_TAG=5.18.3-jre17-rockylinux8
KEYCLOAK_TAG=25.0.6
SYNC_SERVICE_TAG=5.1.0
SYNC_SERVICE_TAG=5.2.0-A1
TRANSFORM_ROUTER_TAG=4.1.5
TRANSFORM_CORE_AIO_TAG=5.1.5
SHARED_FILE_STORE_TAG=4.1.5
Expand Down
2 changes: 1 addition & 1 deletion tests/environment/docker-compose-pipeline-all-amps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ services:
- share

sync-service:
image: quay.io/alfresco/service-sync:5.1.0
image: quay.io/alfresco/service-sync:5.2.0-A1
mem_limit: 1g
environment:
JAVA_OPTS : "
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline-all-amps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-tests</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline-all-amps/repo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>pipeline-all-amps</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<artifactId>alfresco-pipeline-all-amps-repo</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tests/pipeline-all-amps/share/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>pipeline-all-amps</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<artifactId>alfresco-pipeline-all-amps-share</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-packaging</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<modules>
Expand Down
2 changes: 1 addition & 1 deletion tests/tas-all-amps/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-tests</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<developers>
Expand Down
2 changes: 1 addition & 1 deletion tests/tas-cmis/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-tests</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<developers>
Expand Down
2 changes: 1 addition & 1 deletion tests/tas-distribution-zip/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-tests</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<properties>
Expand Down
2 changes: 1 addition & 1 deletion tests/tas-elasticsearch/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-tests</artifactId>
<version>25.1.0-A.4-SNAPSHOT</version>
<version>25.1.0-A.5-SNAPSHOT</version>
</parent>

<profiles>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.alfresco.elasticsearch.initialReindex;

import static org.alfresco.elasticsearch.SearchQueryService.req;
import static org.alfresco.tas.AlfrescoStackInitializer.getImagesConfig;
import static org.alfresco.tas.AlfrescoStackInitializer.reindex;
import static org.alfresco.utility.model.FileType.TEXT_PLAIN;

import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

Expand All @@ -13,19 +13,15 @@
import org.alfresco.utility.data.DataContent;
import org.alfresco.utility.data.DataSite;
import org.alfresco.utility.data.DataUser;
import org.alfresco.utility.model.FileModel;
import org.alfresco.utility.model.SiteModel;
import org.alfresco.utility.model.TestGroup;
import org.alfresco.utility.model.UserModel;
import org.alfresco.utility.network.ServerHealth;
import org.alfresco.utility.report.log.Step;
import org.apache.http.HttpHost;
import org.opensearch.client.RestClient;
import org.opensearch.client.RestHighLevelClient;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.testng.AbstractTestNGSpringContextTests;
import org.testcontainers.containers.GenericContainer;
import org.testcontainers.containers.startupcheck.IndefiniteWaitOneShotStartupCheckStrategy;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;

Expand All @@ -37,10 +33,6 @@

public class ElasticsearchInitialReindexingTests extends AbstractTestNGSpringContextTests
{
private static final Logger LOGGER = LoggerFactory.getLogger(ElasticsearchInitialReindexingTests.class);

public static final String CUSTOM_ALFRESCO_INDEX = "custom-alfresco-index";

@Autowired
private ServerHealth serverHealth;
@Autowired
Expand All @@ -52,11 +44,8 @@ public class ElasticsearchInitialReindexingTests extends AbstractTestNGSpringCon
@Autowired
protected SearchQueryService searchQueryService;

private org.alfresco.utility.model.UserModel testUser;

private org.alfresco.utility.model.SiteModel testSite;

private RestHighLevelClient elasticClient;
private UserModel testUser;
private SiteModel testSite;

/**
* Create a user and a private site and wait for these to be indexed.
Expand All @@ -72,13 +61,6 @@ public void dataPreparation()
testUser = dataUser.createRandomTestUser();
testSite = dataSite.usingUser(testUser).createPrivateRandomSite();
createDocument();

Step.STEP("create ES client");
elasticClient = new RestHighLevelClient(
RestClient.builder(new HttpHost(AlfrescoStackInitializer.searchEngineContainer.getContainerIpAddress(),
AlfrescoStackInitializer.searchEngineContainer.getFirstMappedPort(),
"http")));

}

/**
Expand All @@ -96,36 +78,14 @@ public void testReindexerIndexesSystemDocuments()
// WHEN
// Run reindexer against the initial documents.
reindex(Map.of("ALFRESCO_REINDEX_JOB_NAME", "reindexByIds",
"ELASTICSEARCH_INDEX_NAME", CUSTOM_ALFRESCO_INDEX,
"ALFRESCO_REINDEX_FROM_ID", "0",
"ALFRESCO_REINDEX_TO_ID", "1000"));
"ALFRESCO_REINDEX_FROM_ID", "0",
"ALFRESCO_REINDEX_TO_ID", "1000"));

// THEN
// Check system document is indexed.
searchQueryService.expectResultsFromQuery(query, dataUser.getAdminUser(), "budget.xls");
}

/**
* Run the alfresco-elasticsearch-reindexing container.
*
* @param envParam Any environment variables to override from the defaults.
*/
private void reindex(Map<String, String> envParam)
{
// Run the reindexing container.
Map<String, String> env = AlfrescoStackInitializer.getReindexEnvBasic();
env.putAll(envParam);

try (GenericContainer reindexingComponent = new GenericContainer(getImagesConfig().getReIndexingImage())
.withEnv(env)
.withNetwork(AlfrescoStackInitializer.network)
.withStartupCheckStrategy(
new IndefiniteWaitOneShotStartupCheckStrategy()))
{
reindexingComponent.start();
}
}

/**
* Create a document using in the test site using the test user.
*
Expand All @@ -136,7 +96,7 @@ private String createDocument()
String documentName = "TestFile" + UUID.randomUUID() + ".txt";
dataContent.usingUser(testUser)
.usingSite(testSite)
.createContent(new org.alfresco.utility.model.FileModel(documentName, org.alfresco.utility.model.FileType.TEXT_PLAIN, "content"));
.createContent(new FileModel(documentName, TEXT_PLAIN, "content"));
return documentName;
}
}
Loading

0 comments on commit e819fdb

Please sign in to comment.