Compare commits

...
Author SHA1 Message Date
David Edwards bcbdbe24ed [maven-release-plugin][skip ci]prepare release acs-community-packaging-repo-4735-1 2020-02-03 10:28:01 +00:00
David Edwards c29be6e0c5 [maven-release-plugin] rollback the release of acs-community-packaging-6.3.0-alpha-6 2020-01-31 16:23:19 +00:00
David Edwards f49a6180ab [maven-release-plugin][skip ci]prepare for next development iteration 2020-01-31 16:02:56 +00:00
David Edwards 5f23701a8a [maven-release-plugin][skip ci]prepare release acs-community-packaging-6.3.0-alpha-6 2020-01-31 16:02:46 +00:00
David Edwards 8b52cfe842 Fix .travis.settings.xml 2020-01-31 14:24:36 +00:00
David Edwards 050b92b6a0 Revert "Update buildRelease.sh"
This reverts commit ebb33bda40.
2020-01-31 14:24:18 +00:00
David Edwards ebb33bda40 Update buildRelease.sh 2020-01-31 14:22:44 +00:00
David Edwards f6e275b006 REPO-4735 Update setting.xml with internal details 2020-01-31 14:20:05 +00:00
David Edwards ea9b2226bc Add settings for maven 2020-01-31 12:47:31 +00:00
David Edwards 37305d6c9a Clean up travis file [skip ci] 2020-01-31 12:47:21 +00:00
David Edwards fe35f9c405 Add commit prefix 2020-01-31 12:34:15 +00:00
David Edwards 644d078bce Fixed buildRelease.sh 2020-01-31 12:31:30 +00:00
David Edwards 603fd42135 Fix build release 2020-01-31 12:27:26 +00:00
David Edwards 748008bbdd Test development release 2020-01-31 12:19:38 +00:00
David Edwards 23b5a1c2ad Update version for auto increment 2020-01-31 12:17:48 +00:00
David Edwards ef4f20e2d6 Update buildRelease.sh
replaced bamboo variables and added an automated version command
2020-01-30 10:55:11 +00:00
David Edwards 686d87ba12 Create engineeringReleaseDeployment.sh 2020-01-30 10:54:36 +00:00
David Edwards b3c00c30cc Update .travis.yml 2020-01-29 15:14:15 +00:00
David Edwards a1050850a6 Test pip install thorugh travis 2020-01-29 15:08:55 +00:00
David Edwards b619edf527 Make companyReleaseDeployment.sh executable 2020-01-29 13:01:17 +00:00
David Edwards 35cddb41ae Make buildRelease.sh executable 2020-01-29 13:01:16 +00:00
David Edwards eff91d1938 Update .travis.yml 2020-01-29 12:58:13 +00:00
David Edwards c863fb1415 Update buildRelease.sh 2020-01-29 12:56:31 +00:00
David Edwards 3f9358d36e Tidy verifyReleaseTag.sh 2020-01-29 12:55:13 +00:00
David Edwards 7148989131 Update scripts 2020-01-29 12:50:28 +00:00
David Edwards c4fe156c22 REPO-4735 Create build script 2020-01-29 12:50:00 +00:00
David Edwards 31045e9be9 Update .travis.yml 2020-01-29 12:33:30 +00:00
David Edwards 96e541e093 Update .travis.yml 2020-01-29 12:30:12 +00:00
David Edwards 0784965343 Fix travis.yml 2020-01-29 12:25:37 +00:00
David Edwards fbe8de0806 Skip install stage 2020-01-29 12:04:10 +00:00
David Edwards 3bed192359 REPO-4735 Add commented deploy section 2020-01-29 12:03:09 +00:00
David Edwards a560fefaf9 REPO-4735 Create companyReleaseDeployment.sh 2020-01-29 12:02:45 +00:00
David Edwards b9289e78b9 RPEO- 4735 Fail job if tag exists 2020-01-24 14:33:21 +00:00
David Edwards ab97fdc1f2 Test travis variable for script. 2020-01-24 13:58:51 +00:00
David Edwards e315dc33c7 Fix verify script 2020-01-24 13:53:24 +00:00
David Edwards 5d2d97cd84 Make verifyReleaseTag.sh executable 2020-01-24 12:10:38 +00:00
David Edwards d792192894 REPO-4735 Create script to check if docker image tag exists 2020-01-24 12:04:23 +00:00
David Edwards 84b7bf0714 [skip-ci] add comments 2020-01-24 02:01:46 +00:00
David Edwards b4ea7974cf [skip-ci] REPO-4735 Begin adding deploy stage 2020-01-24 01:57:09 +00:00
David Edwards 90d8846198 add comments [skip-ci] 2020-01-23 16:37:44 +00:00
David Edwards c3e2f46616 Add branch back to stages 2020-01-23 15:58:12 +00:00
David Edwards 5a78caede3 Add install:skip to engineering release placeholders 2020-01-23 15:57:51 +00:00
David Edwards c947e76a54 Add install skips to company release stage
Not necessary to re-build packaging as we just want to copy from our s3 buckets
2020-01-23 15:56:39 +00:00
David Edwards ac57bf56c6 Set company release stage to master branch only 2020-01-23 15:23:39 +00:00
David Edwards 30713000df Add branch to release stage templates 2020-01-23 15:20:05 +00:00
David Edwards 41722e9855 REPO-4735_ Add stage place holders, enabled only on master or develop 2020-01-23 15:06:22 +00:00
David Edwards c45648d3ae Fix phantom build job 2020-01-23 14:30:33 +00:00
David Edwards 00ae0d0e0e Add branch to build 2020-01-23 13:57:56 +00:00
David Edwards dc919cce72 REPO-4735_ Add stages to build 2020-01-23 13:56:35 +00:00
17 changed files with 230 additions and 20 deletions
+44
View File
@@ -0,0 +1,44 @@
<settings>
<profiles>
<profile>
<id>alfresco-internal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco-internal</id>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/internal</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>alfresco-internal</id>
<name>Alfresco Internal Repository</name>
<url>https://artifacts.alfresco.com/nexus/content/groups/public</url>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<servers>
<server>
<id>alfresco-internal</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
<server>
<id>alfresco-public</id>
<username>${env.MAVEN_USERNAME}</username>
<password>${env.MAVEN_PASSWORD}</password>
</server>
</servers>
</settings>
+65 -2
View File
@@ -19,10 +19,18 @@ branches:
only:
- master
- develop
- feature/REPO-4735_Add-release-stages
matrix:
stages:
- name: test
if: branch !=feature/REPO-4735_Add-release-stages
- engineering release
- company release
jobs:
include:
- name: "WhiteSource scan"
- stage: test
name: "WhiteSource scan"
# only on develop and if it is not a PR
if: fork = false AND branch = develop AND type != pull_request
install:
@@ -88,3 +96,58 @@ matrix:
- ./tests/scripts/wait-for-alfresco-start.sh "http://localhost:8082/alfresco"
script:
- 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"
# only on develop or master branch
if: fork = false AND branch = feature/REPO-4735_Add-release-stages AND commit_message !~ /\[no-release\]/
# Leaving blank will auto increment the
env:
- release_version=repo-4735-1
- development_version=6.3.0-alpha-6-SNAPSHOT
- COMM_RELEASE_VERSION=
# 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_install:
- ./scripts/travis/verifyReleaseTag.sh
- "cp .travis.settings.xml $HOME/.m2/settings.xml"
# install: skip # Release command from bamboo
install: ./scripts/travis/buildRelease.sh ${release_version} ${development_version}
script:
- travis_wait 30 echo "This is the Maven relase stage"
# before_deploy: pip install awscli
# deploy:
# -provider: s3
# access_key_id: ${AWS_ACCESS_KEY_ID}
# secret_access_key: ${AWS_SECRET_ACCESS_KEY}
# bucket: "alfresco-artefacts-staging/alfresco-content-services-community/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}/"
# skip_cleanup: true
# acl: private
# glob: war/target/alfresco.war
# on:
# all_branches:true
# condition: $TRAVIS_BRANCH =~ ^(master|develop)$
# -provider: s3
# access_key_id: ${AWS_ACCESS_KEY_ID}
# secret_access_key: ${AWS_SECRET_ACCESS_KEY}
# bucket: "alfresco-artefacts-staging/alfresco-content-services-community/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}/"
# skip_cleanup: true
# acl: private
# glob: distribution/target/*-distribution*.zip
# on:
# all_branches:true
# condition: $TRAVIS_BRANCH =~ ^(master|develop)$
# -provider: script
# script: ./scripts/travis/companyReleaseDeployment.sh ${TRAVIS_BUILD_NUMBER} ${TRAVIS_BRANCH}
# on:
# branch: master
# # This stage could use a script to deploy to S3, as in bamboo, or the above stage can include a deploy section.
# - name: Push to S3 # TODO currently placeholder stage
# install: skip
# script:
# - travis_wait 30 echo "This is the Push to S3 stage"
- stage: "Company Release"
# only on master branch
if: fork = false AND branch = feature/REPO-4735_Add-release-stages AND commit_message !~ /\[no-release\]/
name: "Copy to S3 Release"
install: pip install awscli --user
script:
- travis_wait 30 echo "This is the Copy to S3 Release stage" # As this is copying between S3 buckets a script will be required.
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>repo-4735-1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>repo-4735-1</version>
<relativePath>../pom.xml</relativePath>
</parent>
+2 -2
View File
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>acs-community-packaging</artifactId>
<name>Alfresco Content Services Community Packaging</name>
<version>6.3.0-SNAPSHOT</version>
<version>repo-4735-1</version>
<packaging>pom</packaging>
<parent>
@@ -49,7 +49,7 @@
<connection>scm:git:git@github.com:Alfresco/acs-community-packaging.git</connection>
<developerConnection>scm:git:git@github.com:Alfresco/acs-community-packaging.git</developerConnection>
<url>https://github.com/Alfresco/acs-community-packaging</url>
<tag>HEAD</tag>
<tag>acs-community-packaging-repo-4735-1</tag>
</scm>
<distributionManagement>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>repo-4735-1</version>
<relativePath>../pom.xml</relativePath>
</parent>
<packaging>pom</packaging>
+31
View 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)
if [ -z ${releaseVersion} ] || [ -z ${developmentVersion} ];
then echo skip
# mvn --batch-mode \
# -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} " \
# -Prelease \
# release:prepare release:perform
else
mvn --batch-mode \
-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} " \
-Prelease \
release:prepare release:perform
fi
+16
View File
@@ -0,0 +1,16 @@
#!/usr/bin/env bash
set -e
if [ ${COMM_RELEASE_VERSION} = "" ];
then
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
@@ -0,0 +1,21 @@
#!/usr/bin/env bash
set -env
build_number=$1
branch_name=$2
release_stage=release
s3_location=s3://alfresco-artefacts-staging/alfresco-content-services-community/$release_stage/$branch_name/$build_number/
echo_s3_location=https://s3.console.aws.amazon.com/s3/buckets/alfresco-artefacts-staging/alfresco-content-services-community/$release_stage
aws s3 cp --acl private war/target/alfresco.war $s3_location
aws s3 cp --acl private distribution/target/*-distribution*.zip $s3_location
mkdir -p target
touch target/README.txt
distribution_zip_name=`ls distribution/target/*-distribution*.zip | xargs -n 1 basename`
echo "
$echo_s3_location/$branch_name/$build_number/alfresco.war\n
$echo_s3_location/$branch_name/$build_number/$distribution_zip_name\n
" >> target/README.txt
+35
View File
@@ -0,0 +1,35 @@
#!/usr/bin/env bash
set -e
alfresco_docker_image="alfresco/alfresco-content-repository-community"
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 '-'
else
release_version=$pom_version
fi
fi
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
+2 -2
View File
@@ -1,13 +1,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>content-repository-community-tas-tests-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+2 -2
View File
@@ -4,13 +4,13 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>content-repository-community-cmis-test</artifactId>
<name>content-repository-community-cmis-test</name>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tas-tests-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+2 -2
View File
@@ -4,13 +4,13 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>content-repository-community-email-test</artifactId>
<name>content-repository-community-email-test</name>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tas-tests-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+2 -2
View File
@@ -4,13 +4,13 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>content-repository-community-integration-test</artifactId>
<name>content-repository-community-integration-test</name>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tas-tests-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+2 -2
View File
@@ -4,13 +4,13 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>content-repository-community-restapi-test</artifactId>
<name>content-repository-community-restapi-test</name>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tas-tests-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+2 -2
View File
@@ -4,13 +4,13 @@
<groupId>org.alfresco.tas</groupId>
<artifactId>content-repository-community-webdav-test</artifactId>
<name>content-repository-community-webdav-test</name>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<packaging>jar</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tas-tests-parent</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>6.3.0-alpha-6-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>6.3.0-SNAPSHOT</version>
<version>repo-4735-1</version>
<relativePath>../pom.xml</relativePath>
</parent>