Compare commits

...

142 Commits

Author SHA1 Message Date
alfresco-build
b461f384ff [maven-release-plugin][skip ci] prepare release 20.41-DEV 2022-12-14 12:03:22 +00:00
Damian.Ujma@hyland.com
9ed4658d69 ACS-3841 Test releasing & updating downstream 2022-12-14 12:39:32 +01:00
Damian.Ujma@hyland.com
0f4d2a8e28 ACS-3841 Test releasing & updating downstream 2022-12-14 12:37:47 +01:00
Damian.Ujma@hyland.com
bc1197cc46 ACS-3841 Test releasing & updating downstream 2022-12-14 12:33:11 +01:00
Damian.Ujma@hyland.com
d07a47d088 ACS-3841 Set continue-on-error [tas][db][ags] 2022-12-14 10:47:11 +01:00
Damian.Ujma@hyland.com
94cb9de79b ACS-3841 Fix tests [tas][db][ags] 2022-12-14 08:52:47 +01:00
Damian.Ujma@hyland.com
841735491d ACS-3841 Improve conditions [tas][db][ags] 2022-12-13 16:54:01 +01:00
Damian.Ujma@hyland.com
42e29d95de ACS-3841 Improve conditions [tas][db][ags] 2022-12-13 16:51:59 +01:00
Damian.Ujma@hyland.com
5749a1a67a ACS-3841 Improve maven_release.sh 2022-12-12 10:37:09 +01:00
Damian.Ujma@hyland.com
9dce05cb5b Merge branch 'master' into feature/ACS-3841_migrate_to_gha 2022-12-12 10:28:02 +01:00
Damian.Ujma@hyland.com
f06f2edaa1 ACS-3841 Rename directory [db][tas][db][ags][ags on MySQL] 2022-12-05 17:02:19 +01:00
Damian.Ujma@hyland.com
24e685b70e ACS-3841 Set preserve-order to false [ags] 2022-12-05 15:06:24 +01:00
Damian.Ujma@hyland.com
e603f7882f ACS-3841 Revert ubuntu version for ags rest api test [ags] 2022-12-05 10:23:04 +01:00
Damian.Ujma@hyland.com
683e73e687 ACS-3841 Add the license header [ags] 2022-12-05 09:51:35 +01:00
Damian.Ujma@hyland.com
15fe18ca9f ACS-3841 Run on ubuntu-18.04 [ags] 2022-12-05 09:43:52 +01:00
Damian.Ujma@hyland.com
ce47b25fd8 ACS-3841 Test AlphabeticallyPriorityInterceptor [ags] 2022-12-05 09:31:23 +01:00
Damian.Ujma@hyland.com
cc3d965414 Revert "ACS-3841 Test without records [ags]"
This reverts commit 9ee412df04.
2022-12-01 10:17:44 +01:00
Damian.Ujma@hyland.com
9ee412df04 ACS-3841 Test without records [ags] 2022-11-28 17:14:10 +01:00
Damian.Ujma@hyland.com
e9a0a31c84 ACS-3841 Reverse tests order [ags] 2022-11-28 16:29:07 +01:00
Damian.Ujma@hyland.com
7dd8aef46c ACS-3841 Reverse tests order [ags] 2022-11-28 16:26:08 +01:00
Damian.Ujma@hyland.com
4e14c2cbd7 ACS-3841 Fix test order [db][tas][db][ags][ags on MySQL] 2022-11-28 14:57:41 +01:00
Damian.Ujma@hyland.com
b618ea7e06 ACS-3841 Fix condition [db][tas][db][ags][ags on MySQL] 2022-11-25 16:27:21 +01:00
Damian.Ujma@hyland.com
f67a08c7e3 ACS-3841 Improve jobs conditions [db][tas][db][ags][ags on MySQL] 2022-11-25 16:13:33 +01:00
Damian.Ujma@hyland.com
1a3d59dfa1 ACS-3841 Fix steps [db][tas][db][ags][ags on MySQL] 2022-11-25 13:26:11 +01:00
Damian.Ujma@hyland.com
1b6d8af497 ACS-3841 Fix custom action [db][tas][db][ags][ags on MySQL] 2022-11-25 13:23:45 +01:00
Damian.Ujma@hyland.com
c4c910b13e Revert "ACS-3841 Remove useless var [db][tas][db][ags][ags on MySQL]" 2022-11-25 13:21:57 +01:00
Damian.Ujma@hyland.com
e9af1baa86 ACS-3841 Test 2022-11-25 13:20:42 +01:00
Damian.Ujma@hyland.com
7927c7a119 ACS-3841 Test 2022-11-25 13:19:40 +01:00
Damian.Ujma@hyland.com
3a5c47babb ACS-3841 Test 2022-11-25 13:18:19 +01:00
Damian.Ujma@hyland.com
7f6c503434 ACS-3841 Remove useless var [db][tas][db][ags][ags on MySQL] 2022-11-25 13:17:04 +01:00
Damian.Ujma@hyland.com
18acbf65dc ACS-3841 Use custom actions to setup build tools [db][tas][db][ags][ags on MySQL] 2022-11-25 13:08:32 +01:00
Damian.Ujma@hyland.com
50b7d83495 ACS-3841 Remove travis references 2022-11-25 09:38:15 +01:00
Damian.Ujma@hyland.com
c9f64210e4 ACS-3841 Remove quay login step [db][tas][db][ags][ags on MySQL] 2022-11-24 16:27:38 +01:00
Damian.Ujma@hyland.com
4bbf264cdc ACS-3841 Fix remote-api tests [db][tas][db][ags][ags on MySQL] 2022-11-24 15:57:29 +01:00
Damian.Ujma@hyland.com
7c21ec298d ACS-3841 Fix remote-api tests [db][tas][db][ags][ags on MySQL] 2022-11-24 15:47:07 +01:00
Damian.Ujma@hyland.com
85d7fccf11 ACS-3841 Test [db][tas][db][ags][ags on MySQL] 2022-11-24 13:57:07 +01:00
Damian.Ujma@hyland.com
e51457d535 ACS-3841 Test [db][tas][db][ags][ags on MySQL] 2022-11-23 16:27:18 +01:00
Damian.Ujma@hyland.com
f5bbdd7ead ACS-3841 Fix syntax [tas] 2022-11-23 14:39:55 +01:00
Damian.Ujma@hyland.com
8885e91a58 ACS-3841 Fix syntax [tas] 2022-11-23 14:33:28 +01:00
Damian.Ujma@hyland.com
d652244292 ACS-3841 Test Remote-api-AppContextTestSuites + [tas] 2022-11-23 14:19:32 +01:00
Damian.Ujma@hyland.com
f04ca4b77f ACS-3841 Fix transformers tag 2022-11-23 12:22:02 +01:00
Damian.Ujma@hyland.com
ad2b107afd ACS-3841 Fix transformers tag 2022-11-23 12:12:32 +01:00
Damian.Ujma@hyland.com
75f68c612e ACS-3841 Fix internal script 2022-11-23 12:05:06 +01:00
Damian.Ujma@hyland.com
d3ff57bffc ACS-3841 Fix matrix strategy vars 2022-11-23 11:34:29 +01:00
Damian.Ujma@hyland.com
82efc2e564 ACS-3841 Add mariadb matrix tests 2022-11-23 10:38:17 +01:00
Damian.Ujma@hyland.com
af3e6f6009 ACS-3841 Test a matrix strategy 2022-11-23 10:00:06 +01:00
Damian.Ujma@hyland.com
457bb5b469 ACS-3841 Test a matrix strategy 2022-11-23 09:36:46 +01:00
Damian.Ujma@hyland.com
0f70ac9eba ACS-3841 Test a matrix strategy 2022-11-23 09:31:40 +01:00
Damian.Ujma@hyland.com
2bff9eeb00 Revert "ACS-3465 Redefine the tests order"
This reverts commit 670ff0de10.
2022-11-22 10:30:30 +01:00
Damian.Ujma@hyland.com
46b3021541 ACS-3841 Rename the ci scripts directory 2022-11-22 10:30:20 +01:00
Damian.Ujma@hyland.com
614884a4f6 ACS-3841 Fix step env 2022-11-21 17:21:04 +01:00
Damian.Ujma@hyland.com
615759f148 ACS-3841 Create docker-compose for dbs 2022-11-21 17:01:21 +01:00
Damian.Ujma@hyland.com
d323e7e3aa ACS-3841 Fix postgres port 2022-11-21 16:20:31 +01:00
Damian.Ujma@hyland.com
fee2a75049 Merge branch 'master' into feature/ACS-3841_migrate_to_gha 2022-11-21 16:11:39 +01:00
Damian.Ujma@hyland.com
35b2d64876 ACS-3841 Fix docker-compose 2022-11-21 15:37:18 +01:00
Damian.Ujma@hyland.com
115260470c ACS-3841 Fix docker-compose 2022-11-21 15:29:15 +01:00
Damian.Ujma@hyland.com
16727dce57 ACS-3841 Test cache local Maven 2022-11-21 14:58:18 +01:00
Damian.Ujma@hyland.com
670ff0de10 ACS-3465 Redefine the tests order 2022-09-02 08:54:03 +02:00
Damian.Ujma@hyland.com
e93ea3bcce ACS-3465 Fix 'needs' section 2022-09-01 13:39:58 +02:00
Damian.Ujma@hyland.com
f70743ed33 ACS-3465 Add required global env variables 2022-09-01 10:44:14 +02:00
Damian.Ujma@hyland.com
95ba57d06f Merge branch 'feature/ACS-3465_migrating_to_gh_actions' of github.com:Alfresco/alfresco-community-repo into feature/ACS-3465_migrating_to_gh_actions 2022-09-01 10:38:05 +02:00
Damian.Ujma@hyland.com
cb165c67b1 ACS-3465 Remove unnecessary conditions 2022-09-01 10:37:43 +02:00
mikolajbrzezinski
ca276a9e82 fix ifs 2022-09-01 10:11:24 +02:00
Damian.Ujma@hyland.com
c7f6e876dd ACS-3465 Add jobs names 2022-09-01 09:55:22 +02:00
Damian.Ujma@hyland.com
b6131b3dd3 ACS-3465 Revert changes in build.sh 2022-08-31 16:28:12 +02:00
Damian.Ujma@hyland.com
54b96280fc ACS-3465 Add a dependency to AGS-Community-Rest-API-Tests 2022-08-31 16:13:47 +02:00
Damian.Ujma@hyland.com
48fa7748f1 ACS-3465 Fix on.push.branches 2022-08-31 16:12:53 +02:00
Damian.Ujma@hyland.com
5f6795eff0 Merge branch 'feature/ACS-3465_migrating_to_gh_actions_du' of github.com:Alfresco/alfresco-community-repo into feature/ACS-3465_migrating_to_gh_actions_du
 Conflicts:
	.github/workflows/ci.yml
