mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Moved packaging develop into its own directory
This commit is contained in:
17
packaging/scripts/travis/copy_to_release_bucket.sh
Executable file
17
packaging/scripts/travis/copy_to_release_bucket.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ev
|
||||
|
||||
if [ -z ${COMM_RELEASE_VERSION} ] || [ -z ${RELEASE_VERSION} ];
|
||||
then
|
||||
echo "Please provide a COMM_RELEASE_VERSION and RELEASE_VERSION in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
|
||||
exit -1
|
||||
fi
|
||||
|
||||
build_number=$1
|
||||
branch_name=$2
|
||||
build_stage=release
|
||||
SOURCE=s3://alfresco-artefacts-staging/alfresco-content-services-community/$build_stage/$branch_name/$build_number
|
||||
DESTINATION=s3://eu.dl.alfresco.com/release/community/$COMM_RELEASE_VERSION-build-$build_number
|
||||
|
||||
aws s3 cp --acl private $SOURCE/alfresco.war $DESTINATION/alfresco.war
|
||||
aws s3 cp --acl private $SOURCE/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip $DESTINATION/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip
|
31
packaging/scripts/travis/maven_release.sh
Executable file
31
packaging/scripts/travis/maven_release.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
releaseVersion=$1
|
||||
developmentVersion=$2
|
||||
scm_path=$(mvn help:evaluate -Dexpression=project.scm.url -q -DforceStdout)
|
||||
|
||||
# Use full history for release
|
||||
git checkout -B "${TRAVIS_BRANCH}"
|
||||
# Add email to link commits to user
|
||||
git config user.email "${GIT_EMAIL}"
|
||||
|
||||
if [ -z ${releaseVersion} ] || [ -z ${developmentVersion} ];
|
||||
then echo "Please provide a Release and Development verison in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
|
||||
exit -1
|
||||
else
|
||||
mvn --batch-mode \
|
||||
-PfullBuild,all-tas-tests \
|
||||
-Dusername="${GIT_USERNAME}" \
|
||||
-Dpassword="${GIT_PASSWORD}" \
|
||||
-DreleaseVersion=${releaseVersion} \
|
||||
-DdevelopmentVersion=${developmentVersion} \
|
||||
-Dbuild-number=${TRAVIS_BUILD_NUMBER} \
|
||||
-Dbuild-name="${TRAVIS_BUILD_STAGE_NAME}" \
|
||||
-Dscm-path=${scm_path} \
|
||||
-DscmCommentPrefix="[maven-release-plugin][skip ci]" \
|
||||
-DskipTests \
|
||||
"-Darguments=-DskipTests -Dbuild-number=${TRAVIS_BUILD_NUMBER} '-Dbuild-name=${TRAVIS_BUILD_STAGE_NAME}' -Dscm-path=${scm_path} -PfullBuild,all-tas-tests" \
|
||||
release:clean release:prepare release:perform \
|
||||
-Prelease
|
||||
fi
|
31
packaging/scripts/travis/verify_release_tag.sh
Executable file
31
packaging/scripts/travis/verify_release_tag.sh
Executable file
@@ -0,0 +1,31 @@
|
||||
#!/usr/bin/env bash
|
||||
set -e
|
||||
|
||||
if [ -v ${RELEASE_VERSION} ]||[ -z ${RELEASE_VERSION} ]; then
|
||||
echo "Please provide a RELEASE_VERSION in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
|
||||
exit -1
|
||||
fi
|
||||
# get the image name from the pom file
|
||||
alfresco_docker_image=$(mvn help:evaluate -f ./docker-alfresco/pom.xml -Dexpression=image.name -q -DforceStdout)
|
||||
docker_image_full_name="$alfresco_docker_image:$RELEASE_VERSION"
|
||||
|
||||
function docker_image_exists() {
|
||||
local image_full_name="$1"; shift
|
||||
local wait_time="${1:-5}"
|
||||
local search_term='Pulling|is up to date|not found'
|
||||
echo "Looking to see if $image_full_name already exists..."
|
||||
local result="$((timeout --preserve-status "$wait_time" docker 2>&1 pull "$image_full_name" &) | grep -v 'Pulling repository' | egrep -o "$search_term")"
|
||||
test "$result" || { echo "Timed out too soon. Try using a wait_time greater than $wait_time..."; return 1 ;}
|
||||
if echo $result | grep -vq 'not found'; then
|
||||
true
|
||||
else
|
||||
false
|
||||
fi
|
||||
}
|
||||
|
||||
if docker_image_exists $docker_image_full_name; then
|
||||
echo "Tag $RELEASE_VERSION already pushed, release process will interrupt."
|
||||
exit -1
|
||||
else
|
||||
echo "The $RELEASE_VERSION tag was not found"
|
||||
fi
|
Reference in New Issue
Block a user