mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-09-17 14:21:39 +00:00
ACS-3841 Rename the ci scripts directory
This commit is contained in:
46
.github/workflows/ci.yml
vendored
46
.github/workflows/ci.yml
vendored
@@ -38,9 +38,9 @@ jobs:
|
|||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-maven-
|
${{ runner.os }}-maven-
|
||||||
- name: "Clean cache"
|
- name: "Clean cache"
|
||||||
run: bash ./scripts/travis/cleanup_cache.sh
|
run: bash ./scripts/ci/cleanup_cache.sh
|
||||||
- name: "Prepare environment"
|
- name: "Prepare environment"
|
||||||
run: bash ./scripts/travis/prepare.sh
|
run: bash ./scripts/ci/prepare.sh
|
||||||
|
|
||||||
veracode:
|
veracode:
|
||||||
name: "Source Clear Scan (SCA)"
|
name: "Source Clear Scan (SCA)"
|
||||||
@@ -132,7 +132,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose.yaml --profile with-transform-core-aio up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile with-transform-core-aio up -d
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
run: mvn -B test -pl repository -am -Dtest=AppContext01TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
run: mvn -B test -pl repository -am -Dtest=AppContext01TestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ jobs:
|
|||||||
java-version: ${{ env.JAVA_VERSION }}
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose.yaml up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml up -d
|
||||||
- name: "Set HOST_IP"
|
- name: "Set HOST_IP"
|
||||||
run: |
|
run: |
|
||||||
mkdir -p "${HOME}/tmp"
|
mkdir -p "${HOME}/tmp"
|
||||||
@@ -207,7 +207,7 @@ jobs:
|
|||||||
java-version: ${{ env.JAVA_VERSION }}
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose.yaml up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml up -d
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
run: mvn -B test -pl repository -am -Dtest=SearchTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dindex.subsystem.name=solr6
|
run: mvn -B test -pl repository -am -Dtest=SearchTestSuite -DfailIfNoTests=false -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco -Dindex.subsystem.name=solr6
|
||||||
|
|
||||||
@@ -243,7 +243,7 @@ jobs:
|
|||||||
java-version: ${{ env.JAVA_VERSION }}
|
java-version: ${{ env.JAVA_VERSION }}
|
||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose-db.yaml --profile mariadb up -d
|
||||||
env:
|
env:
|
||||||
MARIADB_VERSION: 10.2.18
|
MARIADB_VERSION: 10.2.18
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
@@ -283,10 +283,10 @@ jobs:
|
|||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
bash ./scripts/travis/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/travis/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose.yaml up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml up -d
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
run: mvn -B test -pl remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
run: mvn -B test -pl remote-api -Dtest=AppContext01TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
|
||||||
@@ -325,10 +325,10 @@ jobs:
|
|||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
echo "TRANSFORMERS_TAG=$(mvn help:evaluate -Dexpression=dependency.alfresco-transform-core.version -q -DforceStdout)" >> $GITHUB_ENV
|
||||||
bash ./scripts/travis/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/travis/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: docker-compose -f ./scripts/gh-actions/docker-compose/docker-compose.yaml --profile with-transform-core-aio up -d
|
run: docker-compose -f ./scripts/ci/docker-compose/docker-compose.yaml --profile with-transform-core-aio up -d
|
||||||
- name: "Run tests"
|
- name: "Run tests"
|
||||||
run: mvn -B test -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
run: mvn -B test -pl remote-api -Dtest=AppContext02TestSuite -Ddb.driver=org.postgresql.Driver -Ddb.name=alfresco -Ddb.url=jdbc:postgresql://localhost:5433/alfresco -Ddb.username=alfresco -Ddb.password=alfresco
|
||||||
|
|
||||||
@@ -368,8 +368,8 @@ jobs:
|
|||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
bash ./scripts/travis/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/travis/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
run: |
|
run: |
|
||||||
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
${{ env.TAS_SCRIPTS }}/start-compose.sh ${{ env.TAS_ENVIRONMENT }}/docker-compose-minimal+transforms.yml
|
||||||
@@ -414,8 +414,8 @@ jobs:
|
|||||||
- name: "Build"
|
- name: "Build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: |
|
run: |
|
||||||
bash ./scripts/travis/init.sh
|
bash ./scripts/ci/init.sh
|
||||||
bash ./scripts/travis/build.sh
|
bash ./scripts/ci/build.sh
|
||||||
- name: "Verify"
|
- name: "Verify"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
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 -PagsAllTestSuitePt1 ${{ env.LOG_WARN }}
|
run: mvn --file amps/ags/pom.xml -B verify -Dmaven.javadoc.skip=true -Dmaven.source.skip=true -Pags -Pstart-postgres -PagsAllTestSuitePt1 ${{ env.LOG_WARN }}
|
||||||
@@ -425,10 +425,14 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- prepare
|
- 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]')
|
||||||
if: >
|
if: >
|
||||||
((github.ref_name == 'master' || contains(github.ref_name, '[release]') || github.event_name == 'pull_request' ) &&
|
! contains(github.event.head_commit.message, '[skip repo]') &&
|
||||||
! 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, '[skip tests]') &&
|
||||||
! contains(github.event.head_commit.message, '[force]')
|
! contains(github.event.head_commit.message, '[force]')
|
||||||
steps:
|
steps:
|
||||||
@@ -458,7 +462,7 @@ jobs:
|
|||||||
distribution: "temurin"
|
distribution: "temurin"
|
||||||
- name: "build"
|
- name: "build"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: bash ./scripts/travis/build.sh
|
run: bash ./scripts/ci/build.sh
|
||||||
env:
|
env:
|
||||||
REQUIRES_LOCAL_IMAGES: true
|
REQUIRES_LOCAL_IMAGES: true
|
||||||
- name: "Set up the environment"
|
- name: "Set up the environment"
|
||||||
@@ -468,7 +472,7 @@ jobs:
|
|||||||
- name: "test"
|
- name: "test"
|
||||||
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
|
||||||
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -am -DfailIfNoTests=false -Dskip.automationtests=false -Pags
|
run: mvn -B test -pl :alfresco-governance-services-automation-community-rest-api -am -DfailIfNoTests=false -Dskip.automationtests=false -Pags
|
||||||
- run: bash amps/ags/travis/scripts/getLogs.sh
|
- run: bash amps/ags/ci/scripts/getLogs.sh
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
- shell: bash
|
- shell: bash
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
|
@@ -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
|
|
@@ -1,27 +0,0 @@
|
|||||||
#!/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 "${TRAVIS_BRANCH}"
|
|
||||||
# Add email to link commits to user
|
|
||||||
git config user.email "${GIT_EMAIL}"
|
|
||||||
|
|
||||||
# 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}" \
|
|
||||||
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 =========================="
|
|
||||||
|
|
@@ -1,52 +0,0 @@
|
|||||||
#!/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 Travis will only checkout the PR commit
|
|
||||||
git fetch origin "${TRAVIS_BRANCH}"
|
|
||||||
git checkout "${TRAVIS_BRANCH}"
|
|
||||||
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}" "${TRAVIS_BRANCH}"
|
|
||||||
|
|
||||||
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 [[ "${TRAVIS_COMMIT_MESSAGE}" =~ \[force[^\]]*\] ]]; then
|
|
||||||
FORCE_TOKEN=$(echo "${TRAVIS_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 =========================="
|
|
||||||
|
|
Reference in New Issue
Block a user