Skip to content
This repository was archived by the owner on Jan 22, 2024. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion _ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,17 @@ mvn -B -q install \


#build image
cd packaging/docker
cd ${TRAVIS_BUILD_DIR}/packaging/docker
mvn install -Plocal
mvn fabric8:push

if [ $TRAVIS_BRANCH != "master" ]; then
#build enterprise repo with share services image
cd ${TRAVIS_BUILD_DIR}/packaging/docker-acs-share-services/enterprise
mvn install -Plocal
mvn fabric8:push
fi

popd
set +vex
echo "=========================== Finishing Build&Test Script =========================="
31 changes: 18 additions & 13 deletions _ci/deploy_k8s.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ source _ci/init_tag.sh
export HOST="${NAMESPACE}.${HOSTED_ZONE}"
export RELEASE_NAME=$NAMESPACE
export RELEASE_INGRESS_NAME="${NAMESPACE}-ingress"
export ALFRESCO_REPO_IMAGE="alfresco-content-repository"
if [ $TRAVIS_BRANCH != "master" ]; then
export ALFRESCO_REPO_IMAGE="alfresco-content-repository-share-services"
export REPO_TAG_NAME="latest"
else
export ALFRESCO_REPO_IMAGE="alfresco-content-repository"
fi
export ALFRESCO_SHARE_IMAGE="alfresco-share"

