ATS-421 : Create Travis build for "alfresco-transform-core" (#21)

* ATS-421 : ATS-400: Create Travis build for "alfresco-transform-core"
   - rename mvn profile from 'enterpriseDocker' to 'local'
   - add config to publish docker image on both Quay and Docker
   - remove unused 'master' profile - similar to ATS, publish images only from master branch and on Release
   - update <distributionManagement> to publish artefacts to Nexus public (rather than Enterprise Releases)
   - add travis build configs
   - include SP branches to travis build
  - add documentation on build&release process
This commit is contained in:
DenisGabriela 2019-05-15 13:30:23 +03:00 committed by GitHub
parent ce9f71f24d
commit a9218b16d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 491 additions and 156 deletions

82
.travis.yml Normal file
View File

@ -0,0 +1,82 @@
---
language: java
jdk: openjdk11
dist: trusty
git:
depth: false
quiet: true
services:
- docker
cache:
directories:
- ${HOME}/.m2/repository
branches:
only:
- master
- SP/1.3.N
- SP/2.0.N
- release
- release/SP/1.3.N
- release/SP/2.0.N
- company_release
- /^ATS-.*$/
stages:
- build
- tests
- release
- company_release
jobs:
include:
- name: "Build"
stage: build
if: branch NOT IN (company_release)
before_install: bash _ci/init.sh
script: bash _ci/build.sh
- name: "WhiteSource"
stage: build
if: branch NOT IN (company_release)
before_install: bash _ci/init.sh
script: bash _ci/whitesource.sh
- name: "Release"
stage: release
if: branch IN (release, release/SP/1.3.N, release/SP/2.0.N)
before_install: bash _ci/init.sh
script: bash _ci/release.sh
before_deploy: source _ci/prepare_staging_deploy.sh
deploy:
provider: s3
access_key_id: "${STAGING_AWS_ACCESS_KEY}"
secret_access_key: "${STAGING_AWS_SECRET_KEY}"
bucket: "alfresco-artefacts-staging"
skip_cleanup: true
region: "eu-west-1"
local_dir: "deploy_dir"
upload-dir: "enterprise/AlfrescoTransformServices/TransformEngines/${VERSION}"
on:
branch: release
- name: "Company Release"
stage: company_release
if: branch = company_release
before_install: bash _ci/init.sh
script: echo "NoOp"
before_deploy: source _ci/prepare_release_deploy.sh
deploy:
provider: s3
access_key_id: "${RELEASE_AWS_ACCESS_KEY}"
secret_access_key: "${RELEASE_AWS_SECRET_KEY}"
bucket: "eu.dl.alfresco.com"
skip_cleanup: true
region: "eu-west-1"
local_dir: "deploy_dir"
upload-dir: "release/enterprise/AlfrescoTransformServices/TransformEngines/${VERSION}"
on:
branch: company_release

View File

@ -23,3 +23,9 @@ The build plan in Bamboo is PLAT-TRANS
Please use [this guide](https://github.com/Alfresco/alfresco-jodconverter/blob/master/CONTRIBUTING.md) to make a
contribution to the project.
## Release Process
For a complete walk-through check out the
[build-and-release.MD](https://github.com/Alfresco/alfresco-transform-core/tree/master/docs/build-and-release.md)
under the `docs` folder.

21
_ci/build.sh Normal file
View File

@ -0,0 +1,21 @@
#!/usr/bin/env bash
echo "=========================== Starting Build&Test Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
# Always build the image, but only publish from the "master" branch
[ "${TRAVIS_PULL_REQUEST}" = "false" ] && [ "${TRAVIS_BRANCH}" = "master" ] && PROFILE="internal" || PROFILE="local"
mvn -B -U \
clean install \
-DadditionalOption=-Xdoclint:none -Dmaven.javadoc.skip=true \
"-P${PROFILE}"
docker ps -a -q | xargs -r -l docker stop ; docker ps -a -q | xargs -r -l docker rm
popd
set +vex
echo "=========================== Finishing Build&Test Script =========================="

15
_ci/init.sh Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/env bash
echo "=========================== Starting Init Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
mkdir -p ${HOME}/.m2 && cp -rf _ci/settings.xml ${HOME}/.m2/
echo "${QUAY_PASSWORD}" | docker login -u="alfresco+bamboo" --password-stdin quay.io
find "${HOME}/.m2/repository/" -type d -name "*-SNAPSHOT*" | xargs -r -l rm -rf
popd
set +vex
echo "=========================== Finishing Init Script =========================="

View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
echo "========================== Starting Prepare Release Deploy Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
# Identify latest annotated tag (latest version)
export VERSION=$(git describe --abbrev=0 --tags)
mkdir -p deploy_dir
# Download the WhiteSource report
mvn org.alfresco:whitesource-downloader-plugin:inventoryReport \
-N \
"-Dorg.whitesource.product=Transform Service" \
-DsaveReportAs=deploy_dir/3rd-party.xlsx
echo "Local deploy directory content:"
ls -lA deploy_dir
popd
set +vex
echo "========================== Finishing Prepare Release Deploy Script =========================="

View File

@ -0,0 +1,24 @@
#!/usr/bin/env bash
echo "========================== Starting Prepare Staging Deploy Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
# Identify latest annotated tag (latest version)
export VERSION=$(git describe --abbrev=0 --tags)
mkdir -p deploy_dir
# Download the WhiteSource report
mvn org.alfresco:whitesource-downloader-plugin:inventoryReport \
-N \
"-Dorg.whitesource.product=Transform Service" \
-DsaveReportAs=deploy_dir/3rd-party.xlsx
echo "Local deploy directory content:"
ls -lA deploy_dir
popd
set +vex
echo "========================== Finishing Prepare Staging Deploy Script =========================="

26
_ci/release.sh Normal file
View File

@ -0,0 +1,26 @@
#!/usr/bin/env bash
echo "=========================== Starting Release Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
# For PR builds only execute a Dry Run of the release
[ "${TRAVIS_PULL_REQUEST}" = "false" ] && DRY_RUN="" || DRY_RUN="-DdryRun"
# Travis CI runner work on DETACHED HEAD, so we need to checkout the release branch
git checkout -B "${TRAVIS_BRANCH}"
# Run the release plugin - with "[skip ci]" in the release commit message
mvn -B \
${DRY_RUN} \
-Prelease \
"-Darguments=-Prelease -DskipTests -Dmaven.javadoc.skip -Dadditionalparam=-Xdoclint:none" \
release:clean release:prepare release:perform \
-DscmCommentPrefix="[maven-release-plugin][skip ci] " \
-Dusername=alfresco-build \
-Dpassword=${GIT_PASSWORD}
popd
set +vex
echo "=========================== Finishing Release Script =========================="

74
_ci/settings.xml Normal file
View File

@ -0,0 +1,74 @@
<settings>
<profiles>
<profile>
<id>alfresco-internal</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>alfresco-internal</id>
<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/internal</url>
</pluginRepository>
</pluginRepositories>
<properties>
<!-- WhiteSource token -->
<org.whitesource.orgToken>${env.WHITESOURCE_TOKEN}</org.whitesource.orgToken>
</properties>
</profile>
</profiles>
<servers>
<!-- Credential for private Nexus repository groups -->
<server>
<id>alfresco-internal</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<!-- Credential for private Nexus repositories -->
<server>
<id>alfresco-internal-snapshots</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>alfresco-internal-releases</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>alfresco-enterprise-snapshots</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>alfresco-enterprise-releases</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>alfresco-public-snapshots</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<server>
<id>alfresco-public</id>
<username>bamboo</username>
<password>${env.NEXUS_PASSWORD}</password>
</server>
<!-- private docker registry-->
<server>
<id>quay.io</id>
<username>alfresco+bamboo</username>
<password>${env.QUAY_PASSWORD}</password>
</server>
</servers>
</settings>

22
_ci/whitesource.sh Normal file
View File

@ -0,0 +1,22 @@
#!/usr/bin/env bash
echo "=========================== Starting WhiteSource Script ==========================="
PS4="\[\e[35m\]+ \[\e[m\]"
set -vex
pushd "$(dirname "${BASH_SOURCE[0]}")/../"
mvn clean install \
-DskipTests org.whitesource:whitesource-maven-plugin:update \
-Dorg.whitesource.failOnError=true \
-Dorg.whitesource.forceUpdate=true \
-Dorg.whitesource.checkPolicies=true \
-Dorg.whitesource.forceCheckAllDependencies=true \
-Dorg.whitesource.ignorePomModules=false \
"-Dorg.whitesource.product=Transform Service" \
-Dmaven.wagon.http.pool=false
popd
set +vex
echo "=========================== Finishing WhiteSource Script =========================="

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-docker-transformers</artifactId>
<artifactId>alfresco-transform-core</artifactId>
<version>2.0.19-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -66,8 +66,8 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<image>
<name>${image.name}:${image.tag}</name>
@ -84,13 +84,12 @@
<profiles>
<profile>
<id>enterpriseDocker</id>
<id>local</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<executions>
<execution>
<id>build-image</id>
@ -112,44 +111,20 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.registry}/${image.name}:${image.tag}</name>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>master</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<!-- DockerHub image -->
<image>
<name>${image.registry}/${image.name}</name>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
@ -178,9 +153,10 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<configuration combine.self="override">
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
@ -188,6 +164,13 @@
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<!-- DockerHub image -->
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-docker-transformers</artifactId>
<artifactId>alfresco-transform-core</artifactId>
<version>2.0.19-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -66,8 +66,8 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<image>
<name>${image.name}:${image.tag}</name>
@ -84,13 +84,12 @@
<profiles>
<profile>
<id>enterpriseDocker</id>
<id>local</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<executions>
<execution>
<id>build-image</id>
@ -112,44 +111,20 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.registry}/${image.name}:${image.tag}</name>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>master</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<!-- DockerHub image -->
<image>
<name>${image.registry}/${image.name}</name>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
@ -178,9 +153,10 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<configuration combine.self="override">
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
@ -188,6 +164,13 @@
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<!-- DockerHub image -->
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-docker-transformers</artifactId>
<artifactId>alfresco-transform-core</artifactId>
<version>2.0.19-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -74,8 +74,8 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<image>
<name>${image.name}:${image.tag}</name>
@ -92,13 +92,12 @@
<profiles>
<profile>
<id>enterpriseDocker</id>
<id>local</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<executions>
<execution>
<id>build-image</id>
@ -120,44 +119,20 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.registry}/${image.name}:${image.tag}</name>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>master</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<!-- DockerHub image -->
<image>
<name>${image.registry}/${image.name}</name>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
@ -186,9 +161,10 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<configuration combine.self="override">
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
@ -196,6 +172,13 @@
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<!-- DockerHub image -->
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>

