mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
APPS-241: - address PR comments
- extract release version and development version from commit message
This commit is contained in:
@@ -27,10 +27,6 @@ install: skip
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
- docker
|
- docker
|
||||||
env:
|
|
||||||
global:
|
|
||||||
- RELEASE_VERSION=2.7.3
|
|
||||||
- DEVELOPMENT_VERSION=2.7.3-SNAPSHOT
|
|
||||||
|
|
||||||
stages:
|
stages:
|
||||||
- name: Build AGS
|
- name: Build AGS
|
||||||
|
@@ -138,3 +138,12 @@ Unzip it and change to the "solr" folder within it. Start the Solr server using
|
|||||||
solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
|
solr start -a "-Dcreate.alfresco.defaults=alfresco,archive"
|
||||||
```
|
```
|
||||||
Start your repository
|
Start your repository
|
||||||
|
|
||||||
|
## Release process
|
||||||
|
|
||||||
|
In order to release a new community or enterprise version you need to:
|
||||||
|
* make sure you are either on a release branch or on master branch
|
||||||
|
* push a new commit message containing the following [$release_type release $release_version $development_version] where
|
||||||
|
* release_type should contain one of the following: *internal community*/*internal enterprise* -> for internal releases or _community_/_enterprise_
|
||||||
|
* release_version must contain the desired release version
|
||||||
|
* development_version must contain the next development version
|
@@ -1,16 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
GIT_COMMITTER_NAME=alfresco-build
|
|
||||||
GIT_COMMITTER_EMAIL=info@alfresco.com
|
|
||||||
|
|
||||||
# Use full history for release
|
# Use full history for release
|
||||||
git checkout -B "${TRAVIS_BRANCH}"
|
git checkout -B "${TRAVIS_BRANCH}"
|
||||||
# Add email to link commits to user
|
# Add email to link commits to user
|
||||||
git config user.email "${GIT_COMMITTER_EMAIL}"
|
git config user.email "${GIT_COMMITTER_EMAIL}"
|
||||||
git config user.name "${GIT_COMMITTER_NAME}"
|
git config user.name "${GIT_COMMITTER_NAME}"
|
||||||
|
|
||||||
|
|
||||||
if [ -z ${RELEASE_VERSION} ] || [ -z ${DEVELOPMENT_VERSION} ];
|
if [ -z ${RELEASE_VERSION} ] || [ -z ${DEVELOPMENT_VERSION} ];
|
||||||
then echo "Please provide a Release and Development verison"
|
then echo "Please provide a Release and Development verison"
|
||||||
exit -1
|
exit -1
|
||||||
|
@@ -1,34 +1,40 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
|
||||||
|
|
||||||
# TODO: check if the message is in the right format eg [internal community release 3.4.0 3.4.0-SNAPSHOT]
|
release_message=$(echo $TRAVIS_COMMIT_MESSAGE | ggrep -Po '\[(internal )*(community|enterprise)\srelease\s(\d\.)+(\d|[a-z])\s(\d\.)+\d-SNAPSHOT\]')
|
||||||
|
|
||||||
|
if [ ! -n "$release_message" ]; then
|
||||||
|
echo "The commit message is in the wrong format or it does not contain all the required properties."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
export RELEASE_VERSION=$(echo $TRAVIS_COMMIT_MESSAGE | grep -Po '(\d\.)+\d ')
|
export RELEASE_VERSION=$(echo $release_message | ggrep -Po '\g<1>(\d\.)+(\d|[a-z])')
|
||||||
export DEVELOPMENT_VERSION=$(echo $TRAVIS_COMMIT_MESSAGE | grep -Po '(\d\.)+\d-SNAPSHOT')
|
export DEVELOPMENT_VERSION=$(echo $release_message | ggrep -Po '(\d\.)+\d-SNAPSHOT')
|
||||||
|
|
||||||
export release_type=$(echo $TRAVIS_COMMIT_MESSAGE | grep -Po 'internal (community|enterprise)')
|
echo "Release version is set to $RELEASE_VERSION"
|
||||||
|
echo "Development version is set to $DEVELOPMENT_VERSION"
|
||||||
|
|
||||||
|
release_type=$(echo $release_message | ggrep -Po '(internal\s)*(community|enterprise)')
|
||||||
|
|
||||||
if [[ $release_type =~ "community" ]]; then
|
if [[ $release_type =~ "community" ]]; then
|
||||||
echo "Setting Community release variables..."
|
echo "Setting Community Release variables..."
|
||||||
if [[ $release_type =~ "internal" ]]; then
|
if [[ $release_type =~ "internal" ]]; then
|
||||||
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the Internal release"
|
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the Internal release"
|
||||||
export ARTIFACTS_UPLOAD_BUCKET="alfresco-artefacts-staging"
|
export ARTIFACTS_UPLOAD_BUCKET="alfresco-artefacts-staging"
|
||||||
export ARTIFACTS_UPLOAD_DIR="community/alfresco-governance-services/release/${TRAVIS_BRANCH}"
|
export ARTIFACTS_UPLOAD_DIR="community/alfresco-governance-services/release/${TRAVIS_BRANCH}"
|
||||||
else
|
else
|
||||||
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the release"
|
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the release"
|
||||||
# export ARTIFACTS_UPLOAD_BUCKET="alfresco-artefacts-staging" ->
|
export ARTIFACTS_UPLOAD_BUCKET="eu.dl.alfresco.com"
|
||||||
# export ARTIFACTS_UPLOAD_DIR="community/alfresco-governance-services/release/${TRAVIS_BRANCH}"
|
export ARTIFACTS_UPLOAD_DIR="release/community/RM/${RELEASE_VERSION}"
|
||||||
fi
|
fi
|
||||||
elif [[ $release_type =~ "enterprise" ]]; then
|
elif [[ $release_type =~ "enterprise" ]]; then
|
||||||
echo "Setting Enterprise release variables..."
|
echo "Setting Enterprise Release variables..."
|
||||||
if [[ $release_type =~ "internal" ]]; then
|
if [[ $release_type =~ "internal" ]]; then
|
||||||
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the Internal release"
|
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the Internal release"
|
||||||
export ARTIFACTS_UPLOAD_BUCKET="alfresco-artefacts-staging"
|
export ARTIFACTS_UPLOAD_BUCKET="alfresco-artefacts-staging"
|
||||||
export ARTIFACTS_UPLOAD_DIR="enterprise/alfresco-governance-services/release/${TRAVIS_BRANCH}"
|
export ARTIFACTS_UPLOAD_DIR="enterprise/alfresco-governance-services/release/${TRAVIS_BRANCH}"
|
||||||
else
|
else
|
||||||
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the release"
|
echo "Setting ARTIFACTS_UPLOAD_BUCKET and ARTIFACTS_UPLOAD_DIR for the release"
|
||||||
# export ARTIFACTS_UPLOAD_BUCKET="alfresco-artefacts-staging" ->
|
export ARTIFACTS_UPLOAD_BUCKET="eu.dl.alfresco.com"
|
||||||
# export ARTIFACTS_UPLOAD_DIR="enterprise/alfresco-governance-services/release/${TRAVIS_BRANCH}"
|
export ARTIFACTS_UPLOAD_DIR="release/enterprise/RM/${RELEASE_VERSION}"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
@@ -1,12 +1,12 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
if [ $1 == 'community' ]; then
|
if [ $1 == 'community' ]; then
|
||||||
mkdir "artifacts_dir"
|
mkdir "artifacts_dir"
|
||||||
cp rm-community/rm-community-repo/target/alfresco-rm-*community*amp artifacts_dir
|
cp rm-community/rm-community-repo/target/alfresco-rm-*community*amp artifacts_dir
|
||||||
cp rm-community/rm-community-share/target/alfresco-rm-*community*amp artifacts_dir
|
cp rm-community/rm-community-share/target/alfresco-rm-*community*amp artifacts_dir
|
||||||
|
cd artifacts_dir
|
||||||
zip alfresco-rm-community-${RELEASE_VERSION}.zip *amp
|
zip alfresco-rm-community-${RELEASE_VERSION}.zip *amp
|
||||||
cp alfresco-rm-community-${RELEASE_VERSION}.zip artifacts_dir
|
|
||||||
ls artifacts_dir
|
ls artifacts_dir
|
||||||
#elif [ $1 == "enterprise" ]; then
|
#elif [ $1 == "enterprise" ]; then
|
||||||
fi
|
fi
|
||||||
|
@@ -4,3 +4,5 @@ env:
|
|||||||
- AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api
|
- AUTOMATION_ENTERPRISE_PATH=rm-automation/rm-automation-enterprise-rest-api
|
||||||
- AUTOMATION_UI_PATH=rm-automation/rm-automation-ui
|
- AUTOMATION_UI_PATH=rm-automation/rm-automation-ui
|
||||||
- S3_INSTALLER_PATH=/eu.dl.alfresco.com/release/enterprise/5.2/5.2.7/5.2.7.4/alfresco-content-services-installer-5.2.7.4-linux-x64.bin
|
- S3_INSTALLER_PATH=/eu.dl.alfresco.com/release/enterprise/5.2/5.2.7/5.2.7.4/alfresco-content-services-installer-5.2.7.4-linux-x64.bin
|
||||||
|
- GIT_COMMITTER_NAME=alfresco-build
|
||||||
|
- GIT_COMMITTER_EMAIL=info@alfresco.com
|
Reference in New Issue
Block a user