Skip to content

Commit

Permalink
differentiate share for enterprise and community
Browse files Browse the repository at this point in the history
  • Loading branch information
gionn committed Oct 16, 2024
1 parent 81eb30d commit 2d58466
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 8 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build_forks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ jobs:
OVERRIDES_VALUES_FILE: test/helm/test-overrides.yaml
run: |
sed -i "s|/alfresco-content-repository|/alfresco-content-repository-community|g" ${{ env.OVERRIDES_VALUES_FILE }}
sed -i "s|/alfresco-share|/alfresco-share-community|g" ${{ env.OVERRIDES_VALUES_FILE }}
cat ${{ env.OVERRIDES_VALUES_FILE }}
- name: Helm install
Expand Down
24 changes: 21 additions & 3 deletions docker-bake.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ group "default" {
}

group "community" {
targets = ["repository_community", "share", "search_service", "tengines", "acc"]
targets = ["repository_community", "share_community", "search_service", "tengines", "acc"]
}

group "content_service" {
targets = ["repository", "share"]
targets = ["repository", "share_enterprise"]
}

group "enterprise-search" {
Expand Down Expand Up @@ -658,15 +658,33 @@ target "share" {
ALFRESCO_SHARE_GROUP_ID = "${ALFRESCO_GROUP_ID}"
ALFRESCO_SHARE_USER_NAME = "${ALFRESCO_SHARE_USER_NAME}"
ALFRESCO_SHARE_USER_ID = "${ALFRESCO_SHARE_USER_ID}"
ALFRESCO_SHARE_ARTIFACT = "${share_editions.artifact}"
}
labels = {
"org.label-schema.name" = "${PRODUCT_LINE} Share"
"org.opencontainers.image.title" = "${PRODUCT_LINE} Share"
"org.opencontainers.image.description" = "Alfresco Share"
}
tags = ["${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-share:${TAG}"]
tags = ["${REGISTRY}/${REGISTRY_NAMESPACE}/${share_editions.image_name}:${TAG}"]
output = ["type=docker"]
platforms = split(",", "${TARGETARCH}")

name = "share_${share_editions.name}"

matrix = {
share_editions = [
{
artifact = "alfresco-content-services-community-distribution",
image_name = "alfresco-share-community",
name = "community"
},
{
artifact = "alfresco-content-services-share-distribution",
image_name = "alfresco-share",
name = "enterprise"
}
]
}
}

variable "ALFRESCO_SOLR_DIST_DIR" {
Expand Down
13 changes: 9 additions & 4 deletions share/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,20 @@ EXPOSE 8000
RUN mkdir -p ${CATALINA_HOME}/shared/classes/alfresco/web-extension \
${CATALINA_HOME}/conf/Catalina/localhost

RUN yum install -y unzip

COPY entrypoint.sh ${CATALINA_HOME}/shared/classes/alfresco

ADD amps /tmp/amps
ADD distribution /tmp/
ARG ALFRESCO_SHARE_ARTIFACT

COPY distribution/${ALFRESCO_SHARE_ARTIFACT}-*.zip /tmp/
COPY distribution/share-config-custom.xml /tmp/
COPY amps /tmp/amps

ENV DISTDIR="/tmp/distribution"

RUN yum install -y unzip
RUN unzip /tmp/*.zip -d ${DISTDIR}
RUN if ls ${DISTDIR}/alfresco* > /dev/null 2>&1; then mv ${DISTDIR}/alfresco* ${DISTDIR}/; fi
RUN if ls ${DISTDIR}/alfresco* > /dev/null 2>&1; then mv ${DISTDIR}/alfresco*/* ${DISTDIR}/; fi
RUN unzip ${DISTDIR}/web-server/webapps/share.war -d ${CATALINA_HOME}/webapps/share
RUN cp -r ${DISTDIR}/amps/ /tmp/amps/
RUN cp /tmp/share-config-custom.xml ${CATALINA_HOME}/shared/classes/alfresco/web-extension
Expand Down
2 changes: 1 addition & 1 deletion test/community-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ services:
ports:
- "8090:8090"
share:
image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-share:${TAG}
image: ${REGISTRY}/${REGISTRY_NAMESPACE}/alfresco-share-community:${TAG}
mem_limit: 1g
environment:
CSRF_FILTER_ORIGIN: http://localhost:8080
Expand Down

0 comments on commit 2d58466

Please sign in to comment.