#
Expand Down Expand Up @@ -49,7 +54,7 @@ function updateDevelopEnv() {

# repository.replicaCount=1 - this is a temporary fix until issues on clusterd environments are fixed.
helm upgrade --install $RELEASE_NAME alfresco-incubator/alfresco-content-services --version 5.0.0-M1 \
--set repository.replicaCount=1 \
--set repository.replicaCount=1 \
--set externalPort="443" \
--set externalProtocol="https" \
--set externalHost=$HOST \
Expand All @@ -75,7 +80,7 @@ function updateDevelopEnv() {
# Can take one argument that specifies the action: "CREATE", "DELETE", "UPSERT"; if none
# specified, it defaults to "CREATE"
#
function get_route53_json {
function getRoute53Json {
local out
local action
local path="_ci/route53.json"
Expand All @@ -96,7 +101,7 @@ function get_route53_json {
#
# Creates the environment
#
function createEnv {
function createDevelopEnv {
echo "=========================== Creating the environment ==========================="

# create k8s namespace
Expand Down Expand Up @@ -168,13 +173,13 @@ function createEnv {
export HOSTED_ZONE_ID=$(aws route53 list-hosted-zones-by-name --dns-name $HOSTED_ZONE | jq -r '.HostedZones | .[] | .Id')

# create Route53 entry
aws route53 change-resource-record-sets --hosted-zone-id $HOSTED_ZONE_ID --change-batch "$(get_route53_json "UPSERT")"
aws route53 change-resource-record-sets --hosted-zone-id $HOSTED_ZONE_ID --change-batch "$(getRoute53Json "UPSERT")"
}

#
# Before running the tests make sure that all pods are green
#
function wait_for_pods {
function waitForPods {
# counters
PODS_COUNTER=0
# counters limit
Expand Down Expand Up @@ -222,20 +227,20 @@ if $(isBranchDevelop); then
if $(isDevelopUp); then
echo "Update develop environment"
updateDevelopEnv
wait_for_pods $NAMESPACE
waitForPods $NAMESPACE
else
echo "Create develop environment"
createEnv
wait_for_pods $NAMESPACE
createDevelopEnv
waitForPods $NAMESPACE
fi
else
echo "Create PR env environment"
createEnv
wait_for_pods $NAMESPACE
createDevelopEnv
waitForPods $NAMESPACE
fi
else
echo "On development branch"
SHARE_TAG_NAME=$TAG_NAME
createEnv
wait_for_pods $NAMESPACE
createDevelopEnv
waitForPods $NAMESPACE
fi
39 changes: 12 additions & 27 deletions packaging/distribution/pom.xml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
<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">
<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>alfresco-content-services-share-distribution</artifactId>
<name>Distribution of Alfresco Share</name>
<packaging>pom</packaging>

<parent>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-share-packaging</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>
<artifactId>alfresco-content-services-share-distribution</artifactId>
<name>Distribution of Alfresco Share</name>
<packaging>pom</packaging>

<!-- To replace in share-config-custom.xml -->
<properties>
Expand Down Expand Up @@ -42,6 +46,7 @@
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>

<resource>
<directory>${project.build.directory}/dependency/bitrock/bitrock/alfresco/shared/web-extension</directory>
<targetPath>${project.build.outputDirectory}/web-extension-samples</targetPath>
Expand All @@ -67,6 +72,7 @@
<useDefaultDelimiters>false</useDefaultDelimiters>
</configuration>
</execution>

<execution>
<id>copy-resources</id>
<phase>process-resources</phase>
Expand Down Expand Up @@ -108,27 +114,6 @@
</configuration>
</execution>

<!-- Extract licenses and bin from distribution resources
Assuming this is not necessary for ACS 6.0+
<execution>
<id>unpack-resources</id>
<phase>generate-resources</phase>
<goals>
<goal>unpack</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-platform-community-distributionzip</artifactId>
<version>${alfresco.platform.version}</version>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<includes>bin/**,licenses/**</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
-->
<!-- Copy MMT jar -->
<execution>
<id>fetch-resources</id>
Expand All @@ -141,7 +126,7 @@
<artifactItem>
<groupId>org.alfresco</groupId>
<artifactId>alfresco-mmt</artifactId>
<version>6.0</version>
<version>${dependency.alfresco-mmt.version}</version>
<outputDirectory>${project.build.outputDirectory}/bin</outputDirectory>
</artifactItem>
</artifactItems>
Expand All @@ -153,7 +138,7 @@

<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<executions>
<execution>
<id>package-share</id>
<phase>package</phase>
Expand Down
1 change: 1 addition & 0 deletions packaging/docker-acs-share-services/.maven-dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
target/docker/
39 changes: 39 additions & 0 deletions packaging/docker-acs-share-services/community/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Fetch image of ACS Community Edition
FROM alfresco/alfresco-community-repo-base:latest

USER root

# Set default Docker context
ARG RESOURCE_PATH=target

# Set default environment args
ARG GROUPNAME=Alfresco
ARG IMAGEUSERNAME=alfresco
ARG TOMCAT_DIR=/usr/local/tomcat

# Clean previous amps
RUN rm ${TOMCAT_DIR}/amps/*

# Copy the amps from build context to the appropriate location for your application server
COPY ${RESOURCE_PATH}/amps ${TOMCAT_DIR}/amps

RUN chgrp -R ${GROUPNAME} ${TOMCAT_DIR}/amps && \
chmod 664 ${TOMCAT_DIR}/amps/alfresco-share-services-*.amp

# Remove installed amps
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar uninstall \
org.alfresco.integrations.google.docs \
${TOMCAT_DIR}/webapps/alfresco
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar uninstall \
alfresco-aos-module \
${TOMCAT_DIR}/webapps/alfresco

# Apply Share Services amp
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install \
${TOMCAT_DIR}/amps \
${TOMCAT_DIR}/webapps/alfresco -directory -nobackup -force

EXPOSE 8000

USER ${IMAGEUSERNAME}

20 changes: 20 additions & 0 deletions packaging/docker-acs-share-services/community/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<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>acs-community-docker-share-services</artifactId>
<name>Alfresco Content Services (Community) Docker With Share Services image builder</name>
<packaging>pom</packaging>

<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-docker-share-services</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>

<properties>
<image.name>alfresco/alfresco-content-repository-share-services-community</image.name>
<license-header-location>${project.parent.parent.parent.basedir}</license-header-location>
</properties>
</project>
39 changes: 39 additions & 0 deletions packaging/docker-acs-share-services/enterprise/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# Fetch image of ACS Enterprise Edition
FROM quay.io/alfresco/alfresco-enterprise-repo-base:latest

USER root

# Set default Docker context
ARG RESOURCE_PATH=target

# Set default environment args
ARG GROUPNAME=Alfresco
ARG IMAGEUSERNAME=alfresco
ARG TOMCAT_DIR=/usr/local/tomcat

# Clean previous amps
RUN rm ${TOMCAT_DIR}/amps/*

# Copy the amps from build context to the appropriate location for your application server
COPY ${RESOURCE_PATH}/amps ${TOMCAT_DIR}/amps

RUN chgrp -R ${GROUPNAME} ${TOMCAT_DIR}/amps && \
chmod 664 ${TOMCAT_DIR}/amps/alfresco-share-services-*.amp

# Remove installed amps
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar uninstall \
org.alfresco.integrations.google.docs \
${TOMCAT_DIR}/webapps/alfresco
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar uninstall \
alfresco-aos-module \
${TOMCAT_DIR}/webapps/alfresco

# Apply Share Services amp
RUN java -jar ${TOMCAT_DIR}/alfresco-mmt/alfresco-mmt*.jar install \
${TOMCAT_DIR}/amps \
${TOMCAT_DIR}/webapps/alfresco -directory -nobackup -force

EXPOSE 8000

USER ${IMAGEUSERNAME}

20 changes: 20 additions & 0 deletions packaging/docker-acs-share-services/enterprise/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<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>acs-enterprise-docker-share-services</artifactId>
<name>Alfresco Content Services (Enterprise) Docker With Share Services image builder</name>
<packaging>pom</packaging>

<parent>
<groupId>org.alfresco</groupId>
<artifactId>acs-docker-share-services</artifactId>
<version>7.0.0-SNAPSHOT</version>
</parent>

<properties>
<image.name>alfresco/alfresco-content-repository-share-services</image.name>
<license-header-location>${project.parent.parent.parent.basedir}</license-header-location>
</properties>
</project>
Loading