View File

@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-docker-transformers</artifactId>
<artifactId>alfresco-transform-core</artifactId>
<version>2.0.19-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
@ -138,8 +138,8 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<image>
<name>${image.name}:${image.tag}</name>
@ -156,13 +156,12 @@
<profiles>
<profile>
<id>enterpriseDocker</id>
<id>local</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<executions>
<execution>
<id>build-image</id>
@ -184,44 +183,20 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.registry}/${image.name}:${image.tag}</name>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>
<execution>
<id>build-push-image</id>
<phase>install</phase>
<goals>
<goal>build</goal>
<goal>push</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>master</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<images>
<!-- DockerHub image -->
<image>
<name>${image.registry}/${image.name}</name>
<name>${image.name}:${image.tag}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
@ -250,9 +225,10 @@
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>${dependency.fabric8.version}</version>
<configuration>
<configuration combine.self="override">
<verbose/>
<images>
<!-- QuayIO image -->
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
@ -260,6 +236,13 @@
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
<!-- DockerHub image -->
<image>
<name>${image.name}:${project.version}</name>
<build>
<dockerFileDir>${project.basedir}/</dockerFileDir>
</build>
</image>
</images>
</configuration>
<executions>

View File

@ -3,7 +3,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-docker-transformers</artifactId>
<artifactId>alfresco-transform-core</artifactId>
<version>2.0.19-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

