Compare commits

..
14 changed files with 47 additions and 34 deletions
+3 -5
View File
@@ -29,14 +29,14 @@ 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-TEST3
- DEVELOPMENT_VERSION=7.0.0-TEST4-SNAPSHOT
- RELEASE_VERSION=7.0.0-TEST4
- DEVELOPMENT_VERSION=7.0.0-TEST5-SNAPSHOT
stages:
- name: test
if: commit_message !~ /\[skip tests\]/
- name: docker_latest
if: fork = false AND type != pull_request AND (branch = master OR branch = feature/REPO-5111_repo_build)
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\/.*/ OR branch = feature/REPO-5111_repo_build)
- name: publish
@@ -113,7 +113,6 @@ jobs:
- name: "Release and Copy to S3 Staging"
stage: release
install: travis_retry travis_wait 40 mvn -B -V clean install -DskipTests -Dmaven.javadoc.skip=true
before_script: bash scripts/travis/verify_release_tag.sh
script: travis_wait 40 bash scripts/travis/maven_release.sh
before_deploy:
@@ -133,7 +132,6 @@ jobs:
upload_dir: "alfresco-content-services-community/release/${TRAVIS_BRANCH}/${TRAVIS_BUILD_NUMBER}"
on:
all_branches: true
condition: ${TRAVIS_BRANCH} =~ ^(master|develop)$
- name: "Copy to S3 Release"
stage: publish
+1 -1
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<dependencies>
+1 -1
View File
@@ -1,4 +1,4 @@
FROM quay.io/alfresco/alfresco-community-repo-base:${upstream.image.tag}
FROM alfresco/alfresco-community-repo-base:${upstream.image.tag}
# Set default docker_context. Will / Can be overriden with maven.
ARG resource_path=target
+10 -11
View File
@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<properties>
@@ -301,16 +301,15 @@
</build>
</image>
<!-- DockerHub image -->
<!-- TODO enable image build&push -->
<!-- <image>-->
<!-- <name>${image.name}:${project.version}</name>-->
<!-- <build>-->
<!-- <dockerFileDir>${project.basedir}/</dockerFileDir>-->
<!-- <buildOptions>-->
<!-- <squash>true</squash>-->
<!-- </buildOptions>-->
<!-- </build>-->
<!-- </image>-->
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
<buildOptions>
<squash>true</squash>
</buildOptions>
</build>
</image>
</images>
</configuration>
<executions>
+4 -5
View File
@@ -2,21 +2,21 @@
<modelVersion>4.0.0</modelVersion>
<artifactId>acs-community-packaging</artifactId>
<name>Alfresco Content Services Community Packaging</name>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
<packaging>pom</packaging>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<relativePath>../alfresco-community-repo/pom.xml</relativePath>
<version>8.300-TEST1</version>
<version>8.300-TEST2</version>
</parent>
<scm>
<connection>scm:git:https://github.com/Alfresco/acs-community-packaging.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/acs-community-packaging.git</developerConnection>
<url>https://github.com/Alfresco/acs-community-packaging</url>
<tag>7.0.0-TEST3</tag>
<tag>7.0.0-TEST4</tag>
</scm>
<distributionManagement>
@@ -31,7 +31,7 @@
</distributionManagement>
<properties>
<dependency.alfresco-community-repo.version>8.300-TEST1</dependency.alfresco-community-repo.version>
<dependency.alfresco-community-repo.version>8.300-TEST2</dependency.alfresco-community-repo.version>
<!-- Set to "Community Early Access" to add to the version.edition property in version.properties -->
<version.edition>Community</version.edition>
@@ -39,7 +39,6 @@
<build-number>local</build-number>
<image.tag>latest</image.tag>
<image.registry>quay.io</image.registry>
<upstream.image.tag>${dependency.alfresco-community-repo.version}</upstream.image.tag>
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<packaging>pom</packaging>
+4 -3
View File
@@ -29,17 +29,18 @@ 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
# TODO UNCOMMENT THIS LINE: 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}" "master")" ] ; then
printf "Upstream dependency is not up to date with %s / %s\n" "${UPSTREAM_REPO}" "${TRAVIS_BRANCH}"
exit 1
fi
# Search, checkout and build the same branch on the upstream project in case of SNAPSHOT dependencies
# Otherwise just checkout the upstream dependency sources
# Otherwise, checkout the upstream tag and build its Docker image (use just "mvn package", without "mvn install")
if [[ "${DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then
pullAndBuildSameBranchOnUpstream "${UPSTREAM_REPO}" "-PcommunityDocker"
else
pullUpstreamTag "${UPSTREAM_REPO}" "${DEPENDENCY_VERSION}"
pullUpstreamTagAndBuildDockerImage "${UPSTREAM_REPO}" "${DEPENDENCY_VERSION}" "-PcommunityDocker"
fi
# Build the current project
+17 -1
View File
@@ -94,6 +94,22 @@ function pullUpstreamTag() {
cloneRepo "${UPSTREAM_REPO}" "${TAG}"
}
function pullUpstreamTagAndBuildDockerImage() {
local UPSTREAM_REPO="${1}"
local TAG="${2}"
local EXTRA_BUILD_ARGUMENTS="${3}"
cloneRepo "${UPSTREAM_REPO}" "${TAG}"
pushd "$(dirname "${BASH_SOURCE[0]}")/../../../"
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V clean package -DskipTests -Dmaven.javadoc.skip=true "-Dimage.tag=${TAG}" ${EXTRA_BUILD_ARGUMENTS}
popd
}
function pullAndBuildSameBranchOnUpstream() {
local UPSTREAM_REPO="${1}"
local EXTRA_BUILD_ARGUMENTS="${2}"
@@ -107,7 +123,7 @@ function pullAndBuildSameBranchOnUpstream() {
cd "$(basename "${UPSTREAM_REPO%.git}")"
mvn -B -V -q clean install -DskipTests -Dmaven.javadoc.skip=true ${EXTRA_BUILD_ARGUMENTS}
mvn -B -V install -DskipTests -f packaging/tests/pom.xml
mvn -B -V -q install -DskipTests -f packaging/tests/pom.xml
popd
}
+1 -1
View File
@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<modules>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<developers>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<developers>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<developers>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<developers>
+1 -1
View File
@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.0.0-TEST3</version>
<version>7.0.0-TEST4</version>
</parent>
<developers>