Clean variables + comments [skip ci]

This commit is contained in:
David Edwards
2020-03-03 16:21:18 +00:00
parent 5bcf4be8a9
commit 288978012d
4 changed files with 16 additions and 15 deletions
+5 -5
View File
@@ -17,8 +17,8 @@ env:
global:
- VERSION_EDITION=Community
# Must be in the format <alfresco-version>-<additional_versioning> ie. 6.3.0-repo-xxxx-x or 6.3.0-A-x
- release_version=6.3.0-repo-4735-2-13
- development_version=6.3.0-SNAPSHOT
- RELEASE_VERSION=6.3.0-repo-4735-2-13
- DEVELOPMENT_VERSION=6.3.0-SNAPSHOT
- COMM_RELEASE_VERSION=202003-test-release
branches:
@@ -110,11 +110,10 @@ matrix:
- travis_wait 30 mvn install -q -f tests/tas-integration/pom.xml -Pall-tas-tests -Denvironment=default -DrunBugs=false
- stage: Engineering Release
name: "Maven release"
# Leaving blank will auto increment the
install: skip
# Fail the job if there is a docker image tag that matches the release_version (or project version in the POM if not set)
# Fail the job if there is a docker image tag that matches the RELEASE_VERSION (or project version in the POM if not set)
before_script: bash ./scripts/travis/verifyReleaseTag.sh
script: bash ./scripts/travis/buildRelease.sh ${release_version} ${development_version}
script: bash ./scripts/travis/buildRelease.sh ${RELEASE_VERSION} ${DEVELOPMENT_VERSION}
# if the release stage fails rollback
after_failure:
- mvn release:rollback -DscmCommentPrefix="[maven-release-plugin][skip ci] "
@@ -130,6 +129,7 @@ matrix:
acl: private
upload_dir: "/alfresco-content-services-community/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}/"
local_dir: deploy_dir
# extra check to run only on master or develop branch
on:
all_branches: true
condition: $TRAVIS_BRANCH =~ ^(master|develop|feature/REPO-4735_Add-release-stages-2)$
+3 -2
View File
@@ -1,8 +1,9 @@
#!/usr/bin/env bash
set -e
if [ ${COMM_RELEASE_VERSION} = "" ];
if [ -z ${COMM_RELEASE_VERSION} ] || [ -z ${RELEASE_VERSION} ];
then
echo "Please provide a COMM_RELEASE_VERSION and Development verison in the format <acs-version>-<additional-info> (6.3.0-EA or 6.3.0-SNAPSHOT)"
exit -1
fi
@@ -13,4 +14,4 @@ SOURCE=s3://alfresco-artefacts-staging/alfresco-content-services-community/$buil
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
aws s3 cp --acl private $SOURCE/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip $DESTINATION/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip
+2 -2
View File
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -ev
if [ -z ${release_version} ];
if [ -z ${RELEASE_VERSION} ];
then
exit -1
fi
@@ -10,4 +10,4 @@ DEPLOYMENT_DIR=deploy_dir
mkdir $DEPLOYMENT_DIR -p
cp war/target/alfresco.war ${DEPLOYMENT_DIR}
cp distribution/target/alfresco-content-services-community-distribution-$release_version.zip ${DEPLOYMENT_DIR}
cp distribution/target/alfresco-content-services-community-distribution-$RELEASE_VERSION.zip ${DEPLOYMENT_DIR}
+6 -6
View File
@@ -3,16 +3,16 @@ set -e
# get the image name from the pom file
alfresco_docker_image=$(mvn help:evaluate -f ./docker-alfresco/pom.xml -Dexpression=image.name -q -DforceStdout)
if [ -v ${release_version} ]||[ -z ${release_version} ]; then
if [ -v ${RELEASE_VERSION} ]||[ -z ${RELEASE_VERSION} ]; then
# if we don't have a user added release version, get the verison from the pom
pom_version=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)
if echo $pom_version | grep -q ".*-SNAPSHOT"; then
release_version=${pom_version%-*} # remove everything after the last '-'
RELEASE_VERSION=${pom_version%-*} # remove everything after the last '-'
else
release_version=$pom_version
RELEASE_VERSION=$pom_version
fi
fi
docker_image_full_name="$alfresco_docker_image:$release_version"
docker_image_full_name="$alfresco_docker_image:$RELEASE_VERSION"
function docker_image_exists() {
local image_full_name="$1"; shift
@@ -29,8 +29,8 @@ function docker_image_exists() {
}
if docker_image_exists $docker_image_full_name; then
echo "Tag $release_version already pushed, release process will interrupt."
echo "Tag $RELEASE_VERSION already pushed, release process will interrupt."
exit -1
else
echo "The $release_version tag was not found"
echo "The $RELEASE_VERSION tag was not found"
fi