106
docs/build-and-release.md Normal file
View File

@ -0,0 +1,106 @@
# Build
The `alfresco-transform-core` project uses _Travis CI_. \
The `.travis.yml` config file can be found in the root of the repository.
## Stages and Jobs
1. **Build**: Java Build with Unit and Integration Tests, WhiteSource
2. **Release**: Publish to Quay & DockerHub, Publish the S3 staging
3. **Company Release**: Publish to S3 release
## Branches
Travis CI builds differ by branch:
* `master`:
- regular builds which include only the _Build_ stage;
- the _Build_ stage updates the `latest` T-Engines images (only
from the `master` branch) on both Quay and DockerHub:
- alfresco/alfresco-pdf-renderer
- alfresco/alfresco-imagemagick
- alfresco/alfresco-tika
- alfresco/alfresco-libreoffice
* `ATS-*` (any branch starting with "ATS-"), `SP/1.3.N` and `SP/2.0.N`:
- regular builds which include only the _Build_ stage;
- although built and used on the CI agent, no docker images are updated on remote repositories;
* `release`:
- builds that include the _Build_ and _Release_ stages;
- PR builds with release as the target branch only execute dry runs of the actual release,
without actually publishing anything;
* `release/SP/1.3.N` and `release/SP/2.0.N`:
- builds that include the _Build_ and _Release_ stages;
- PR builds with one of the release branches as the target branch only execute dry runs of the actual release,
without actually publishing anything;
- the branches should be deleted once the builds are completed
* `company_release`:
- builds that include only the `company_release` stage;
- the `company_release` branch should be used for one-off events; once used (a build
completes), the branch should be deleted.
All other branches are ignored.
## Release process steps & info
Prerequisites:
- the `master` branch has a green build and it contains all the changes that should be included in
the next release
Steps:
1. Create a new branch from the `master` branch with the name `ATS-###_release_version`;
2. (Optional) Update the project version if the current POM version is not the next desired
release; use a maven command, i.e. `mvn versions:set -DnewVersion=2.0.19-SNAPSHOT versions:commit`;
3. Update the project's dependencies (remove the `-SNAPSHOT` suffixes) through a new commit on the
`ATS-###_release_version` branch;
4. Open a new Pull Request from the `ATS-###_release_version` branch into the `release` branch and
wait for a green build; the **Release** stage on the PR build will only execute a _Dry_Run_ of
the release;
5. Once it is approved, merge the PR through the **Create a merge commit** option (as opposed to
_Squash and merge_ or _Rebase and merge_), delete the `ATS-###_release_version` branch, and wait
for a green build on the `release` branch;
6. Merge back the `release` branch into the `master` branch;
7. Update the project dependencies (append the `-SNAPSHOT` suffixes)
Steps (6) and (7) can be done either directly from an IDE or through the GitHub flow, by creating
another branch and PR. Just make sure you don't add extra commits directly to the release branch,
as this will trigger another release.
After the release, the reference deployments (docker-compose, helm) should be updated with the
latest docker image tags.
### Release of a Service Pack (SP/1.3.N or SP/2.0.N)
Prerequisites:
- the `SP/<version>` (<version> could be 1.3.N or 2.0.N) branch has a green build and it contains all the changes that should be included in
the next release
**NOTE**: Make sure you release the proper version and the `SP/<version>` is merged into the correct `release/SP/<version>` (both having the same version).
E.g. When releasing a 1.3.N Service Pack, a new branch (`ATS-###_release_version`) should be created from `SP/1.3.N` and the PR should target the `release/SP/1.3.N` branch.
Steps (similar to those describing the release from `master`):
1. Create a new branch from the `SP/<version>` (SP/1.3.N or SP/2.0.N) branch with the name `ATS-###_release_version`;
2. (Optional) Update the project version if the current POM version is not the next desired
release; use a maven command, i.e. `mvn versions:set -DnewVersion=1.3.1-SNAPSHOT versions:commit`;
3. Update the project's dependencies (remove the `-SNAPSHOT` suffixes) through a new commit on the
`ATS-###_release_version` branch;
4. Open a new Pull Request from the `ATS-###_release_version` branch into the `release/SP/<version>` branch and
wait for a green build; the **Release** stage on the PR build will only execute a _Dry_Run_ of
the release;
5. Once it is approved, merge the PR through the **Create a merge commit** option (as opposed to
_Squash and merge_ or _Rebase and merge_), delete the `ATS-###_release_version` branch, and wait
for a green build on the `release` branch;
6. Merge back the `release/SP/<version>` branch into the `SP/<version>` branch;
7. Update the project dependencies (append the `-SNAPSHOT` suffixes)
## Company Release process steps & info
Prerequisites:
- Engineering Release of the desired version has been done.
Steps:
1. Create a new `company_release` branch from `release`. This job uses the git tag to identify the
version to be uploaded to S3 release bucket.
2. If the last commit on `company_release` branch contains `[skip_ci]` in its message it will
prevent Travis from starting a build. Push an empty commit in order to trigger the build,
`git commit --allow-empty -m "Company Release <version>"`. Wait for a green build on the branch.
3. Delete local and remote `company_release` branch.
### Release of a Service Pack (SP/1.3.N or SP/2.0.N)
Follow the steps described in the previous section, but instead of creating the `company_release` from `release`, it needs to be created from the proper `release/SP/<version>` (depending on what version needs the Company Release).

