Skip to content

Commit

Permalink
Merge branch 'master' into feature/ACS-9047-keycloak26
Browse files Browse the repository at this point in the history
  • Loading branch information
pzhyland committed Dec 16, 2024
2 parents a7a7497 + 430b0d1 commit 510e8bb
Show file tree
Hide file tree
Showing 34 changed files with 244 additions and 275 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
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@
<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.13</version>
<version>25.1.0.15</version>
</parent>

<properties>
<dependency.alfresco-enterprise-repo.version>25.1.0.13</dependency.alfresco-enterprise-repo.version>
<dependency.alfresco-enterprise-share.version>25.1.0.12</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>

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 510e8bb

Please sign in to comment.