diff --git a/.travis.settings.xml b/.travis.settings.xml index e60b0e0c4c..0fd5d8eb68 100644 --- a/.travis.settings.xml +++ b/.travis.settings.xml @@ -6,6 +6,15 @@ true + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + alfresco-internal @@ -19,21 +28,23 @@ + + central + Central Repository + https://repo.maven.apache.org/maven2 + default + + false + + + never + + alfresco-internal Alfresco Internal Repository - https://artifacts.alfresco.com/nexus/content/groups/internal - - - alfresco-public - Alfresco Public Repository https://artifacts.alfresco.com/nexus/content/groups/public - - alfresco-private - Alfresco Private Repository - https://artifacts.alfresco.com/nexus/content/groups/private - @@ -55,7 +66,7 @@ ${env.MAVEN_PASSWORD} - alfresco-private + alfresco-public ${env.MAVEN_USERNAME} ${env.MAVEN_PASSWORD} diff --git a/.travis.yml b/.travis.yml index 887038834c..9827c05550 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,7 +42,6 @@ stages: - name: Build AGS - name: Tests if: commit_message !~ /\[skip tests\]/ - - name: Security Scans - name: Release if: fork = false AND (branch = master OR branch =~ /release\/.*/) AND type != pull_request AND commit_message =~ /\[(community|enterprise) release .*\]/ - name: Publish @@ -72,11 +71,3 @@ jobs: before_script: source scripts/setUpMavenPhase.sh 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: "Source Clear Scan (SCA)" - stage: Security Scans - script: travis_wait 30 bash scripts/source_clear.sh - - name: "Static Analysis (SAST)" - stage: Security Scans - script: - - echo "Static Analysis (SAST)" diff --git a/README.md b/README.md index 1be9cc9782..970ebe6346 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,22 @@ ## Contributing Please refer to our [How to contribute](/CONTRIBUTING.md) guide and our [Contributor Covenant Code of Conduct](/CODE_OF_CONDUCT.md). +## Configuring the ~/.m2/settings.xml file for local development +In order to be able to pull all the necessary project dependencies, the alfresco Maven +repositories should be configured in your local `~/.m2/settings.xml` file on your workstation. + +The necessary `` and `` configuration is available in the +[.travis.settings.xml](.travis.settings.xml) file (_alfresco-internal_ profile), +which is used by the project 's CI pipeline. +Just copy the **alfresco-internal** profile into your own `~/m2/repository.xml`. +You will also need to define an `alfresco-internal` server, but with your own Alfresco Nexus +credentials. + +For additional instructions you can check the official Maven documentation: +* [setting up repositories](https://maven.apache.org/guides/mini/guide-multiple-repositories.html) +* [setting up servers](https://maven.apache.org/settings.html#servers) +* [password encryption](https://maven.apache.org/guides/mini/guide-encryption.html) + ## Configuring and starting Alfresco/Share * Clone the project (e.g. `git clone git@github.com:Alfresco/governance-services.git`) * Import the project as a maven project diff --git a/pom.xml b/pom.xml index 3e3cd228fd..551a2dc363 100644 --- a/pom.xml +++ b/pom.xml @@ -34,42 +34,6 @@ 3.3.9 - - - alfresco-internal - Alfresco Internal Repository - https://artifacts.alfresco.com/nexus/content/groups/internal/ - - - alfresco-public - https://artifacts.alfresco.com/nexus/content/groups/public - - - alfresco-public-snapshots - https://artifacts.alfresco.com/nexus/content/groups/public-snapshots - - - - - - alfresco-private - Alfresco Internal Repository - https://artifacts.alfresco.com/nexus/content/groups/private - - - alfresco-public - https://artifacts.alfresco.com/nexus/content/groups/public - - - alfresco-plugin-public - https://artifacts.alfresco.com/nexus/content/groups/public - - - alfresco-plugin-public-snapshots - https://artifacts.alfresco.com/nexus/content/groups/public-snapshots - - - alfresco-internal @@ -98,18 +62,6 @@ rm-automation rm-benchmark - - - alfresco-internal - https://artifacts.alfresco.com/nexus/content/groups/private - - - - - alfresco-private - https://artifacts.alfresco.com/nexus/content/groups/private - - diff --git a/travis/.travis.tests-stage.yml b/travis/.travis.tests-stage.yml index c774080e8d..f5afdff84c 100644 --- a/travis/.travis.tests-stage.yml +++ b/travis/.travis.tests-stage.yml @@ -11,7 +11,7 @@ jobs: target_paths: $TRAVIS_BUILD_NUMBER/$TRAVIS_JOB_NUMBER install: - | - if [[ ${TRAVIS_BRANCH} == *community* ]]; then + if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-community-repo -am else travis_retry travis_wait 90 mvn -B -q install $MVN_SKIP -PbuildDockerImage -pl :alfresco-governance-services-enterprise-repo -am @@ -19,7 +19,7 @@ jobs: - travis_retry travis_wait 30 mvn -B -U -q clean install ${MVN_SKIP} -pl :alfresco-governance-services-automation-community-rest-api -am before_script: - | - if [[ ${TRAVIS_BRANCH} == *community* ]]; then + if [[ ${TRAVIS_COMMIT_MESSAGE} == *"[tests on community]"* ]]; then bash scripts/startAlfresco.sh $COMMUNITY_REPO_PATH false else bash scripts/startAlfresco.sh $ENTERPRISE_REPO_PATH false @@ -30,6 +30,7 @@ jobs: - name: "Enterprise Rest API Tests" stage: Tests + if: commit_message !~ /\[tests on community\]/ addons: artifacts: paths: @@ -51,6 +52,7 @@ jobs: - name: "Enterprise Rest API WORM Tests" stage: Tests + if: commit_message !~ /\[tests on community\]/ addons: artifacts: paths: @@ -72,6 +74,7 @@ jobs: - name: "Enterprise Rest API Cluster Tests" stage: Tests + if: commit_message !~ /\[tests on community\]/ addons: artifacts: paths: @@ -206,3 +209,8 @@ jobs: after_script: - bash scripts/getLogs.sh - bash scripts/cleanup.sh + + - name: "Source Clear Scan (SCA)" + stage: Tests + if: branch = master OR branch =~ /release\/V3.\d+.*/ + script: travis_wait 30 bash scripts/source_clear.sh