23
pom.xml
View File

@ -10,7 +10,7 @@
</parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-docker-transformers</artifactId>
<artifactId>alfresco-transform-core</artifactId>
<version>2.0.19-SNAPSHOT</version>
<packaging>pom</packaging>
@ -18,7 +18,6 @@
<java.version>1.8</java.version>
<image.tag>latest</image.tag>
<dependency.pdfbox.version>2.0.12</dependency.pdfbox.version>
<dependency.fabric8.version>3.5.37</dependency.fabric8.version>
<dependency.spring-boot.version>2.1.1.RELEASE</dependency.spring-boot.version>
<dependency.alfresco-core.version>7.3</dependency.alfresco-core.version>
<dependency.alfresco-data-model.version>8.8</dependency.alfresco-data-model.version>
@ -38,9 +37,9 @@
</modules>
<scm>
<connection>scm:git:https://git.alfresco.com/Repository/alfresco-docker-transformers.git</connection>
<developerConnection>scm:git:https://git.alfresco.com/Repository/alfresco-docker-transformers.git</developerConnection>
<url>https://git.alfresco.com/Repository/alfresco-docker-transformers</url>
<connection>scm:git:https://github.com/Alfresco/alfresco-transform-core.git</connection>
<developerConnection>scm:git:https://github.com/Alfresco/alfresco-transform-core.git</developerConnection>
<url>https://github.com/Alfresco/alfresco-transform-core</url>
<tag>HEAD</tag>
</scm>
@ -124,12 +123,12 @@
<distributionManagement>
<snapshotRepository>
<id>alfresco-internal-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/enterprise-snapshots</url>
<id>alfresco-public-snapshots</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public-snapshots</url>
</snapshotRepository>
<repository>
<id>alfresco-internal</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/enterprise-releases</url>
<id>alfresco-public</id>
<url>https://artifacts.alfresco.com/nexus/content/repositories/public</url>
</repository>
</distributionManagement>
@ -177,8 +176,12 @@
<excludedGroups>org.alfresco</excludedGroups>
</configuration>
</plugin>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>fabric8-maven-plugin</artifactId>
<version>3.5.42</version>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>