Compare commits

...

22 Commits

Author SHA1 Message Date
alfresco-build
31b6f612f4 [maven-release-plugin][skip ci] prepare release 7.4.0-A21 2023-03-16 14:27:49 +00:00
alfresco-build
8133c20355 [release] 7.4.0-A21
Update upstream versions
    - alfresco-community-repo:   20.105
    - alfresco-enterprise-share: 20.95
    - acs-packaging:             7.4.0-A21
    - RELEASE_VERSION:           7.4.0-A21
    - DEVELOPMENT_VERSION:       7.4.0-A22-SNAPSHOT
2023-03-16 13:10:36 +00:00
alfresco-build
8b41b66675 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-14 23:25:17 +00:00
alfresco-build
61cf3139ec [maven-release-plugin][skip ci] prepare release 7.4.0-A20 2023-03-14 23:25:15 +00:00
alfresco-build
31879f80e0 [release] 7.4.0-A20
Update upstream versions
    - alfresco-community-repo:   20.101
    - alfresco-enterprise-share: 20.92
    - acs-packaging:             7.4.0-A20
    - RELEASE_VERSION:           7.4.0-A20
    - DEVELOPMENT_VERSION:       7.4.0-A21-SNAPSHOT
2023-03-14 22:28:51 +00:00
Wojtek Świętoń
c3286dbcbf ACS-4140 Produce Multi-Arch Docker images (#1508)
* ACS-4140 Changes in pom and Dockerfile for alfresco-content-repository-community image

* ACS-4140 Changes in pom and Dockerfile for alfresco-governance-share-community and alfresco-governance-repository-community

* ACS-4140 Add docker image build mode option in build.sh

* ACS-4140 Fix in prepare_buildx.sh to not duplicate image.tag

* ACS-4139 Fix intermittent failures

* ACS-4139 Remove echo

* ACS-4140 Refactor build.sh

* ACS-4140 Added missing <BASE_IMAGE> argument

* ACS-4140 Push docker images to local repository

* ACS-4140 Add 'build-multiarch-docker-images' profile to 'share-community-docker'

* ACS-4140 Use build for 'push-docker-images' and 'release' profiles

* ACS-4140 Remove comments

* ACS-4140 Add missing properties

* ACS-4140 Inherit required properties

* ACS-4140 Change the 'build-multiarch-docker-image' profile phase to package

* Revert "ACS-4140 Change the 'build-multiarch-docker-image' profile phase to package"

This reverts commit 38781abc9a.

* ACS-4140 Bump community repo/share versions

---------

Co-authored-by: Damian.Ujma@hyland.com <Damian.Ujma@hyland.com>
2023-03-14 16:33:26 +01:00
alfresco-build
7559575daf [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-12 01:42:31 +00:00
alfresco-build
ccf040d55a [maven-release-plugin][skip ci] prepare release 7.4.0-A19 2023-03-12 01:42:28 +00:00
alfresco-build
d532dd2448 [release] 7.4.0-A19
Update upstream versions
    - alfresco-community-repo:   20.97
    - alfresco-enterprise-share: 20.87
    - acs-packaging:             7.4.0-A19
    - RELEASE_VERSION:           7.4.0-A19
    - DEVELOPMENT_VERSION:       7.4.0-A20-SNAPSHOT
2023-03-12 01:01:17 +00:00
alfresco-build
ed31cfc681 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-07 08:58:27 +00:00
alfresco-build
cf2aee3bb8 [maven-release-plugin][skip ci] prepare release 7.4.0-M3 2023-03-07 08:58:24 +00:00
alfresco-build
105e605060 [release] 7.4.0-M3
Update upstream versions
    - alfresco-community-repo:   20.90
    - alfresco-enterprise-share: 20.84
    - acs-packaging:             7.4.0-M3
    - RELEASE_VERSION:           7.4.0-M3
    - DEVELOPMENT_VERSION:       7.4.0-A19-SNAPSHOT
2023-03-07 08:19:44 +00:00
alfresco-build
d4f0de607f [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-05 01:49:20 +00:00
alfresco-build
2ee42e98fa [maven-release-plugin][skip ci] prepare release 7.4.0-A18 2023-03-05 01:49:18 +00:00
alfresco-build
77e687ced5 [release] 7.4.0-A18
Update upstream versions
    - alfresco-community-repo:   20.90
    - alfresco-enterprise-share: 20.82
    - acs-packaging:             7.4.0-A18
    - RELEASE_VERSION:           7.4.0-A18
    - DEVELOPMENT_VERSION:       7.4.0-A19-SNAPSHOT
2023-03-05 01:10:43 +00:00
alfresco-build
d1e5759949 [maven-release-plugin][skip ci] prepare for next development iteration 2023-03-02 10:26:16 +00:00
alfresco-build
52d988ba94 [maven-release-plugin][skip ci] prepare release 7.4.0-A17 2023-03-02 10:26:13 +00:00
alfresco-build
bddf020b32 [release] 7.4.0-A17
Update upstream versions
    - alfresco-community-repo:   20.89
    - alfresco-enterprise-share: 20.81
    - acs-packaging:             7.4.0-A17
    - RELEASE_VERSION:           7.4.0-A17
    - DEVELOPMENT_VERSION:       7.4.0-A18-SNAPSHOT
2023-03-02 09:48:42 +00:00
alfresco-build
2607293ad0 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-27 10:18:28 +00:00
alfresco-build
5501eca6a0 [maven-release-plugin][skip ci] prepare release 7.4.0-A16 2023-02-27 10:18:25 +00:00
alfresco-build
5e0598215b [release] 7.4.0-A16
Update upstream versions
    - alfresco-community-repo:   20.88
    - alfresco-enterprise-share: 20.79
    - acs-packaging:             7.4.0-A16
    - RELEASE_VERSION:           7.4.0-A16
    - DEVELOPMENT_VERSION:       7.4.0-A17-SNAPSHOT
2023-02-27 09:38:54 +00:00
alfresco-build
b6ee5f0b69 [maven-release-plugin][skip ci] prepare for next development iteration 2023-02-27 04:11:01 +00:00
26 changed files with 413 additions and 45 deletions

View File

@@ -29,8 +29,8 @@ env:
TAS_ENVIRONMENT: ./tests/environment
TAS_SCRIPTS: ../alfresco-community-repo/packaging/tests/scripts
# Release version has to start with real version (7.4.0-....) for the docker image to build successfully.
RELEASE_VERSION: 7.4.0-A15
DEVELOPMENT_VERSION: 7.4.0-A16-SNAPSHOT
RELEASE_VERSION: 7.4.0-A21
DEVELOPMENT_VERSION: 7.4.0-A22-SNAPSHOT
jobs:
tas_tests:
@@ -125,15 +125,22 @@ jobs:
!contains(github.event.head_commit.message, '[skip docker_latest]') &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
github.event_name != 'pull_request'
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: "Init"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
bash ./scripts/ci/build.sh -m
- name: "Push Docker images"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: mvn -B -ntp -V clean install -DskipTests -Dmaven.javadoc.skip=true -Pags -Ppush-docker-images
@@ -149,17 +156,24 @@ jobs:
contains(github.event.head_commit.message, '[release]') &&
(github.ref_name == 'master' || startsWith(github.ref_name, 'release/')) &&
github.event_name != 'pull_request'
services:
registry:
image: registry:2
ports:
- 5000:5000
steps:
- uses: actions/checkout@v3
with:
persist-credentials: false
- uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.33.0
- uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.33.0
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: "Init"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
bash ./scripts/ci/build.sh -m
- name: "Release"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<build>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<build>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-dev-community-tomcat-env</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>

View File

@@ -8,7 +8,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<dependencies>

View File

@@ -7,7 +7,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<dependencies>

View File

@@ -1,4 +1,5 @@
FROM alfresco/alfresco-community-repo-base:${repo.image.tag}
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
# Set default docker_context.
ARG resource_path=target

View File

@@ -1,3 +1,4 @@
ARG BASE_IMAGE
# BUILD STAGE AGS
FROM debian:11-slim AS AGSBUILDER
@@ -12,7 +13,7 @@ RUN unzip -q /build/gs-api-explorer-*.war -d /build/gs-api-explorer && \
chmod -R g-w,o= /build
# ACTUAL IMAGE
FROM alfresco/alfresco-content-repository-community:${image.tag}
FROM ${BASE_IMAGE}
# Alfresco user does not have permissions to modify webapps or configuration. Switch to root.
# The access will be fixed after all operations are done.

View File

@@ -8,11 +8,13 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-services-community-docker</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>
<image.name>alfresco/alfresco-governance-repository-community</image.name>
<base.image>alfresco/alfresco-content-repository-community:${image.tag}</base.image>
<scripts.directory>${project.parent.parent.basedir}/scripts/dev</scripts.directory>
</properties>
<build>

View File

@@ -7,12 +7,14 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>
<image.name>alfresco/alfresco-content-repository-community</image.name>
<docker.quay-expires.value>NEVER</docker.quay-expires.value>
<base.image>alfresco/alfresco-community-repo-base:${repo.image.tag}</base.image>
<scripts.directory>${project.parent.basedir}/scripts/dev</scripts.directory>
</properties>
<build>
@@ -76,6 +78,12 @@
<images>
<image>
<name>${image.name}:${image.tag}</name>
<build>
<args>
<BASE_IMAGE>${base.image}</BASE_IMAGE>
</args>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>
@@ -93,6 +101,70 @@
</build>
</profile>
<profile>
<id>build-multiarch-docker-images</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${local.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</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>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>push-docker-images</id>
<!-- publishes "image:latest" to Quay -->
@@ -105,8 +177,20 @@
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<name>${image.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
@@ -121,6 +205,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
@@ -142,6 +248,19 @@
<!-- DockerHub image -->
<image>
<name>${image.name}:${project.version}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
@@ -157,8 +276,20 @@
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<name>${image.registry}/${image.name}:${project.version}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
@@ -169,6 +300,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

View File

@@ -1,5 +1,6 @@
### Apply AGS community share AMP to Share image
FROM alfresco/alfresco-share-base:${share.image.tag}
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
LABEL quay.expires-after=${docker.quay-expires.value}

View File

@@ -8,12 +8,14 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>share-community-docker</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>
<image.name>alfresco/alfresco-governance-share-community</image.name>
<docker.quay-expires.value>NEVER</docker.quay-expires.value>
<base.image>alfresco/alfresco-share-base:${share.image.tag}</base.image>
<scripts.directory>${project.parent.parent.basedir}/scripts/dev</scripts.directory>
</properties>
<build>
@@ -58,6 +60,12 @@
<images>
<image>
<name>${image.name}:${image.tag}</name>
<build>
<args>
<BASE_IMAGE>${base.image}</BASE_IMAGE>
</args>
<contextDir>${project.basedir}</contextDir>
</build>
</image>
</images>
</configuration>
@@ -75,6 +83,70 @@
</build>
</profile>
<profile>
<id>build-multiarch-docker-images</id>
<build>
<plugins>
<plugin>
<groupId>io.fabric8</groupId>
<artifactId>docker-maven-plugin</artifactId>
<configuration>
<images>
<image>
<name>${local.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</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>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>push-docker-images</id>
<!-- publishes "image:latest" to Quay -->
@@ -87,8 +159,20 @@
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${image.tag}</name>
<registry>${image.registry}</registry>
<name>${image.registry}/${image.name}:${image.tag}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
@@ -103,6 +187,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
@@ -124,6 +230,19 @@
<!-- DockerHub image -->
<image>
<name>${image.name}:${project.version}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
@@ -139,8 +258,20 @@
<images>
<!-- Quay image -->
<image>
<name>${image.name}:${project.version}</name>
<registry>${image.registry}</registry>
<name>${image.registry}/${image.name}:${project.version}</name>
<build>
<buildx>
<builderName>${builder.name}</builderName>
<platforms>
<platform>linux/amd64</platform>
<platform>linux/arm64</platform>
</platforms>
</buildx>
<dockerFileDir>${project.basedir}</dockerFileDir>
<args>
<BASE_IMAGE>${local.registry}/${base.image}</BASE_IMAGE>
</args>
</build>
</image>
</images>
</configuration>
@@ -151,6 +282,28 @@
</execution>
</executions>
</plugin>
<plugin>
<artifactId>exec-maven-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<executions>
<execution>
<id>prepare-buildx</id>
<phase>generate-sources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>${scripts.directory}/prepare_buildx.sh</executable>
<arguments>
<argument>${builder.name}</argument>
<argument>${image.registry}</argument>
<argument>${image.name}</argument>
<argument>${image.tag}</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>

View File

@@ -7,6 +7,6 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
</project>

12
pom.xml
View File

@@ -3,19 +3,19 @@
<artifactId>acs-community-packaging</artifactId>
<packaging>pom</packaging>
<name>Alfresco Content Services Community Packaging</name>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-community-repo</artifactId>
<relativePath>../alfresco-community-repo/pom.xml</relativePath>
<version>20.88</version>
<version>20.105</version>
</parent>
<properties>
<dependency.alfresco-community-repo.version>20.88</dependency.alfresco-community-repo.version>
<dependency.alfresco-community-share.version>20.79</dependency.alfresco-community-share.version>
<dependency.acs-packaging.version>7.4.0-A15</dependency.acs-packaging.version> <!-- for Share distribution zip -->
<dependency.alfresco-community-repo.version>20.105</dependency.alfresco-community-repo.version>
<dependency.alfresco-community-share.version>20.95</dependency.alfresco-community-share.version>
<dependency.acs-packaging.version>7.4.0-A21</dependency.acs-packaging.version> <!-- for Share distribution zip -->
<repo.image.tag>${dependency.alfresco-community-repo.version}</repo.image.tag>
<share.image.tag>${dependency.alfresco-community-share.version}</share.image.tag>
@@ -25,7 +25,7 @@
<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.4.0-A15</tag>
<tag>7.4.0-A21</tag>
</scm>
<distributionManagement>

View File

@@ -5,7 +5,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<packaging>pom</packaging>

View File

@@ -6,6 +6,28 @@ pushd "$(dirname "${BASH_SOURCE[0]}")/../../"
source "$(dirname "${BASH_SOURCE[0]}")/build_functions.sh"
usage() {
echo "Builds the upstream projects first, then the current one." 1>&2;
echo 1>&2;
echo "Usage: $0 [-m]" 1>&2;
echo " -m: Flag to build Docker images with multi-architecture" 1>&2;
echo " -h: Display the usage information" 1>&2;
exit 1;
}
while getopts "mh" option; do
case $option in
m)
DOCKER_BUILD_PROFILE=build-multiarch-docker-images
;;
h)
usage
;;
esac
done
BUILD_PROFILE=${DOCKER_BUILD_PROFILE:-build-docker-images}
COM_DEPENDENCY_VERSION="$(retrievePomProperty "dependency.alfresco-community-repo.version")"
REPO_IMAGE=$([[ "${COM_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] && echo "-Drepo.image.tag=latest" || echo)
@@ -32,9 +54,9 @@ UPSTREAM_REPO="github.com/Alfresco/alfresco-community-repo.git"
# Search, checkout and build the same branch on the upstream project in case of SNAPSHOT dependencies
# Otherwise, checkout the upstream tag and build its Docker image (use just "mvn package", without "mvn install")
if [[ "${COM_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then
pullAndBuildSameBranchOnUpstream "${UPSTREAM_REPO}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true"
pullAndBuildSameBranchOnUpstream "${UPSTREAM_REPO}" "-P$BUILD_PROFILE -Pags -Dlicense.failOnNotUptodateHeader=true"
else
pullUpstreamTagAndBuildDockerImage "${UPSTREAM_REPO}" "${COM_DEPENDENCY_VERSION}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true"
pullUpstreamTagAndBuildDockerImage "${UPSTREAM_REPO}" "${COM_DEPENDENCY_VERSION}" "-P$BUILD_PROFILE -Pags -Dlicense.failOnNotUptodateHeader=true"
fi
SHARE_DEPENDENCY_VERSION="$(retrievePomProperty "dependency.alfresco-community-share.version")"
@@ -55,13 +77,13 @@ fi
SHARE_UPSTREAM_REPO="github.com/Alfresco/alfresco-community-share.git"
# Checkout the upstream share project (tag or branch; + build if the latter)
if [[ "${SHARE_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then
pullAndBuildSameBranchOnUpstream "${SHARE_UPSTREAM_REPO}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER ${REPO_IMAGE} -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
pullAndBuildSameBranchOnUpstream "${SHARE_UPSTREAM_REPO}" "-P$BUILD_PROFILE -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER ${REPO_IMAGE} -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
else
pullUpstreamTagAndBuildDockerImage "${SHARE_UPSTREAM_REPO}" "${SHARE_DEPENDENCY_VERSION}" "-Pbuild-docker-images -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
pullUpstreamTagAndBuildDockerImage "${SHARE_UPSTREAM_REPO}" "${SHARE_DEPENDENCY_VERSION}" "-P$BUILD_PROFILE -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER -Ddependency.alfresco-community-repo.version=${COM_DEPENDENCY_VERSION}"
fi
# Build the current project
mvn -B -ntp -V -q install -DskipTests -Dmaven.javadoc.skip=true -Pbuild-docker-images -Pags ${REPO_IMAGE} ${SHARE_IMAGE}
mvn -B -ntp -V -q install -DskipTests -Dmaven.javadoc.skip=true -P$BUILD_PROFILE -Pags ${REPO_IMAGE} ${SHARE_IMAGE}
popd

21
scripts/dev/prepare_buildx.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/usr/bin/env bash
BUILDER_NAME="${1}"
TARGET_REGISTRY="${2}"
TARGET_IMAGE="${3}"
IMAGE_TAG="${4}"
#Create a `docker-container` builder with host networking and required flags (quay.io)
docker --config target/docker/"${TARGET_REGISTRY}"/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
#Create a `docker-container` builder with host networking and required flags (docker.io)
docker --config target/docker/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'
#Create a `docker-container` builder with host networking and required flags (local registry)
docker --config target/docker/127.0.0.1/5000/"${TARGET_IMAGE}"/"${IMAGE_TAG}"/docker \
buildx create --use --name "${BUILDER_NAME}" --driver-opt network=host \
--buildkitd-flags '--allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host'

View File

@@ -6,7 +6,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-community-packaging</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<modules>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<properties>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<developers>

View File

@@ -9,7 +9,7 @@
<parent>
<groupId>org.alfresco</groupId>
<artifactId>content-repository-community-tests</artifactId>
<version>7.4.0-A15</version>
<version>7.4.0-A21</version>
</parent>
<developers>