ACS-550 Add extra debug info in build scripts [skip ci]

This commit is contained in:
Cezar.Leahu
2020-08-27 16:13:36 +03:00
parent ddd0470c7d
commit 8d9409780b
7 changed files with 57 additions and 12 deletions

View File

@@ -29,8 +29,8 @@ env:
- TAS_SCRIPTS=../alfresco-community-repo/packaging/tests/scripts
- TAS_ENVIRONMENT=./tests/environment
# Must be in the format <alfresco-version>-<additional_versioning> ie. 6.3.0-repo-xxxx-x or 6.3.0-Ax
- RELEASE_VERSION=7.0.0-TEST1
- DEVELOPMENT_VERSION=7.0.0-TEST1-SNAPSHOT
- RELEASE_VERSION=7.0.0-TEST3
- DEVELOPMENT_VERSION=7.0.0-TEST4-SNAPSHOT
stages:
- name: test
@@ -38,7 +38,7 @@ stages:
- name: docker_latest
if: fork = false AND type != pull_request AND branch = master
- name: release
if: commit_message ~= /\[release\]/ AND fork = false AND type != pull_request AND (branch =~ ^(master|develop)$ OR branch =~ /release\/.*/)
if: commit_message ~= /\[release\]/ AND fork = false AND type != pull_request AND (branch =~ ^(master|develop)$ OR branch =~ /release\/.*/ OR branch = feature/REPO-5111_repo_build)
- name: publish
if: commit_message ~= /\[publish\]/ AND fork = false AND type != pull_request AND (branch =~ ^(master|develop)$ OR branch =~ /release\/.*/)

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -ev
echo "=========================== Starting Build Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
@@ -27,7 +29,7 @@ fi
UPSTREAM_REPO="github.com/Alfresco/alfresco-community-repo.git"
# For release jobs, check if the upstream dependency is the latest tag on the upstream repository (on the same branch)
if isBranchBuild && [ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] && [ "${DEPENDENCY_VERSION}" = "$(retieveLatestTag "${UPSTREAM_REPO}" "${TRAVIS_BRANCH}")" ] ; then
if isBranchBuild && [ "${TRAVIS_BUILD_STAGE_NAME,,}" = "release" ] && [ "${DEPENDENCY_VERSION}" != "$(retieveLatestTag "${UPSTREAM_REPO}" "${TRAVIS_BRANCH}")" ] ; then
printf "Upstream dependency is not up to date with %s / %s\n" "${UPSTREAM_REPO}" "${TRAVIS_BRANCH}"
exit 1
fi
@@ -45,3 +47,7 @@ mvn -B -V -q install -DskipTests -Dmaven.javadoc.skip=true -PcommunityDocker \
$([[ "${DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] && echo "-Dupstream.image.tag=latest")
popd
set +vex
echo "=========================== Finishing Build Script =========================="

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env bash
set +vx
function isPullRequestBuild() {
test "${TRAVIS_PULL_REQUEST}" != "false"
@@ -126,3 +127,4 @@ function retieveLatestTag() {
rm -rf "${LOCAL_PATH}"
}
set -vx

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -ev
echo "=========================== Starting Copy to Release Bucket Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
#
# Copy from S3 Release bucket to S3 eu.dl bucket
@@ -21,4 +23,9 @@ aws s3 cp --acl private \
aws s3 cp --acl private \
"${SOURCE}/alfresco-content-services-community-distribution-${RELEASE_VERSION}.zip" \
"${DESTINATION}/alfresco-content-services-community-distribution-${RELEASE_VERSION}.zip"
"${DESTINATION}/alfresco-content-services-community-distribution-${RELEASE_VERSION}.zip"
set +vex
echo "=========================== Finishing Copy to Release Bucket Script =========================="

View File

@@ -1,5 +1,7 @@
#!/usr/bin/env bash
set -ev
echo "=========================== Starting Init Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
# Maven Setup
@@ -7,6 +9,7 @@ mkdir -p "${HOME}/.m2" && cp -f .travis.settings.xml "${HOME}/.m2/settings.xml"
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
# Enable experimental docker features (for the image squash option)
@@ -16,3 +19,7 @@ sudo service docker restart
# not helpful in this script
# export HOST_IP=$(hostname -I | cut -f1 -d' ')
popd
set +vex
echo "=========================== Finishing Init Script =========================="

View File

@@ -1,8 +1,12 @@
#!/usr/bin/env bash
set -ev
echo "=========================== Starting Release Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
RELEASE_VERSION=${1}
DEVELOPMENT_VERSION=${2}
RELEASE_VERSION="${1}"
DEVELOPMENT_VERSION="${2}"
if [ -z "${RELEASE_VERSION}" ] || [ -z "${DEVELOPMENT_VERSION}" ]; then
echo "Please provide a Release and Development version in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
@@ -24,3 +28,8 @@ mvn -B \
-Dusername="${GIT_USERNAME}" \
-Dpassword="${GIT_PASSWORD}"
popd
set +vex
echo "=========================== Finishing Release Script =========================="

View File

@@ -1,5 +1,8 @@
#!/usr/bin/env bash
set -ev
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 docker tag.
@@ -10,6 +13,11 @@ if [ -z "${RELEASE_VERSION}" ]; then
exit 1
fi
if git rev-parse "${RELEASE_VERSION}^{tag}" &>/dev/null ; then
echo "The RELEASE_VERSION tag \"${RELEASE_VERSION}\" already exists in the git project"
exit 1
fi
# get the image name from the pom file
ALFRESCO_DOCKER_IMAGE="$(mvn -B -q help:evaluate -f ./docker-alfresco/pom.xml -Dexpression=image.name -DforceStdout)"
DOCKER_IMAGE_FULL_NAME="${ALFRESCO_DOCKER_IMAGE}:${RELEASE_VERSION}"
@@ -36,3 +44,9 @@ if docker_image_exists "${DOCKER_IMAGE_FULL_NAME}" ; then
else
echo "The ${RELEASE_VERSION} tag was not found"
fi
popd
set +vex
echo "=========================== Finishing Verify Release Tag Script =========================="