From c1bca89ee8edc20e0fd672f1c12de7d0d881b87a Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 1 Jul 2020 12:51:57 +0300 Subject: [PATCH 01/22] test rmCommunityMirror travis file exclusion --- .travis.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index b59830c0c5..e69de29bb2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +0,0 @@ -language: java -jdk: - - oraclejdk8 -sudo: false -install: true -script: travis_wait 30 mvn -B clean verify -Dcommunity -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn From a23dd874b36c1089d8d08eb397183bf5a766eaa1 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 1 Jul 2020 13:52:59 +0300 Subject: [PATCH 02/22] test rmCommunityMirror travis file exclusion --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index e69de29bb2..c4f11b7cf6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -0,0 +1,3 @@ +language: java +jdk: + - oraclejdk8 \ No newline at end of file From b496bb9dba8b9eb425432485029053c18c10dc9f Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Wed, 1 Jul 2020 14:01:04 +0300 Subject: [PATCH 03/22] update travis.yml file only for testing rmCommunityMirror travis file exclusion --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index c4f11b7cf6..1dc8a16a5e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,3 +1,6 @@ language: java jdk: - - oraclejdk8 \ No newline at end of file + - oraclejdk8 +sudo: false +install: true +script: travis_wait 30 mvn -B clean verify -Dcommunity \ No newline at end of file From 4959dd9b22d2aeef1aea34a331c4b801be2c104f Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 13:14:03 +0300 Subject: [PATCH 04/22] fix java version and branches --- .travis.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4af431c811..b837905dfe 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,14 @@ dist: xenial sudo: required language: java jdk: - - oraclejdk8 + - openjdk8 branches: only: - - release/V2.7* - - feature-2.7/* - - merge-2.7/* - - hotfix-2.7/* + - /release\/V2.7.*/ + - /feature-2.7\/.*/ + - /merge-2.7\/.*/ + - /hotfix-2.7\/.*/ cache: directories: @@ -30,12 +30,12 @@ stages: jobs: include: - stage: Build AGS - - name: "Build Community" + name: "Build Community" - name: "Build Enterprise" - name: "Benchmark" - stage: Tests - - name: "Community Integrations Tests on MySQL" + name: "Community Integrations Tests on MySQL" - name: "Enterprise Integrations Tests on MySQL" - name: "Community Rest API Tests" - name: "Enterprise Rest API Tests" @@ -43,12 +43,12 @@ jobs: - name: "Enterprise UI Tests ..." - stage: Security Scans - - name: "Source Clear Scan (SCA)" + name: "Source Clear Scan (SCA)" - name: "Static Analysis (SAST)" - stage: Release - - name: "Community Release" + name: "Community Release" - name: "Enterprise Release" - stage: Publish - - name: "Copy to S3 Release Bucket" + name: "Copy to S3 Release Bucket" From caa006efbf73304c36f0e465c13949b23143abd9 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 13:20:10 +0300 Subject: [PATCH 05/22] set stages in jobs block --- .travis.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index b837905dfe..e803f38076 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,25 +30,25 @@ stages: jobs: include: - stage: Build AGS - name: "Build Community" + - name: "Build Community" - name: "Build Enterprise" - name: "Benchmark" - - stage: Tests - name: "Community Integrations Tests on MySQL" + stage: Tests + - name: "Community Integrations Tests on MySQL" - name: "Enterprise Integrations Tests on MySQL" - name: "Community Rest API Tests" - name: "Enterprise Rest API Tests" - name: "Community UI Tests ..." - name: "Enterprise UI Tests ..." - - stage: Security Scans - name: "Source Clear Scan (SCA)" + stage: Security Scans + - name: "Source Clear Scan (SCA)" - name: "Static Analysis (SAST)" - - stage: Release - name: "Community Release" + stage: Release + - name: "Community Release" - name: "Enterprise Release" - - stage: Publish - name: "Copy to S3 Release Bucket" + stage: Publish + - name: "Copy to S3 Release Bucket" From 2b89e78872b2eba97b2890e129fa4fc001e392f1 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 13:27:21 +0300 Subject: [PATCH 06/22] set jobs --- .travis.yml | 48 +++++++++++++++++++++++++++++------------------- 1 file changed, 29 insertions(+), 19 deletions(-) diff --git a/.travis.yml b/.travis.yml index e803f38076..a122fb5ec6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,26 +29,36 @@ stages: jobs: include: - - stage: Build AGS - - name: "Build Community" - - name: "Build Enterprise" - - name: "Benchmark" + - name: "Build Community" + stage: Build AGS - stage: Tests - - name: "Community Integrations Tests on MySQL" - - name: "Enterprise Integrations Tests on MySQL" - - name: "Community Rest API Tests" - - name: "Enterprise Rest API Tests" - - name: "Community UI Tests ..." - - name: "Enterprise UI Tests ..." + - name: "Build Enterprise" + stage: Build AGS + - name: "Benchmark" + stage: Build AGS - stage: Security Scans - - name: "Source Clear Scan (SCA)" - - name: "Static Analysis (SAST)" + - name: "Community Integrations Tests on MySQL" + stage: Tests + - name: "Enterprise Integrations Tests on MySQL" + stage: Tests + - name: "Community Rest API Tests" + stage: Tests + - name: "Enterprise Rest API Tests" + stage: Tests + - name: "Community UI Tests ..." + stage: Tests + - name: "Enterprise UI Tests ..." + stage: Tests - stage: Release - - name: "Community Release" - - name: "Enterprise Release" + - name: "Source Clear Scan (SCA)" + stage: Security Scans + - name: "Static Analysis (SAST)" + stage: Security Scans - stage: Publish - - name: "Copy to S3 Release Bucket" + - name: "Community Release" + stage: Release + - name: "Enterprise Release" + stage: Release + + - name: "Copy to S3 Release Bucket" + stage: Publish From b6ec87146ff12869bbb65971d90f73451c06748f Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 13:38:09 +0300 Subject: [PATCH 07/22] set jobs --- .travis.yml | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a122fb5ec6..4b0ccdbaf0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -31,34 +31,61 @@ jobs: include: - name: "Build Community" stage: Build AGS - + script: + - echo "Build Community" - name: "Build Enterprise" stage: Build AGS + script: + - echo "Build Enterprise" - name: "Benchmark" stage: Build AGS + script: + - echo "Benchmark" - 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 + script: + - echo "Community Rest API Tests" - name: "Enterprise Rest API Tests" stage: Tests + script: + - echo "Enterprise Rest API Tests" - name: "Community UI Tests ..." stage: Tests + script: + - echo "Community UI Tests ..." - name: "Enterprise UI Tests ..." stage: Tests + 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" From 37b00b65c0b67264b5ad1cf2e43a55191d2193c5 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 13:40:09 +0300 Subject: [PATCH 08/22] remove if indent --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 4b0ccdbaf0..1185e56ecb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -22,7 +22,7 @@ before_cache: stages: - name: Build AGS - name: Tests - if: commit_message !~ /\[skip tests\]/ + if: commit_message !~ /\[skip tests\]/ - name: Security Scans - name: Release - name: Publish From 685d2cfbb2f2800f47d47e5e37a4e36e58030155 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 14:15:59 +0300 Subject: [PATCH 09/22] add maven settings xml --- .travis.settings.xml | 49 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .travis.settings.xml diff --git a/.travis.settings.xml b/.travis.settings.xml new file mode 100644 index 0000000000..16abcabbcc --- /dev/null +++ b/.travis.settings.xml @@ -0,0 +1,49 @@ + + + + alfresco-internal + + true + + + + alfresco-internal + + true + + + true + + Alfresco Internal Repository + https://artifacts.alfresco.com/nexus/content/groups/internal + + + + + alfresco-internal + Alfresco Internal Repository + https://artifacts.alfresco.com/nexus/content/groups/public + + + + + + + + + docker.io + ${env.DOCKERHUB_USERNAME} + ${env.DOCKERHUB_PASSWORD} + + + quay.io + ${env.QUAY_USERNAME} + ${env.QUAY_PASSWORD} + + + alfresco-internal + ${env.MAVEN_USERNAME} + ${env.MAVEN_PASSWORD} + + + From 1327c0643caf1d2a44b936c2451d86898b4965eb Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 14:16:48 +0300 Subject: [PATCH 10/22] add maven settings xml --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index 1185e56ecb..6a6b058eb1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,9 @@ stages: - name: Release - name: Publish +before_install: + - "cp .travis.settings.xml $HOME/.m2/settings.xml" + jobs: include: - name: "Build Community" From fe8ed274b102c34ef8cbef1d54a9bf67b1b0090d Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 14:41:48 +0300 Subject: [PATCH 11/22] skip first mvn install --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6a6b058eb1..07ec7805b6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,8 @@ cache: before_cache: - rm -rf $HOME/.m2/repository/org/alfresco/alfresco-rm* +install: skip + stages: - name: Build AGS - name: Tests From f745c97560fd7d475b4d3618edc4ab5e3f361af2 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 14:49:05 +0300 Subject: [PATCH 12/22] order keys --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 07ec7805b6..f0098cd403 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,8 @@ cache: before_cache: - rm -rf $HOME/.m2/repository/org/alfresco/alfresco-rm* +before_install: + - "cp .travis.settings.xml $HOME/.m2/settings.xml" install: skip stages: @@ -29,9 +31,6 @@ stages: - name: Release - name: Publish -before_install: - - "cp .travis.settings.xml $HOME/.m2/settings.xml" - jobs: include: - name: "Build Community" From 19177c2e0218e825e26aacb18c7303b47ada73c5 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 15:08:23 +0300 Subject: [PATCH 13/22] add stage for pre-download all dependencies to cache --- .travis.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index f0098cd403..1ee0dbb04d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,9 +21,10 @@ before_cache: before_install: - "cp .travis.settings.xml $HOME/.m2/settings.xml" -install: skip +#install: skip stages: + - name: Prepare - name: Build AGS - name: Tests if: commit_message !~ /\[skip tests\]/ @@ -33,6 +34,9 @@ stages: jobs: include: + - name: "Pre-download all dependencies to cache without building" + stage: Prepare + script: mvn dependency:go-offline - name: "Build Community" stage: Build AGS script: From 19df45a4b01901832d64143a58d9229c7bca385f Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 15:27:37 +0300 Subject: [PATCH 14/22] test that dependencies aren't downloaded in stage 2 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1ee0dbb04d..e3f213d069 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,7 +40,7 @@ jobs: - name: "Build Community" stage: Build AGS script: - - echo "Build Community" + - mvn clean install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests - name: "Build Enterprise" stage: Build AGS script: From 4c80f29521f3b1b4804fbd5e6ec8f826b70d0eec Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 15:32:56 +0300 Subject: [PATCH 15/22] removed deprecated key sudo --- .travis.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index e3f213d069..2681a9f872 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,5 @@ os: linux dist: xenial -sudo: required language: java jdk: - openjdk8 @@ -21,7 +20,7 @@ before_cache: before_install: - "cp .travis.settings.xml $HOME/.m2/settings.xml" -#install: skip +install: skip stages: - name: Prepare From a22248c002421824af1d0ee8cbf12fa97c697561 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 15:45:54 +0300 Subject: [PATCH 16/22] add other repositories --- .travis.settings.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.travis.settings.xml b/.travis.settings.xml index 16abcabbcc..b08ca45199 100644 --- a/.travis.settings.xml +++ b/.travis.settings.xml @@ -22,8 +22,18 @@ 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 + @@ -45,5 +55,10 @@ ${env.MAVEN_USERNAME} ${env.MAVEN_PASSWORD} + + alfresco-private + ${env.MAVEN_USERNAME} + ${env.MAVEN_PASSWORD} + From 4fb4279b81711a10fe18922def7274164aa77c93 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 16:00:19 +0300 Subject: [PATCH 17/22] Use mvn dependency:resolve --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 2681a9f872..9755c691db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ jobs: include: - name: "Pre-download all dependencies to cache without building" stage: Prepare - script: mvn dependency:go-offline + script: mvn dependency:resolve - name: "Build Community" stage: Build AGS script: From 2a7881fc0fc3efeff536919fbbc0bc8074b8d17d Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 16:13:08 +0300 Subject: [PATCH 18/22] Use mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:collect --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 9755c691db..cfd818c38f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ jobs: include: - name: "Pre-download all dependencies to cache without building" stage: Prepare - script: mvn dependency:resolve + script: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:collect - name: "Build Community" stage: Build AGS script: From 144d3fb6b9514ca7a483c13f6dcd8bd39f635a0c Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 16:25:13 +0300 Subject: [PATCH 19/22] Use dependency:go-offline -DexcludeTransitive=true --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index cfd818c38f..223a7f4bbd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ jobs: include: - name: "Pre-download all dependencies to cache without building" stage: Prepare - script: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:collect + script: mvn dependency:go-offline -DexcludeTransitive=true - name: "Build Community" stage: Build AGS script: From 339fcac4e6d92b13eeccdfa94f1d1a3e2681d07d Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 16:59:31 +0300 Subject: [PATCH 20/22] Revert "Use dependency:go-offline -DexcludeTransitive=true" This reverts commit 144d3fb6 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 223a7f4bbd..cfd818c38f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,7 +35,7 @@ jobs: include: - name: "Pre-download all dependencies to cache without building" stage: Prepare - script: mvn dependency:go-offline -DexcludeTransitive=true + script: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:collect - name: "Build Community" stage: Build AGS script: From 358a1d8a6f87301780a2110a055db8b783139e9f Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Thu, 2 Jul 2020 18:04:32 +0300 Subject: [PATCH 21/22] removed the prepare stage because next stage fails with message "Negative seek offset" that indicates a corrupt download --- .travis.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.travis.yml b/.travis.yml index cfd818c38f..5bebe6cd60 100644 --- a/.travis.yml +++ b/.travis.yml @@ -23,7 +23,6 @@ before_install: install: skip stages: - - name: Prepare - name: Build AGS - name: Tests if: commit_message !~ /\[skip tests\]/ @@ -33,13 +32,10 @@ stages: jobs: include: - - name: "Pre-download all dependencies to cache without building" - stage: Prepare - script: mvn org.apache.maven.plugins:maven-dependency-plugin:3.1.2:collect - name: "Build Community" stage: Build AGS script: - - mvn clean install -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -DskipTests + - echo "Build Community" - name: "Build Enterprise" stage: Build AGS script: From 2bfee83d7bdc4c4541eece09538da0513a7d93e1 Mon Sep 17 00:00:00 2001 From: Claudia Agache Date: Fri, 3 Jul 2020 09:16:29 +0300 Subject: [PATCH 22/22] code review comments --- .travis.settings.xml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.travis.settings.xml b/.travis.settings.xml index b08ca45199..3c61da4f43 100644 --- a/.travis.settings.xml +++ b/.travis.settings.xml @@ -38,18 +38,12 @@ - docker.io ${env.DOCKERHUB_USERNAME} ${env.DOCKERHUB_PASSWORD} - - quay.io - ${env.QUAY_USERNAME} - ${env.QUAY_PASSWORD} - alfresco-internal ${env.MAVEN_USERNAME}