2022-08-31 16:11:00 +02:00
Damian.Ujma@hyland.com
e9c87493d0 ACS-3465 Add a condition for AGS-Community-Rest-API-Tests 2022-08-31 16:06:06 +02:00
Damian.Ujma@hyland.com
440582d176 ACS-3465 Remove maven version forcing 2022-08-31 16:01:21 +02:00
Damian.Ujma@hyland.com
9353865c25 Merge branch 'feature/ACS-3465_migrating_to_gh_actions' into feature/ACS-3465_migrating_to_gh_actions_du
# Conflicts:
#	.github/workflows/ci.yml
2022-08-31 16:00:41 +02:00
Damian.Ujma@hyland.com
f58ca49b06 ACS-3465 Add AGS-Community-Rest-API-Tests 2022-08-31 15:58:09 +02:00
Damian.Ujma@hyland.com
f6382f28d3 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-31 15:19:50 +02:00
Damian.Ujma@hyland.com
50652a4fab Revert "ACS-3465 Increase timeout AGS-Community-Rest-API-Tests"
This reverts commit d6fb3814ab.
2022-08-31 15:16:53 +02:00
mikolajbrzezinski
93adf7515a fix ifs 2022-08-31 15:08:56 +02:00
Damian.Ujma@hyland.com
d6fb3814ab ACS-3465 Increase timeout AGS-Community-Rest-API-Tests 2022-08-31 14:39:31 +02:00
mikolajbrzezinski
93c1ee9cbf add ifs 2022-08-31 13:48:53 +02:00
Damian.Ujma@hyland.com
5c82775afb ACS-3465 Force Maven 3.5.4 for AGS-Community-Rest-API-Tests 2022-08-31 12:40:18 +02:00
Damian.Ujma@hyland.com
3535801e5c ACS-3465 Fix AGS-Community-Rest-API-Tests 2022-08-31 09:52:33 +02:00
Damian.Ujma@hyland.com
9d537e6158 ACS-3465 Fix merging 2022-08-30 16:38:56 +02:00
Damian.Ujma@hyland.com
f783d4bbc1 Merge branch 'feature/ACS-3465_migrating_to_gh_actions_du' of github.com:Alfresco/alfresco-community-repo into feature/ACS-3465_migrating_to_gh_actions_du
 Conflicts:
	.github/workflows/ci.yml
	scripts/gh-actions/maven_release.sh
