mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-10-01 14:41:46 +00:00
Migrate to GitHub Actions (#1863)
* Remove travis configuration * Add github actions configuration * ACS-4776 Finalize deprecation of BitlyUrlShortenerImpl (#1787) (cherry picked from commit7b87ee628d
) * Trigger tests [db][ags][tas][ags on MySQL] * Add packaging scripts for TAS tests [db][ags][tas][ags on MySQL] * ACS-3841 Add missing logs for WebDAV TAS tests (#1629) * ACS-3841 Add missing logs * ACS-3841 Reformat code + fix grep (cherry picked from commitcdbe3292e0
) * Trigger tests [db][ags][tas][ags on MySQL] * Enforce order the tests run on DispositionScheduleLinkedRecordsTest * Added AlphabeticalPriorityInterceptor for AGS Rest tests --------- Co-authored-by: Domenico Sibilio <domenicosibilio@gmail.com> Co-authored-by: Damian Ujma <92095156+damianujma@users.noreply.github.com>
This commit is contained in:
28
scripts/ci/build.sh
Normal file
28
scripts/ci/build.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "=========================== Starting Build Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||
|
||||
if [[ -n ${BUILD_PROFILES} ]]; then
|
||||
PROFILES="${BUILD_PROFILES}"
|
||||
elif [[ "${REQUIRES_LOCAL_IMAGES}" == "true" ]]; then
|
||||
PROFILES="-Pbuild-docker-images -Pags"
|
||||
else
|
||||
PROFILES="-Pags"
|
||||
fi
|
||||
|
||||
if [[ "${REQUIRES_INSTALLED_ARTIFACTS}" == "true" ]]; then
|
||||
PHASE="install"
|
||||
else
|
||||
PHASE="package"
|
||||
fi
|
||||
|
||||
mvn -B -V $PHASE -DskipTests -Dmaven.javadoc.skip=true $PROFILES $BUILD_OPTIONS
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Build Script =========================="
|
||||
|
187
scripts/ci/build_functions.sh
Normal file
187
scripts/ci/build_functions.sh
Normal file
@@ -0,0 +1,187 @@
|
||||
#!/usr/bin/env bash
|
||||
set +vx
|
||||
|
||||
function isPullRequestBuild() {
|
||||
test "${PULL_REQUEST}" != "false"
|
||||
}
|
||||
|
||||
function isBranchBuild() {
|
||||
test "${PULL_REQUEST}" = "false"
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
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}"
|
||||
|
||||
# otherwise use the current branch name (or in case of PRs, the target branch name)
|
||||
if remoteBranchExists "${UPSTREAM_REPO}" "${BRANCH_NAME}" ; then
|
||||
echo "${BRANCH_NAME}"
|
||||
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
|
5
scripts/ci/cleanup_cache.sh
Normal file
5
scripts/ci/cleanup_cache.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ev
|
||||
|
||||
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT" | xargs -r -l rm -rf
|
||||
|
40
scripts/ci/docker-compose/docker-compose-db.yaml
Normal file
40
scripts/ci/docker-compose/docker-compose-db.yaml
Normal 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
|
59
scripts/ci/docker-compose/docker-compose.yaml
Normal file
59
scripts/ci/docker-compose/docker-compose.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
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", "with-mtls-transform-core-aio"]
|
||||
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", "with-mtls-transform-core-aio"]
|
||||
image: alfresco/alfresco-activemq:5.17.1-jre11-rockylinux8
|
||||
ports:
|
||||
- "5672:5672" # AMQP
|
||||
- "61616:61616" # OpenWire
|
||||
mtls-transform-core-aio:
|
||||
profiles: ["with-mtls-transform-core-aio"]
|
||||
image: quay.io/alfresco/alfresco-transform-core-aio:${TRANSFORMERS_TAG}
|
||||
hostname: transform-core-aio
|
||||
ports:
|
||||
- 8090:8090
|
||||
volumes:
|
||||
- ${GITHUB_WORKSPACE}/keystores/tengineAIO/tengineAIO.truststore:/tengineAIO.truststore
|
||||
- ${GITHUB_WORKSPACE}/keystores/tengineAIO/tengineAIO.keystore:/tengineAIO.keystore
|
||||
environment:
|
||||
ACTIVEMQ_URL: "nio://activemq:61616"
|
||||
ACTIVEMQ_USER: "admin"
|
||||
ACTIVEMQ_PASSWORD: "admin"
|
||||
LOG_LEVEL: debug
|
||||
|
||||
SERVER_SSL_ENABLED: "true"
|
||||
SERVER_SSL_KEY_PASSWORD: "password"
|
||||
SERVER_SSL_KEY_STORE: "file:/tengineAIO.keystore"
|
||||
SERVER_SSL_KEY_STORE_PASSWORD: "password"
|
||||
SERVER_SSL_KEY_STORE_TYPE: "JCEKS"
|
||||
|
||||
SERVER_SSL_CLIENT_AUTH: "need"
|
||||
SERVER_SSL_TRUST_STORE: "file:/tengineAIO.truststore"
|
||||
SERVER_SSL_TRUST_STORE_PASSWORD: "password"
|
||||
SERVER_SSL_TRUST_STORE_TYPE: "JCEKS"
|
||||
|
||||
CLIENT_SSL_KEY_STORE: "file:/tengineAIO.keystore"
|
||||
CLIENT_SSL_KEY_STORE_PASSWORD: "password"
|
||||
CLIENT_SSL_KEY_STORE_TYPE: "JCEKS"
|
||||
|
||||
CLIENT_SSL_TRUST_STORE: "file:/tengineAIO.truststore"
|
||||
CLIENT_SSL_TRUST_STORE_PASSWORD: "password"
|
||||
CLIENT_SSL_TRUST_STORE_TYPE: "JCEKS"
|
27
scripts/ci/generate_keystores.sh
Normal file
27
scripts/ci/generate_keystores.sh
Normal file
@@ -0,0 +1,27 @@
|
||||
#! /bin/bash
|
||||
#! /bin/bash
|
||||
|
||||
# SETTINGS
|
||||
# Alfresco Format: "classic" / "current" is supported only from 7.0
|
||||
ALFRESCO_FORMAT=current
|
||||
|
||||
#Contains directory settings
|
||||
source ${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/utils.sh
|
||||
|
||||
# Cleanup previous output of script
|
||||
rm -rd $CA_DIR
|
||||
rm -rd $KEYSTORES_DIR
|
||||
rm -rd $CERTIFICATES_DIR
|
||||
|
||||
# SETTINGS
|
||||
# Alfresco Format: "classic" / "current" is supported only from 7.0
|
||||
ALFRESCO_FORMAT=current
|
||||
|
||||
#CA
|
||||
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_ca.sh -keysize 2048 -keystorepass password -certdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco CA" -servername localhost -validityduration 1
|
||||
#Alfresco
|
||||
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_additional.sh -servicename alfresco -rootcapass password -keysize 2048 -keystoretype JCEKS -keystorepass password -truststoretype JCEKS -truststorepass password -certdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=Custom Alfresco Repository" -servername localhost -alfrescoformat $ALFRESCO_FORMAT
|
||||
#Alfresco Metadata encryption
|
||||
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_encryption.sh -subfoldername alfresco -servicename encryption -encstorepass mp6yc0UD9e -encmetadatapass oKIWzVdEdA -alfrescoformat $ALFRESCO_FORMAT
|
||||
#T-Engine AIO
|
||||
${GITHUB_WORKSPACE}/alfresco-ssl-generator/ssl-tool/run_additional.sh -servicename tengineAIO -rootcapass password -keysize 2048 -keystoretype JCEKS -keystorepass password -truststoretype JCEKS -truststorepass password -certdname "/C=GB/ST=UK/L=Maidenhead/O=Alfresco Software Ltd./OU=Unknown/CN=T-Engine AIO" -servername localhost -alfrescoformat $ALFRESCO_FORMAT
|
17
scripts/ci/init.sh
Normal file
17
scripts/ci/init.sh
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "=========================== Starting Init Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
# Maven Setup
|
||||
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
|
||||
|
||||
# Docker Logins
|
||||
echo "${DOCKERHUB_PASSWORD}" | docker login -u="${DOCKERHUB_USERNAME}" --password-stdin
|
||||
echo "${QUAY_PASSWORD}" | docker login -u="${QUAY_USERNAME}" --password-stdin quay.io
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Init Script =========================="
|
||||
|
23
scripts/ci/maven_release.sh
Executable file
23
scripts/ci/maven_release.sh
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "=========================== Starting Release Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
# Use full history for release
|
||||
git checkout -B "${BRANCH_NAME}"
|
||||
|
||||
# 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=${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 =========================="
|
||||
|
29
scripts/ci/prepare.sh
Executable file
29
scripts/ci/prepare.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
M2_REPO_DIR="$HOME/.m2/repository"
|
||||
M2_REPO_TTL_MINUTES=10080
|
||||
M2_REPO_EXPIRED="$(find $M2_REPO_DIR -type f -mmin +$M2_REPO_TTL_MINUTES 2>/dev/null | head -n 1 | wc -l)"
|
||||
M2_REPO_FILE_COUNT="$(find $M2_REPO_DIR -type f 2>/dev/null | wc -l)"
|
||||
|
||||
ORG_ALFRESCO_M2_REPO_DIR="$M2_REPO_DIR/org/alfresco"
|
||||
ORG_ALFRESCO_M2_REPO_TTL_MINUTES=1440
|
||||
ORG_ALFRESCO_M2_REPO_EXPIRED="$(find $ORG_ALFRESCO_M2_REPO_DIR -type f -mmin +$ORG_ALFRESCO_M2_REPO_TTL_MINUTES 2>/dev/null | head -n 1 | wc -l)"
|
||||
|
||||
echo "Files in the maven repo: $M2_REPO_FILE_COUNT"
|
||||
|
||||
if [ $ORG_ALFRESCO_M2_REPO_EXPIRED -eq 1 ];then
|
||||
echo "Invalidating org/alfresco maven local cache."
|
||||
rm -rf "$ORG_ALFRESCO_M2_REPO_DIR"
|
||||
fi
|
||||
|
||||
if [ $M2_REPO_EXPIRED -eq 1 ];then
|
||||
echo "Invalidating maven local cache."
|
||||
rm -rf "$M2_REPO_DIR"
|
||||
fi
|
||||
|
||||
echo "Verifying compilation and ensuring maven cache populated."
|
||||
export BUILD_PROFILES="-Pall-tas-tests,ags"
|
||||
export BUILD_OPTIONS="-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn -Dmaven.artifact.threads=8"
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/build.sh"
|
15
scripts/ci/tests/AppContext05TestSuite-setup.sh
Normal file
15
scripts/ci/tests/AppContext05TestSuite-setup.sh
Normal file
@@ -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 =========================="
|
52
scripts/ci/update_downstream.sh
Normal file
52
scripts/ci/update_downstream.sh
Normal file
@@ -0,0 +1,52 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "=========================== Starting Update Downstream Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
|
||||
|
||||
#Fetch the latest changes, as GHA will only checkout the PR commit
|
||||
git fetch origin "${BRANCH_NAME}"
|
||||
git checkout "${BRANCH_NAME}"
|
||||
git pull
|
||||
|
||||
# Retrieve the current Community version - latest tag on the current branch
|
||||
VERSION="$(git describe --abbrev=0 --tags)"
|
||||
|
||||
DOWNSTREAM_REPO="github.com/Alfresco/alfresco-enterprise-repo.git"
|
||||
|
||||
cloneRepo "${DOWNSTREAM_REPO}" "${BRANCH_NAME}"
|
||||
|
||||
cd "$(dirname "${BASH_SOURCE[0]}")/../../../$(basename "${DOWNSTREAM_REPO%.git}")"
|
||||
|
||||
# Update parent version
|
||||
mvn -B versions:update-parent versions:commit "-DparentVersion=[${VERSION}]"
|
||||
|
||||
# Update dependency version
|
||||
mvn -B versions:set-property versions:commit \
|
||||
-Dproperty=dependency.alfresco-community-repo.version \
|
||||
"-DnewVersion=${VERSION}"
|
||||
|
||||
# Commit changes
|
||||
git status
|
||||
git --no-pager diff pom.xml
|
||||
git add pom.xml
|
||||
|
||||
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
|
||||
git commit -m "Update upstream version to ${VERSION}"
|
||||
git push
|
||||
else
|
||||
echo "Dependencies are already up to date."
|
||||
git status
|
||||
fi
|
||||
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Update Downstream Script =========================="
|
||||
|
24
scripts/ci/verify_release_tag.sh
Executable file
24
scripts/ci/verify_release_tag.sh
Executable file
@@ -0,0 +1,24 @@
|
||||
#!/usr/bin/env bash
|
||||
echo "=========================== Starting Verify Release Tag Script ==========================="
|
||||
PS4="\[\e[35m\]+ \[\e[m\]"
|
||||
set -vex
|
||||
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
|
||||
|
||||
#
|
||||
# Check that the version to be released does not already have a git tag.
|
||||
#
|
||||
|
||||
POM_VERSION=$(mvn -B -q help:evaluate -Dexpression=project.version -DforceStdout)
|
||||
printf "POM version: %s\n" "${POM_VERSION}"
|
||||
|
||||
TAG="${POM_VERSION%-SNAPSHOT}"
|
||||
|
||||
if git rev-parse "${TAG}^{tag}" &>/dev/null ; then
|
||||
echo "The next tag \"${TAG}\" already exists in the git project"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
popd
|
||||
set +vex
|
||||
echo "=========================== Finishing Verify Release Tag Script =========================="
|
||||
|
Reference in New Issue
Block a user