-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/acs 4653 migrate to gha (#1777)
- Loading branch information
1 parent
a041ae9
commit 28f0c42
Showing
21 changed files
with
757 additions
and
469 deletions.
There are no files selected for viewing
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Master/Release branch workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/** | ||
|
||
env: | ||
GIT_USERNAME: ${{ secrets.BOT_GITHUB_USERNAME }} | ||
GIT_EMAIL: ${{ secrets.BOT_GITHUB_EMAIL }} | ||
GIT_PASSWORD: ${{ secrets.BOT_GITHUB_TOKEN }} | ||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} | ||
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.NEXUS_PASSWORD }} | ||
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }} | ||
QUAY_PASSWORD: ${{ secrets.QUAY_PASSWORD }} | ||
QUAY_USERNAME: ${{ secrets.QUAY_USERNAME }} | ||
GITHUB_ACTIONS_DEPLOY_TIMEOUT: 60 | ||
|
||
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: > | ||
!failure() && | ||
!contains(github.event.head_commit.message, '[no release]') && | ||
github.event_name != 'pull_request' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
- name: "Init" | ||
run: bash ./scripts/ci/init.sh | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
with: | ||
username: ${{ env.GIT_USERNAME }} | ||
email: ${{ env.GIT_EMAIL }} | ||
global: true | ||
- name: "Release" | ||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }} | ||
run: | | ||
bash scripts/ci/verify_release_tag.sh | ||
bash scripts/ci/maven_release.sh | ||
- name: "Clean Maven cache" | ||
run: bash ./scripts/ci/cleanup_cache.sh | ||
update_downstream: | ||
name: "Update alfresco-enterprise-repo" | ||
runs-on: ubuntu-latest | ||
needs: [push_to_nexus] | ||
if: > | ||
!failure() && | ||
!contains(github.event.head_commit.message, '[no downstream]') && | ||
github.event_name != 'pull_request' | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
- name: "Init" | ||
run: bash ./scripts/ci/init.sh | ||
- uses: Alfresco/alfresco-build-tools/.github/actions/[email protected] | ||
with: | ||
username: ${{ env.GIT_USERNAME }} | ||
email: ${{ env.GIT_EMAIL }} | ||
global: true | ||
- name: "Update downstream" | ||
run: bash ./scripts/ci/update_downstream.sh | ||
env: | ||
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | ||
- name: "Clean Maven cache" | ||
run: bash ./scripts/ci/cleanup_cache.sh |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
52 changes: 52 additions & 0 deletions
52
...i/src/test/java/org/alfresco/rest/rm/community/utils/AlphabeticalPriorityInterceptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* #%L | ||
* Alfresco Records Management Module | ||
* %% | ||
* Copyright (C) 2005 - 2023 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; | ||
|
||
/** | ||
* A method interceptor that sorts test classes alphabetically. | ||
* | ||
* @author Damian Ujma | ||
*/ | ||
public class AlphabeticalPriorityInterceptor implements IMethodInterceptor | ||
{ | ||
@Override | ||
public List<IMethodInstance> intercept(List<IMethodInstance> methods, | ||
ITestContext context) | ||
{ | ||
return methods.stream() | ||
.sorted(Comparator.comparing(methodInstance -> methodInstance.getMethod().getTestClass().getName())) | ||
.collect(Collectors.toList()); | ||
} | ||
} |
5 changes: 4 additions & 1 deletion
5
amps/ags/rm-automation/rm-automation-community-rest-api/src/test/resources/testng.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
echo "=========================== Starting AppContext05TestSuite setup ===========================" | ||
PS4="\[\e[35m\]+ \[\e[m\]" | ||
set -vex | ||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../" | ||
|
||
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 | ||
|
||
popd | ||
set +vex | ||
echo "=========================== Finishing AppContext05TestSuite setup ==========================" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file was deleted.
Oops, something went wrong.