2022-08-30 16:29:40 +02:00
Damian.Ujma@hyland.com
ff18fba533 ACS-3465 Add AGS-Community-Rest-API-Tests, Push-to-Nexus, Update-downstream jobs
ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test script execution

ACS-3465 Increase SearchRecordsTests timeout

ACS-3465 Make a script executable

ACS-3465 Test script execution

ACS-3465 Fix build step in AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests

ACS-3465 Test AGS-Community-Rest-API-Tests
2022-08-30 16:28:53 +02:00
Damian.Ujma@hyland.com
a093a10484 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-30 09:49:12 +02:00
mikolajbrzezinski
f9ca64bb51 fix requires local images 2022-08-30 09:38:04 +02:00
Damian.Ujma@hyland.com
08cbc94ee7 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-30 09:21:02 +02:00
mikolajbrzezinski
22b9179961 cleanup 2022-08-29 17:10:08 +02:00
Damian.Ujma@hyland.com
eec1596872 ACS-3465 Test script execution 2022-08-29 16:12:37 +02:00
Damian.Ujma@hyland.com
ffe31c2a6a ACS-3465 Increase SearchRecordsTests timeout 2022-08-29 15:51:15 +02:00
Damian.Ujma@hyland.com
da4bd743e1 ACS-3465 Make a script executable 2022-08-29 15:28:03 +02:00
Damian.Ujma@hyland.com
b1f4b5fa93 ACS-3465 Test script execution 2022-08-29 14:36:04 +02:00
mikolajbrzezinski
f166fef906 fix require local images 2022-08-29 14:14:14 +02:00
mikolajbrzezinski
29470674ce fix remote api 2 2022-08-29 14:05:40 +02:00
mikolajbrzezinski
9eefea8904 fix 2022-08-29 13:50:44 +02:00
Damian.Ujma@hyland.com
01a4b7886b ACS-3465 Fix build step in AGS-Community-Rest-API-Tests 2022-08-29 13:44:33 +02:00
Damian.Ujma@hyland.com
79445d40fc ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-29 13:26:19 +02:00
Damian.Ujma@hyland.com
448687294d ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-29 13:25:42 +02:00
Damian.Ujma@hyland.com
56d374a915 ACS-3465 Test AGS-Community-Rest-API-Tests 2022-08-29 13:23:28 +02:00
mikolajbrzezinski
94b33bf7a9 no tag 2022-08-29 12:37:56 +02:00
mikolajbrzezinski
c53d71fc75 Revert "check with specific poms"
This reverts commit eff1ab0744.
2022-08-29 11:24:49 +02:00
mikolajbrzezinski
eff1ab0744 check with specific poms 2022-08-29 11:15:39 +02:00
mikolajbrzezinski
196e37e8d9 check more tests 2022-08-29 10:28:18 +02:00
mikolajbrzezinski
9886d4afe3 check with setting REQUIRES_LOCAL_IMAGES 2022-08-26 17:27:35 +02:00
mikolajbrzezinski
9105056738 check with setting REQUIRES_LOCAL_IMAGES 2022-08-26 17:27:06 +02:00
mikolajbrzezinski
a8484b3644 change verify 2022-08-26 16:54:29 +02:00
mikolajbrzezinski
e53377947e change verify 2022-08-26 16:20:21 +02:00
mikolajbrzezinski
77d67d4ed9 Revert "Change POM"
This reverts commit b5bd2be96e.
2022-08-26 16:15:40 +02:00
mikolajbrzezinski
b5bd2be96e Change POM 2022-08-26 16:13:09 +02:00
mikolajbrzezinski
770acdba38 Update env variables list 2022-08-26 15:46:27 +02:00
mikolajbrzezinski
1f3b024a28 Check with init 2022-08-26 15:20:15 +02:00
mikolajbrzezinski
bf72cbf0b0 Check simple bash command 2022-08-26 14:56:20 +02:00
mikolajbrzezinski
5c1ec44387 fix paths 2022-08-26 13:50:16 +02:00
mikolajbrzezinski
c536f53293 fix env variable 2022-08-26 12:15:03 +02:00
mikolajbrzezinski
b056e166cc Fix timeout and add step 2022-08-26 12:12:28 +02:00
mikolajbrzezinski
87bfcdbadd Check AGS 2022-08-26 11:25:55 +02:00
mikolajbrzezinski
62e09bd1ac Check AGS 2022-08-26 10:45:40 +02:00
mikolajbrzezinski
c9e7d798e5 Check rest api tas tests 2022-08-26 10:19:27 +02:00
mikolajbrzezinski
8762148a68 Clean up 2022-08-25 17:12:42 +02:00
mikolajbrzezinski
04af833ba6 Clean up 2022-08-25 17:11:44 +02:00
mikolajbrzezinski
5b6f56a2ef Clean up 2022-08-25 17:07:38 +02:00
mikolajbrzezinski
ea60259b36 Clean up 2022-08-25 16:25:46 +02:00
mikolajbrzezinski
a050488d8e Block veracode and add test suite 2022-08-25 16:19:46 +02:00
mikolajbrzezinski
0dde0315f1 Check veracode with fixes 2022-08-25 15:36:30 +02:00
mikolajbrzezinski
42da3ee691 Fix all Unit Tests Suite 2022-08-25 14:47:32 +02:00
mikolajbrzezinski
8d15375874 Fix transformers tag 2022-08-25 13:55:16 +02:00
mikolajbrzezinski
18a39ac0fd Fix transformers tag 2022-08-25 13:25:07 +02:00
mikolajbrzezinski
ad9bce3812 Fix transformers tag 2022-08-25 13:08:20 +02:00
mikolajbrzezinski
0401246d96 Check if can get the transformers tag 2022-08-25 12:42:04 +02:00
mikolajbrzezinski
bdce8a0329 check doker run job and veracode 2022-08-25 10:43:56 +02:00
mikolajbrzezinski
a4417a0ebf .travis.settings.xml 2022-08-25 10:03:25 +02:00
mikolajbrzezinski
905b34e64b travis.settings.xml 2022-08-25 09:55:23 +02:00
mikolajbrzezinski
a05c8c6634 Update 2022-08-24 18:10:56 +02:00
mikolajbrzezinski
8781d82216 change uses to run 2022-08-24 18:05:19 +02:00
mikolajbrzezinski
9be2a90f81 remove SRCCLR_API_TOKEN 2022-08-24 18:03:38 +02:00
mikolajbrzezinski
d56e53c0ef Add SRCCLR_API_TOKEN 2022-08-24 17:43:06 +02:00
mikolajbrzezinski
4ccb22acbb Try AllUnitTestsSuite 2022-08-24 17:31:34 +02:00
mikolajbrzezinski
f3c45a13dd try without transformers tag 2022-08-24 16:43:49 +02:00
mikolajbrzezinski
5f24b4c3cd add global variables and test veracode 2022-08-24 16:42:42 +02:00
mikolajbrzezinski
f7c07c30f5 add check-out 2022-08-24 16:03:24 +02:00
mikolajbrzezinski
a0ae0dd4ec Fix scripts path 2022-08-24 15:22:04 +02:00
mikolajbrzezinski
bbd7c46ddd Remove unnecesary action folder adn turn off travis for the branch 2022-08-24 15:19:13 +02:00
mikolajbrzezinski
87c0fa228e Change trigger and add clean cache to prepare 2022-08-24 14:03:19 +02:00
mikolajbrzezinski
72182f4ef5 Add skeleton 2022-08-23 19:13:05 +02:00
43 changed files with 792 additions and 234 deletions

557
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,557 @@
name: Alfresco Community Repo CI
on:
pull_request:
push:
branches:
# - feature/**
- fix/**
workflow_call:
workflow_dispatch:
env:
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }}
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60
LOG_WARN: "-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn"
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }}
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }}
TAS_ENVIRONMENT: ./packaging/tests/environment
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts
jobs:
prepare:
name: "Prepare"
runs-on: ubuntu-latest
if: >
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Prepare environment"
run: bash ./scripts/ci/prepare.sh
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
veracode:
name: "Source Clear Scan (SCA)"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name != 'pull_request') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- name: Cache local Maven repository
uses: actions/cache@v2
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- uses: Alfresco/alfresco-build-tools/.github/actions/veracode@master
with:
srcclr-api-token: ${{ secrets.SRCCLR_API_TOKEN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
all_unit_tests_suite:
name: "Core, Data-Model, Repository - AllUnitTestsSuite - Build and test"
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Run tests"
run: |
mvn -B test -pl core,data-model -am -DfailIfNoTests=false
mvn -B test -pl "repository,mmt" -am "-Dtest=AllUnitTestsSuite,AllMmtUnitTestSuite" -DfailIfNoTests=false
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
remote_api_app_context_test_suites:
name: Remote-api - ${{ matrix.testSuite }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
include:
- testSuite: AppContext01TestSuite
compose-profile: default
- testSuite: AppContext02TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext03TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext04TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContextExtraTestSuite
compose-profile: default
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Run tests"
run: mvn -B test -pl remote-api -Dtest=${{ matrix.testSuite }} -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_mariadb_tests:
name: Repository - MariaDB ${{ matrix.version }} tests
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) &&
github.event_name != 'pull_request' &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
version: ['10.2.18', '10.4', '10.5']
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: ${{ matrix.version }}
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_mariadb_10_6_tests:
name: "Repository - MariaDB 10.6 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
env:
MARIADB_VERSION: 10.6
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.name=alfresco -Ddb.url=jdbc:mariadb://localhost:3307/alfresco?useUnicode=yes\&characterEncoding=UTF-8 -Ddb.username=alfresco -Ddb.password=alfresco -Ddb.driver=org.mariadb.jdbc.Driver
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_mysql_tests:
name: Repository - MySQL 8 tests
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request') &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mysql up -d
env:
MYSQL_VERSION: 8
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=com.mysql.jdbc.Driver -Ddb.name=alfresco -Ddb.url=jdbc:mysql://localhost:3307/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_13_7_tests:
name: "Repository - PostgreSQL 13.7 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) || github.event_name != 'pull_request' &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 10.6
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_postgresql_14_4_tests:
name: "Repository - PostgreSQL 14.4 tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/')) && github.event_name != 'pull_request' &&
! contains(github.event.head_commit.message, '[skip db]')) ||
contains(github.event.head_commit.message, '[latest db]') ||
contains(github.event.head_commit.message, '[db]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile postgres up -d
env:
POSTGRES_VERSION: 14.4
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=AllDBTestsTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_messaging_tests:
name: Repository - Messaging tests
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile activemq up -d
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=CamelRoutesTest,CamelComponentsTest -DfailIfNoTests=false
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
repository_app_context_test_suites:
name: Repository - ${{ matrix.testSuite }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
include:
- testSuite: AppContext01TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext02TestSuite
compose-profile: default
- testSuite: AppContext03TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext04TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContext05TestSuite
compose-profile: default
parameters: '"-Didentity-service.auth-server-url=http://${HOST_IP}:8999/auth"'
- testSuite: AppContext06TestSuite
compose-profile: with-transform-core-aio
- testSuite: AppContextExtraTestSuite
compose-profile: with-transform-core-aio
- testSuite: MiscContextTestSuite
compose-profile: with-transform-core-aio
- testSuite: SearchTestSuite
compose-profile: default
parameters: '-Dindex.subsystem.name=solr6'
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up IDS"
run: |
if [ "${{ matrix.testSuite }}" == 'AppContext05TestSuite' ];
then
mkdir -p "${HOME}/tmp"
cp repository/src/test/resources/realms/alfresco-realm.json "${HOME}/tmp"
echo "HOST_IP=$(hostname -I | cut -f1 -d' ')" >> $GITHUB_ENV
docker run -d -e KEYCLOAK_USER=admin -e KEYCLOAK_PASSWORD=admin -e DB_VENDOR=h2 -p 8999:8080 -e KEYCLOAK_IMPORT=/tmp/alfresco-realm.json -v $HOME/tmp/alfresco-realm.json:/tmp/alfresco-realm.json alfresco/alfresco-identity-service:1.2
fi
- name: "Set transformers tag"
run: echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile ${{ matrix.compose-profile }} up -d
- name: "Run tests"
run: mvn -B test -pl repository -am -Dtest=${{ matrix.testSuite }} -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco ${{ matrix.parameters }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
tas-tests:
name: ${{ matrix.test-name }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip tas]')) ||
contains(github.event.head_commit.message, '[tas]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
include:
- test-name: "REST API TAS tests part1"
pom-dir: tas-restapi
test-profile: run-restapi-part1
- test-name: "REST API TAS tests part2"
pom-dir: tas-restapi
test-profile: run-restapi-part2
- test-name: "REST API TAS tests part3"
pom-dir: tas-restapi
test-profile: run-restapi-part3
- test-name: "CMIS TAS tests - BROWSER binding"
pom-dir: tas-cmis
test-profile: run-cmis-browser
- test-name: "CMIS TAS tests - ATOM binding"
pom-dir: tas-cmis
test-profile: run-cmis-atom
- test-name: "CMIS TAS tests - WEBSERVICES binding"
pom-dir: tas-cmis
test-profile: run-cmis-webservices
- test-name: "Email TAS tests"
pom-dir: tas-email
- test-name: "WebDAV TAS tests"
pom-dir: tas-webdav
- test-name: "Integration TAS tests"
pom-dir: tas-integration
env:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set up the environment"
run: |
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
- name: "Set up the environment for integration tests"
run: |
if [ "${{ matrix.test-name }}" == 'Integration TAS tests' ];
then
mvn install -pl :alfresco-community-repo-integration-test -am -DskipTests -Pall-tas-tests
fi
- name: "Run tests"
id: tests
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn -B verify -f packaging/tests/${{ matrix.pom-dir }}/pom.xml -Pall-tas-tests,${{ matrix.test-profile }} -Denvironment=default -DrunBugs=false
- name: "After success"
if: ${{ always() }} && outcome.tests.outcome == 'success'
run: ${TAS_SCRIPTS}/output_tests_run.sh "packaging/tests/${{ matrix.pom-dir }}"
continue-on-error: true
- name: "After failure"
if: ${{ always() }} && outcome.tests.outcome == 'failure'
run: ${TAS_SCRIPTS}/output_logs_for_failures.sh "packaging/tests/${{ matrix.pom-dir }}"
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
share_services_share_services_test_suite:
name: Share Services - ShareServicesTestSuite
runs-on: ubuntu-latest
needs: [prepare]
if: >
! contains(github.event.head_commit.message, '[skip repo]') &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Set up the environment"
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile postgres up -d
- name: "Run tests"
run: mvn -B test -pl :alfresco-share-services -am -Dtest=ShareServicesTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
ags_tests_postgressql:
name: AGS Unit & Integration Tests 0${{ matrix.part }} (PostgreSQL) ${{ matrix.test-name }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Verify"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
ags_tests_mysql:
name: AGS Unit & Integration Tests 0${{ matrix.part }} (PostgreSQL) ${{ matrix.test-name }}
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip ags]')) ||
contains(github.event.head_commit.message, '[ags on MySQL]')) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
strategy:
fail-fast: false
matrix:
part: [1, 2, 3, 4]
env:
REQUIRES_INSTALLED_ARTIFACTS: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Verify"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-mysql -PagsAllTestSuitePt${{ matrix.part }} ${{ env.LOG_WARN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
ags_community_rest_api_tests:
name: "AGS Community Rest API Tests"
runs-on: ubuntu-latest
needs: [prepare]
if: >
(((github.ref_name == 'master' || contains(github.ref_name, 'release/') || github.event_name == 'pull_request' ) &&
! contains(github.event.head_commit.message, '[skip ags]') && ! contains(github.event.head_commit.message, '[skip tas]')) ||
(contains(github.event.head_commit.message, '[ags]') && contains(github.event.head_commit.message, '[tas]'))) &&
! contains(github.event.head_commit.message, '[skip tests]') &&
! contains(github.event.head_commit.message, '[force]')
env:
REQUIRES_LOCAL_IMAGES: true
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- name: "Build"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set up the environment"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
${{ env.TAS_SCRIPTS }}/start-compose.sh ./amps/ags/rm-community/rm-community-repo/docker-compose.yml
${{ env.TAS_SCRIPTS }}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco"
mvn -B install -pl :alfresco-governance-services-automation-community-rest-api -am -Pags -Pall-tas-tests -DskipTests
- name: "Test"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -Dskip.automationtests=false -Pags -Pall-tas-tests
- run: bash amps/ags/ci/scripts/getLogs.sh
if: ${{ always() }}
- shell: bash
if: ${{ always() }}
run: |
mkdir -p deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests
mv "alfresco.log" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
mv "solr.log" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
mv "./amps/ags/rm-automation/rm-automation-community-rest-api/target/reports" "deploy_dir/community/${{ github.run_number }}/AGS-Community-Rest-API-Tests"
- name: "Configure AWS credentials"
if: ${{ always() }}
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AGS_AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AGS_AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: "Upload artifacts to Amazon S3 bucket"
if: ${{ always() }}
run: aws s3 cp --recursive ./deploy_dir s3://ags-travis-artifacts
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh

63
.github/workflows/master_release.yml vendored Normal file
View File

@@ -0,0 +1,63 @@
name: Master/Release branch workflow
on:
push:
branches:
# - master
# - release/**
- feature/ACS-3841_test_gha
jobs:
run_ci:
uses: ./.github/workflows/ci.yml
secrets: inherit
push_to_nexus:
name: "Push to Nexus"
runs-on: ubuntu-latest
needs: [run_ci]
if: >
always() &&
(needs.run_ci.result == 'skipped' || needs.run_ci.result == 'success')
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/alfresco-build-tools/.github/actions/configure-git-author@v1.12.0
with:
username: ${{ secrets.BOT_GITHUB_USERNAME }}
email: ${{ secrets.BOT_GITHUB_EMAIL }}
- name: "Verify release tag"
run: bash ./scripts/ci/verify_release_tag.sh
- name: "Release"
run: bash ./scripts/ci/maven_release.sh
env:
BUILD_NUMBER: ${{ github.run_number }}
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_PASSWORD }}
GIT_EMAIL: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh
update_downstream:
name: "Update alfresco-enterprise-repo"
runs-on: ubuntu-latest
needs: [run_ci, push_to_nexus]
if: >
always() &&
(needs.run_ci.result == 'skipped' || needs.run_ci.result == 'success') &&
(needs.push_to_nexus.result == 'success') &&
(! contains(github.event.head_commit.message, '[no downstream]'))
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-branch-name@v1.23.0
- uses: Alfresco/acs-community-packaging/.github/actions/get-build-info@feature/ACS-3844_migrate-to-GHA
- uses: Alfresco/acs-community-packaging/.github/actions/setup-build-tools@feature/ACS-3844_migrate-to-GHA
- run: bash ./scripts/ci/update_downstream.sh
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }}
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_PASSWORD }}
GIT_EMAIL: ${{ secrets.BOT_GITHUB_TOKEN }}
- name: "Clean Maven cache"
if: ${{ always() }}
run: bash ./scripts/ci/cleanup_cache.sh

View File

@@ -19,10 +19,7 @@ before_cache: bash scripts/travis/cleanup_cache.sh
branches:
only:
- master
- /release\/.*/
- /feature\/.*/
- /fix\/.*/
- none
env:
global:

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-automation-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<build>

