Compare commits

..

12 Commits

Author SHA1 Message Date
alfresco-build
99aaee239e [maven-release-plugin] prepare release V3.2.0.4 2020-08-19 13:10:47 +01:00
alfresco-build
fbdc279994 [maven-release-plugin] prepare for next development iteration 2020-08-19 11:32:54 +01:00
alfresco-build
7b396dc652 [maven-release-plugin] prepare release V3.2.0.3 2020-08-19 11:32:43 +01:00
alfresco-build
5b080cf308 [maven-release-plugin] prepare for next development iteration 2020-08-14 12:04:35 +01:00
alfresco-build
c6a9ec43f5 [maven-release-plugin] prepare release V3.2.0.2 2020-08-14 12:04:24 +01:00
evasques
0ea0565909 Merge pull request #1182 from Alfresco/hotfix-3.2/MNT-21585_fix_ipr_group_match
MNT-21585 - Having EVERYONE in original ACL causes IPR duplication (#…
2020-08-10 11:10:21 +01:00
evasques
ff81afe125 MNT-21585 - Having EVERYONE in original ACL causes IPR duplication (#1144)
* MNT-21585 - Having EVERYONE in original authorities causes IPR duplication

* Update License Headers

* prevent NPE when authorities is null and refactored findIPRGroup method
2020-07-29 13:21:33 +01:00
Claudia Agache
2a014eefe0 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge-3.2/APPS-235_SetupEnv_no
# Conflicts:
#	.travis.yml
2020-07-15 16:49:27 +03:00
rodicasutu
4c9fe378c6 Merge remote-tracking branch 'remotes/origin/release/V3.1' into merge-3.2/APPS-230_BuildAGSOnTravis
# Conflicts:
#	pom.xml

# Conflicts:
#	.travis.settings.xml
#	.travis.yml
2020-07-15 09:19:38 +03:00
Claudia Agache
6d22541437 Change SCM URLs in order to switch to SSH authentication with 2FA for Github
(cherry picked from commit 53f26b5793)
2020-06-09 08:53:33 +01:00
Claudia Agache
06a8df491c RM-7131 Update old gitlab repo links with the new one from github
(cherry picked from commit c3cdd88873)
2020-06-09 08:29:35 +01:00
alfresco-build
5b34dbd24f [maven-release-plugin] prepare for next development iteration 2020-02-26 12:04:24 +00:00
13 changed files with 261 additions and 18 deletions

68
.travis.settings.xml Normal file
View File

@@ -0,0 +1,68 @@
<settings>
<profiles>
<profile>
<id>alfresco-internal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco-internal</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-internal</id>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-public</id>
<name>Alfresco Public Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
<pluginRepository>
<id>alfresco-private</id>
<name>Alfresco Private Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/private</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>docker.io</id>
<username>${env.DOCKERHUB_USERNAME}</username>
<password>${env.DOCKERHUB_PASSWORD}</password>
</server>
<server>
<id>quay.io</id>
<username>${env.QUAY_USERNAME}</username>
<password>${env.QUAY_PASSWORD}</password>
</server>
<server>
<id>alfresco-internal</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-private</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-internal-snapshots</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>

View File

@@ -1,6 +1,129 @@
import:
- source: travis-env-vars.yml
os: linux
dist: xenial
language: java
jdk:
- openjdk11
sudo: false
install: true
script: travis_wait 35 mvn -B clean verify -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
services:
- docker
branches:
only:
- /release\/V3.\d+.*/
- /feature-3.\d+\/.*/
- /merge-3.\d+\/.*/
- /hotfix-3.\d+\/.*/
cache:
directories:
- $HOME/.m2
# the cache can grow constantly
before_cache:
- rm -rf $HOME/.m2/repository/org/alfresco/alfresco-governance-services*
before_install:
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
install: skip
stages:
- name: Build AGS
- name: Tests
if: commit_message !~ /\[skip tests\]/
- name: Security Scans
- name: Release
- name: Publish
jobs:
include:
- name: "Build AGS Community"
stage: Build AGS
before_script: source scripts/setUpMavenPhase.sh
script:
- travis_retry travis_wait 120 mvn -B -q clean ${MAVEN_PHASE} -P${BUILD_PROFILE} -Dimage.tag=${IMAGE_TAG} -Dskip.integrationtests=false -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: "Build AGS Enterprise"
stage: Build AGS
before_script: source scripts/setUpMavenPhase.sh
install:
- travis_retry travis_wait 60 mvn -B -q clean install $MVN_SKIP -f rm-community/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
script:
- travis_retry travis_wait 80 mvn -B -q ${MAVEN_PHASE} -P${BUILD_PROFILE} -Dimage.tag=${IMAGE_TAG} -Dskip.integrationtests=false -f rm-enterprise/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: "Build AGS Benchmark"
stage: Build AGS
before_script: source scripts/setUpMavenPhase.sh
install:
- travis_retry travis_wait 80 mvn -B -q clean install $MVN_SKIP -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
script:
- travis_retry travis_wait 35 mvn -B -q ${MAVEN_PHASE} -Dskip.integrationtests=false -f rm-benchmark/pom.xml -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
- name: "Community Integrations Tests on MySQL"
stage: Tests
script:
- echo "Community Integrations Tests on MySQL"
- name: "Enterprise Integrations Tests on MySQL"
stage: Tests
script:
- echo "Enterprise Integrations Tests on MySQL"
- name: "Community Rest API Tests"
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am
install:
- bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Community Rest API Tests"
- name: "Enterprise Rest API Tests"
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am
install:
- bash scripts/startAlfresco.sh $ENTERPRISE_REPO_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Enterprise Rest API Tests"
- name: "Community UI Tests ..."
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo,:alfresco-governance-services-community-share -am
install:
- bash scripts/startAlfresco.sh $COMMUNITY_SHARE_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Community UI Tests ..."
- name: "Enterprise UI Tests ..."
stage: Tests
before_install:
- travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo,:alfresco-governance-services-enterprise-share -am
install:
- bash scripts/startAlfresco.sh $ENTERPRISE_SHARE_PATH
- bash scripts/waitForAlfrescoToStart.sh
script:
- echo "Enterprise UI Tests ..."
- name: "Source Clear Scan (SCA)"
stage: Security Scans
script:
- echo "Source Clear Scan (SCA)"
- name: "Static Analysis (SAST)"
stage: Security Scans
script:
- echo "Static Analysis (SAST)"
- name: "Community Release"
stage: Release
script:
- echo "Community Release"
- name: "Enterprise Release"
stage: Release
script:
- echo "Enterprise Release"
- name: "Copy to S3 Release Bucket"
stage: Publish
script:
- echo "Copy to S3 Release Bucket"

11
pom.xml
View File

@@ -4,7 +4,7 @@
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services</artifactId>
<packaging>pom</packaging>
<version>3.2.0.1</version>
<version>3.2.0.4</version>
<name>Alfresco Governance Services</name>
<url>http://www.alfresco.org/</url>
@@ -15,10 +15,10 @@
</organization>
<scm>
<connection>scm:git:https://git.alfresco.com/records-management/records-management.git</connection>
<developerConnection>scm:git:https://git.alfresco.com/records-management/records-management.git</developerConnection>
<url>https://git.alfresco.com/records-management/records-management</url>
<tag>V3.2.0.1</tag>
<connection>scm:git:ssh://git@github.com/Alfresco/governance-services.git</connection>
<developerConnection>scm:git:ssh://git@github.com/Alfresco/governance-services.git</developerConnection>
<url>scm:git:ssh://git@github.com/Alfresco/governance-services.git</url>
<tag>V3.2.0.4</tag>
</scm>
<issueManagement>
@@ -468,6 +468,7 @@
<id>start</id>
<phase>pre-integration-test</phase>
<goals>
<goal>stop</goal>
<goal>start</goal>
</goals>
<configuration>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services</artifactId>
<version>3.2.0.1</version>
<version>3.2.0.4</version>
</parent>
<licenses>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation</artifactId>
<version>3.2.0.1</version>
<version>3.2.0.4</version>
</parent>
<properties>

View File

@@ -17,7 +17,7 @@ RM is split into two main parts - a repository integration and a Share integrati
### Artifacts and Guidance
* [Community Source Code](https://github.com/Alfresco/records-management)
* [Enterprise Source Code](https://gitlab.alfresco.com/records-management/records-management) (for partners and customers)
* [Enterprise Source Code](https://github.com/Alfresco/governance-services) (for partners and customers)
* [Community License](../LICENSE.txt)
* [Enterprise License](../../rm-enterprise/LICENSE.txt) (this file will only be present in clones of the Enterprise repository)
* [Issue Tracker Link](https://issues.alfresco.com/jira/projects/RM)

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services</artifactId>
<version>3.2.0.1</version>
<version>3.2.0.4</version>
</parent>
<licenses>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community</artifactId>
<version>3.2.0.1</version>
<version>3.2.0.4</version>
</parent>
<properties>

View File

@@ -407,13 +407,12 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
// if exists and matches we have found our group
if (isIPRGroupTrueMatch(group, authorities))
{
iprGroup = group;
break;
return new Pair<String, Integer>(group, nextGroupIndex);
}
}
// determine if there are any more pages to inspect
hasMoreItems = results.hasMoreItems();
hasMoreItems = hasMoreItems ? results.hasMoreItems() : false;
pageCount ++;
}
@@ -429,8 +428,15 @@ public class ExtendedSecurityServiceImpl extends ServiceBaseImpl
*/
private boolean isIPRGroupTrueMatch(String group, Set<String> authorities)
{
//Remove GROUP_EVERYONE for proper comparison as GROUP_EVERYONE is never included in an IPR group
Set<String> plainAuthorities = new HashSet<String>();
if (authorities != null)
{
plainAuthorities.addAll(authorities);
plainAuthorities.remove(PermissionService.ALL_AUTHORITIES);
}
Set<String> contained = authorityService.getContainedAuthorities(null, group, true);
return contained.equals(authorities);
return contained.equals(plainAuthorities);
}
/**

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community</artifactId>
<version>3.2.0.1</version>
<version>3.2.0.4</version>
</parent>
<properties>

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env bash
echo "Branch name: ${TRAVIS_BRANCH}"
echo "Pull request: ${TRAVIS_PULL_REQUEST}"
echo "Travis job name: ${TRAVIS_JOB_NAME}"
branchName=${TRAVIS_BRANCH}
imageTag=${branchName:8}
echo "Image tag: ${imageTag}"
if [[ ${TRAVIS_JOB_NAME} == "Build AGS Enterprise" ]];
then
export BUILD_PROFILE="internal"
else
export BUILD_PROFILE="master"
fi
if [[ "${TRAVIS_BRANCH}" == "master" && "${TRAVIS_PULL_REQUEST}" == "false" ]];
then
export MAVEN_PHASE="deploy"
export IMAGE_TAG="latest"
elif [[ ${TRAVIS_BRANCH} = release* && "${TRAVIS_PULL_REQUEST}" == "false" ]];
then
export MAVEN_PHASE="deploy"
export IMAGE_TAG="${imageTag}-latest"
else
export MAVEN_PHASE="verify"
export BUILD_PROFILE="buildDockerImage"
export IMAGE_TAG="latest"
fi

7
scripts/startAlfresco.sh Normal file
View File

@@ -0,0 +1,7 @@
#!/usr/bin/env bash
# fail script immediately on any errors in external commands and print the lines
set -ev
cd $1
docker login quay.io -u ${QUAY_USERNAME} -p ${QUAY_PASSWORD}
docker-compose up -d

10
travis-env-vars.yml Normal file
View File

@@ -0,0 +1,10 @@
env:
global:
- AUTOMATION_COMMUNITY_PATH=rm-automation/rm-automation-community-rest-api
- AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api
- AUTOMATION_UI_PATH=rm-automation/rm-automation-ui
- COMMUNITY_REPO_PATH=rm-community/rm-community-repo
- COMMUNITY_SHARE_PATH=rm-community/rm-community-share
- ENTERPRISE_REPO_PATH=rm-enterprise/rm-enterprise-repo
- ENTERPRISE_SHARE_PATH=rm-enterprise/rm-enterprise-share
- MVN_SKIP='-Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests'