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

View File

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

View File

@@ -15,7 +15,7 @@
<properties> <properties>
<dependency.alfresco-community-repo.version>23.1.0.187</dependency.alfresco-community-repo.version> <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.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> <repo.image.tag>${dependency.alfresco-community-repo.version}</repo.image.tag>
<share.image.tag>${dependency.alfresco-community-share.version}</share.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" SHARE_UPSTREAM_REPO="github.com/Alfresco/alfresco-community-share.git"
# Checkout the upstream share project (tag or branch; + build if the latter) # Checkout the upstream share project (tag or branch; + build if the latter)
if [[ "${SHARE_DEPENDENCY_VERSION}" =~ ^.+-SNAPSHOT$ ]] ; then 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 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 fi
# Build the current project # Build the current project