View File

@@ -0,0 +1,46 @@
/*
* #%L
* Alfresco Records Management Module
* %%
* Copyright (C) 2005 - 2022 Alfresco Software Limited
* %%
* This file is part of the Alfresco software.
* -
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
* -
* Alfresco is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* -
* Alfresco is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
* -
* You should have received a copy of the GNU Lesser General Public License
* along with Alfresco. If not, see <http://www.gnu.org/licenses/>.
* #L%
*/
package org.alfresco.rest.rm.community.utils;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
import org.testng.IMethodInstance;
import org.testng.IMethodInterceptor;
import org.testng.ITestContext;
public class AlphabeticallyPriorityInterceptor implements IMethodInterceptor
{
@Override
public List<IMethodInstance> intercept(List<IMethodInstance> methods,
ITestContext context)
{
return methods.stream().sorted(Comparator.comparing(el -> el.getMethod().getTestClass().toString()))
.collect(Collectors.toList());
}
}

View File

@@ -1,7 +1,10 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="TestNG AllTestSuite" configfailurepolicy="continue" verbose="1" time-out="300000">
<test name="restapi">
<listeners>
<listener class-name="org.alfresco.rest.rm.community.utils.AlphabeticallyPriorityInterceptor" />
</listeners>
<test name="restapi" preserve-order="false">
<packages>
<package name="org.alfresco.rest.rm.community.*"/>
</packages>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-parent</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-governance-services-community-repo-parent</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<build>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-amps</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<dependencies>

