mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ACS-550 Build upstream tagged docker images in build.sh
This commit is contained in:
@@ -156,7 +156,7 @@
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-image</id>
|
||||
<phase>install</phase>
|
||||
<phase>package</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
</goals>
|
||||
@@ -214,54 +214,5 @@
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
|
||||
<profile>
|
||||
<id>releaseImage</id>
|
||||
<!-- publishes "image:release_version" on Quay & DockerHub -->
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>io.fabric8</groupId>
|
||||
<artifactId>fabric8-maven-plugin</artifactId>
|
||||
<configuration combine.self="override">
|
||||
<images>
|
||||
<!-- Quay image -->
|
||||
<image>
|
||||
<name>${image.name}:${project.version}</name>
|
||||
<registry>${image.registry}</registry>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
<!-- DockerHub image -->
|
||||
<image>
|
||||
<name>${image.name}:${project.version}</name>
|
||||
<build>
|
||||
<dockerFileDir>${project.basedir}/</dockerFileDir>
|
||||
<buildOptions>
|
||||
<squash>true</squash>
|
||||
</buildOptions>
|
||||
</build>
|
||||
</image>
|
||||
</images>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>build-push-image</id>
|
||||
<phase>deploy</phase>
|
||||
<goals>
|
||||
<goal>build</goal>
|
||||
<!-- Image push is DISABLED, so Continuous Releases don't pollute the repository -->
|
||||
<!--<goal>push</goal>-->
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
</project>
|
||||
|
@@ -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}"
|
||||
|
Reference in New Issue
Block a user