use jakarta-migrated community-repo (#1526)

* use jakarta-migrated community-repo

* use jakarta-migrated community-repo and community-share

* build jakarta dependencies for community-repo

* temporarily do not build share

* fix parent pom version

* use -force option to fix docker image build failures

* trigger build

* use correct versions of community-share and acs-packaging

* update community-repo version

* Use released share zip

* Bump cargo-maven3-plugin tomcat version from 9x to 10x

* revert to Tomcat9x

* bump community-repo from 161-SNAPSHOT to 163-SNAPSHOT

* Bump cargo-maven3-plugin tomcat version from 9x to 10x

* Minor changes to tomcat deployment test

* Bump community-repo from 163-SNAPSHOT to 164-SNAPSHOT

* Include Tomcat deployment test as condition for docker images update

* Changes to community_test_tomcat_deployment

* Correct community-repo version

* Bump community-repo version to 23.1.0.170-SNAPSHOT

* Pin acs-packaging version to A27 for share compatibility

* Workaround for not migrated share

* Disable Tomcat deployment test

* Update latest docker images no longer relies on tomcat deployment test

* As per [ACS-5545] -force flag should not be needed

* Remove jakarta-dependencies build from script

---------

Co-authored-by: pzurek <Piotr.Zurek@hyland.com>
Co-authored-by: Kacper Magdziarz <95610011+kmagdziarz@users.noreply.github.com>
Co-authored-by: kmagdziarz <Kacper.Magdziarz@hyland.com>
This commit is contained in:
Sara
2023-08-11 12:13:44 +01:00
committed by GitHub
parent f831dbc917
commit 905d721fe0
4 changed files with 46 additions and 30 deletions

View File

@@ -116,32 +116,37 @@ jobs:
- name: "Clean Maven cache"
run: bash ./scripts/ci/cleanup_cache.sh
community_test_tomcat_deployment:
name: "Test Tomcat deployment"
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, '[skip tests]')"
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: "Init"
timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
run: |
bash ./scripts/ci/init.sh
bash ./scripts/ci/build.sh
- name: "Set up the environment"
run: |
${TAS_SCRIPTS}/start-compose.sh ./dev/docker-compose.yml
${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8983/solr"
- name: "Run tomcat, verify it starts"
id: tests
run: |
(mvn clean install -Prun -rf dev &)
${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco/"
echo "Test Alfresco Repository availability"
curl -Ls -o /dev/null --fail "http://localhost:8080/alfresco"
echo "Test Share availability"
curl -Ls -o /dev/null --fail "http://localhost:8080/share"
#https://alfresco.atlassian.net/browse/ACS-5832
# community_test_tomcat_deployment:
# name: "Test Tomcat deployment"
# runs-on: ubuntu-latest
# if: >
# !contains(github.event.head_commit.message, '[skip tests]')
# steps:
# - uses: actions/checkout@v3
# with:
# persist-credentials: false
# - uses: Alfresco/alfresco-build-tools/.github/actions/get-build-info@v1.35.2
# - uses: Alfresco/alfresco-build-tools/.github/actions/free-hosted-runner-disk-space@v1.35.2
# - uses: Alfresco/alfresco-build-tools/.github/actions/setup-java-build@v1.35.2
# - name: "Build"
# timeout-minutes: ${{ fromJSON(env.GITHUB_ACTIONS_DEPLOY_TIMEOUT) }}
# run: |
# bash ./scripts/ci/init.sh
# bash ./scripts/ci/build.sh
# - name: "Set up the environment"
# run: |
# ${TAS_SCRIPTS}/start-compose.sh ./dev/docker-compose.yml
# ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8983/solr"
# - name: "Run tomcat, verify it starts"
# id: tests
# run: |
# (mvn clean install -Prun -rf dev &)
# ${TAS_SCRIPTS}/wait-for-alfresco-start.sh "http://localhost:8080/alfresco/"
# echo "Test Alfresco Repository availability"
# curl -Ls -o /dev/null --fail "http://localhost:8080/alfresco"
# echo "Test Share availability"
# curl -Ls -o /dev/null --fail "http://localhost:8080/share"
docker_latest:
name: Update latest Docker images

View File

@@ -63,7 +63,7 @@
<artifactId>cargo-maven3-plugin</artifactId>
<configuration>
<container>
<containerId>tomcat9x</containerId>
<containerId>tomcat10x</containerId>
<type>embedded</type>
<log>target/cargo.log</log>
<systemProperties>

View File

@@ -15,7 +15,7 @@
<properties>
<dependency.alfresco-community-repo.version>23.1.0.187</dependency.alfresco-community-repo.version>
<dependency.alfresco-community-share.version>23.1.0.190</dependency.alfresco-community-share.version>
<dependency.acs-packaging.version>23.1.0-A28</dependency.acs-packaging.version> <!-- for Share distribution zip -->
<dependency.acs-packaging.version>23.1.0-A27</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>

View File

@@ -77,9 +77,20 @@ 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}" "-P$BUILD_PROFILE -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}"
else
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}"
# To handle corresponding problem in acs-packaging https://alfresco.atlassian.net/browse/ACS-5820
pullUpstreamTag "${SHARE_UPSTREAM_REPO}" "${SHARE_DEPENDENCY_VERSION}"
docker images
git clone -b "${SHARE_DEPENDENCY_VERSION}" --depth=1 "https://${GIT_USERNAME}:${GIT_PASSWORD}@${SHARE_UPSTREAM_REPO}" /tmp/commrepo
mvn -f /tmp/commrepo/pom.xml -B -ntp -V clean package -DskipTests -Dmaven.javadoc.skip=true "-Dimage.tag=${SHARE_DEPENDENCY_VERSION}" "-P$BUILD_PROFILE" -Pags -Dlicense.failOnNotUptodateHeader=true
docker images
buildUpstreamTag "${SHARE_UPSTREAM_REPO}" "${SHARE_DEPENDENCY_VERSION}" "-P$BUILD_PROFILE -Pags -Dlicense.failOnNotUptodateHeader=true -Ddocker.quay-expires.value=NEVER"
#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