View File

@@ -9,6 +9,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
</project>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<properties>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<modules>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<organization>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<developers>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<properties>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-tests</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<developers>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo-packaging</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<properties>

View File

@@ -2,7 +2,7 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
<packaging>pom</packaging>
<name>Alfresco Community Repo Parent</name>
@@ -148,7 +148,7 @@
<connection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-community-repo.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-community-repo</url>
<tag>HEAD</tag>
<tag>20.41-DEV</tag>
</scm>
<distributionManagement>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<version>20.41-SNAPSHOT</version>
<version>20.41-DEV</version>
</parent>
<dependencies>

View File

@@ -0,0 +1,20 @@
#!/usr/bin/env bash
set +vx
function cloneRepo() {
local REPO="${1}"
local TAG_OR_BRANCH="${2}"
printf "Cloning \"%s\" on %s\n" "${TAG_OR_BRANCH}" "${REPO}"
# clone the repository branch/tag
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
rm -rf "$(basename "${REPO%.git}")"
git clone -b "${TAG_OR_BRANCH}" --depth=1 "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}"
popd >/dev/null
}
set -vx

View File

@@ -0,0 +1,40 @@
version: "3"
services:
postgres:
profiles: ["postgres"]
image: postgres:${POSTGRES_VERSION}
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300
ports:
- "5433:5432"
mariadb:
profiles: ["mariadb"]
image: mariadb:${MARIADB_VERSION}
command: --transaction-isolation=READ-COMMITTED --max-connections=300 --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
environment:
- MYSQL_ROOT_PASSWORD=alfresco
- MYSQL_USER=alfresco
- MYSQL_DATABASE=alfresco
- MYSQL_PASSWORD=alfresco
ports:
- "3307:3306"
mysql:
profiles: ["mysql"]
image: mysql:${MYSQL_VERSION}
command: --transaction-isolation='READ-COMMITTED'
environment:
- MYSQL_ROOT_PASSWORD=alfresco
- MYSQL_USER=alfresco
- MYSQL_DATABASE=alfresco
- MYSQL_PASSWORD=alfresco
ports:
- "3307:3306"
activemq:
image: alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
ports:
- "5672:5672" # AMQP
- "61616:61616" # OpenWire

View File

@@ -0,0 +1,26 @@
version: "3"
services:
transform-core-aio:
profiles: ["with-transform-core-aio"]
image: alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
environment:
JAVA_OPTS: " -Xms256m -Xmx256m"
ports:
- "8090:8090"
postgres:
image: postgres:14.4
profiles: ["default", "with-transform-core-aio", "postgres"]
environment:
- POSTGRES_PASSWORD=alfresco
- POSTGRES_USER=alfresco
- POSTGRES_DB=alfresco
command: postgres -c max_connections=300
ports:
- "5433:5432"
activemq:
profiles: ["default", "with-transform-core-aio", "activemq"]
image: alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
ports:
- "5672:5672" # AMQP
- "61616:61616" # OpenWire

View File

@@ -5,7 +5,7 @@ set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
# Maven Setup
mkdir -p "${HOME}/.m2" && cp -f .travis.settings.xml "${HOME}/.m2/settings.xml"
mkdir -p "${HOME}/.m2" && cp -f .github/.ci.settings.xml "${HOME}/.m2/settings.xml"
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
# Docker Logins

View File

@@ -4,23 +4,22 @@ PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
# Use full history for release
git checkout -B "${TRAVIS_BRANCH}"
# Add email to link commits to user
git checkout -B "${BRANCH_NAME}"
# Define git identity for commits
git config user.email "${GIT_EMAIL}"
git config user.name "${GIT_USERNAME}"
# Run the release plugin - with "[skip ci]" in the release commit message
mvn -B \
-Pall-tas-tests \
-Pags \
"-Darguments=-Pall-tas-tests -Pags -DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER}" \
"-Darguments=-Pall-tas-tests -Pags -DskipTests -Dbuild-number=${BUILD_NUMBER}" \
release:clean release:prepare release:perform \
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
-Dusername="${GIT_USERNAME}" \
-Dpassword="${GIT_PASSWORD}"
popd
set +vex
echo "=========================== Finishing Release Script =========================="

View File

@@ -7,8 +7,8 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
#Fetch the latest changes, as Travis will only checkout the PR commit
git fetch origin "${TRAVIS_BRANCH}"
git checkout "${TRAVIS_BRANCH}"
git fetch origin "${BRANCH_NAME}"
git checkout "${BRANCH_NAME}"
git pull
# Retrieve the current Community version - latest tag on the current branch
@@ -16,7 +16,7 @@ VERSION="$(git describe --abbrev=0 --tags)"
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
cloneRepo "${DOWNSTREAM_REPO}" "${TRAVIS_BRANCH}"
cloneRepo "${DOWNSTREAM_REPO}" "${BRANCH_NAME}"
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
@@ -33,8 +33,8 @@ git status
git --no-pager diff pom.xml
git add pom.xml
if [[ "${TRAVIS_COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
FORCE_TOKEN=$(echo "${TRAVIS_COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
if [[ "${COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
FORCE_TOKEN=$(echo "${COMMIT_MESSAGE}" | sed "s|^.*\(\[force[^]]*\]\).*$|\1|g")
git commit --allow-empty -m "${FORCE_TOKEN} Update upstream version to ${VERSION}"
git push
elif git status --untracked-files=no --porcelain | grep -q '^' ; then

View File

@@ -1,193 +0,0 @@
#!/usr/bin/env bash
set +vx
function isPullRequestBuild() {
test "${TRAVIS_PULL_REQUEST}" != "false"
}
function isBranchBuild() {
test "${TRAVIS_PULL_REQUEST}" = "false"
}
function cloneRepo() {
local REPO="${1}"
local TAG_OR_BRANCH="${2}"
printf "Clonning \"%s\" on %s\n" "${TAG_OR_BRANCH}" "${REPO}"
# clone the repository branch/tag
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" >/dev/null
rm -rf "$(basename "${REPO%.git}")"
git clone -b "${TAG_OR_BRANCH}" --depth=1 "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}"
popd >/dev/null
}
function retrievePomParentVersion() {
local REPO="${1}"
if [ -z "${REPO}" ]; then
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" >/dev/null
else
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${REPO%.git}")" >/dev/null
fi
sed -n '/<parent>/,/<\/parent>/p' pom.xml \
| sed -n '/<version>/,/<\/version>/p' \
| tr -d '\n' \
| grep -oP '(?<=<version>).*(?=</version>)' \
| xargs
popd >/dev/null
}
function retrievePomProperty() {
local KEY="${1}"
local REPO="${2}"
if [ -z "${REPO}" ]; then
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" >/dev/null
else
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${REPO%.git}")" >/dev/null
fi
sed -n '/<properties>/,/<\/properties>/p' pom.xml \
| sed -n "/<${KEY}>/,/<\/${KEY}>/p" \
| tr -d '\n' \
| grep -oP "(?<=<${KEY}>).*(?=</${KEY}>)" \
| xargs
popd >/dev/null
}
function evaluatePomProperty() {
local KEY="${1}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../" >/dev/null
mvn -B -q help:evaluate -Dexpression="${KEY}" -DforceStdout
popd >/dev/null
}
function remoteBranchExists() {
local REMOTE_REPO="${1}"
local BRANCH="${2}"
git ls-remote --exit-code --heads "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REMOTE_REPO}" "${BRANCH}" &>/dev/null
}
function identifyUpstreamSourceBranch() {
local UPSTREAM_REPO="${1}"
# if it's a pull request, use the source branch name (if it exists)
if isPullRequestBuild && remoteBranchExists "${UPSTREAM_REPO}" "${TRAVIS_PULL_REQUEST_BRANCH}" ; then
echo "${TRAVIS_PULL_REQUEST_BRANCH}"
exit 0
fi
# otherwise use the current branch name (or in case of PRs, the target branch name)
if remoteBranchExists "${UPSTREAM_REPO}" "${TRAVIS_BRANCH}" ; then
echo "${TRAVIS_BRANCH}"
exit 0
fi
# if none of the previous exists, use the "master" branch
echo "master"
}
function pullUpstreamTag() {
local UPSTREAM_REPO="${1}"
local TAG="${2}"
cloneRepo "${UPSTREAM_REPO}" "${TAG}"
}
function pullSameBranch() {
local UPSTREAM_REPO="${1}"
local SOURCE_BRANCH="$(identifyUpstreamSourceBranch "${UPSTREAM_REPO}")"
cloneRepo "${UPSTREAM_REPO}" "${SOURCE_BRANCH}"
}
function buildUpstreamTag() {
local UPSTREAM_REPO="${1}"
local TAG="${2}"
local EXTRA_BUILD_ARGUMENTS="${3}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V clean package -DskipTests -Dmaven.javadoc.skip=true "-Dimage.tag=${TAG}" ${EXTRA_BUILD_ARGUMENTS}
popd
}
function buildSameBranchOnUpstream() {
local UPSTREAM_REPO="${1}"
local EXTRA_BUILD_ARGUMENTS="${2}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V -q clean install -DskipTests -Dmaven.javadoc.skip=true ${EXTRA_BUILD_ARGUMENTS}
mvn -B -V -q install -DskipTests -f packaging/tests/pom.xml
popd
}
function pullUpstreamTagAndBuildDockerImage() {
local UPSTREAM_REPO="${1}"
local TAG="${2}"
local EXTRA_BUILD_ARGUMENTS="${3}"
cloneRepo "${UPSTREAM_REPO}" "${TAG}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V clean package -DskipTests -Dmaven.javadoc.skip=true "-Dimage.tag=${TAG}" ${EXTRA_BUILD_ARGUMENTS}
popd
}
function pullAndBuildSameBranchOnUpstream() {
local UPSTREAM_REPO="${1}"
local EXTRA_BUILD_ARGUMENTS="${2}"
local SOURCE_BRANCH="$(identifyUpstreamSourceBranch "${UPSTREAM_REPO}")"
cloneRepo "${UPSTREAM_REPO}" "${SOURCE_BRANCH}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V -q clean install -DskipTests -Dmaven.javadoc.skip=true ${EXTRA_BUILD_ARGUMENTS}
mvn -B -V -q install -DskipTests -f packaging/tests/pom.xml
popd
}
function retieveLatestTag() {
local REPO="${1}"
local BRANCH="${2}"
local LOCAL_PATH="/tmp/$(basename "${REPO%.git}")"
git clone -q -b "${BRANCH}" "https://${GIT_USERNAME}:${GIT_PASSWORD}@${REPO}" "${LOCAL_PATH}"
pushd "${LOCAL_PATH}" >/dev/null
git describe --abbrev=0 --tags
popd >/dev/null
rm -rf "${LOCAL_PATH}"
}
set -vx